create-volt 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ All notable changes to `create-volt` are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/), and this project adheres to
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.17.0] - 2026-06-29
8
+
9
+ ### Added
10
+ - **PaaS deploy targets** — every scaffold now ships a `Dockerfile`,
11
+ `.dockerignore`, `render.yaml`, `fly.toml`, and `Procfile`, so a Volt app
12
+ deploys to Render / Fly.io / Railway / DO App Platform (which handle the
13
+ server, DNS, and TLS) with config supplied as platform env vars. New
14
+ `/docs/deploy` guide covering the PaaS and PM2+nginx paths.
15
+
16
+ ### Changed
17
+ - The server boots straight into app mode (no setup wizard) when
18
+ `NODE_ENV=production` or `VOLT_ADDONS` is set via env — so a container/PaaS
19
+ runs the app from platform env vars without a committed `.env`.
20
+
7
21
  ## [0.16.0] - 2026-06-29
8
22
 
9
23
  ### Added
@@ -242,6 +256,7 @@ All notable changes to `create-volt` are documented here. The format follows
242
256
  watching and full-page hot reload. Supports `--skip-install` and `--force`,
243
257
  and auto-detects npm / pnpm / yarn / bun for the install step.
244
258
 
259
+ [0.17.0]: https://github.com/MIR-2025/volt/releases/tag/v0.17.0
245
260
  [0.16.0]: https://github.com/MIR-2025/volt/releases/tag/v0.16.0
246
261
  [0.15.1]: https://github.com/MIR-2025/volt/releases/tag/v0.15.1
247
262
  [0.15.0]: https://github.com/MIR-2025/volt/releases/tag/v0.15.0
package/index.js CHANGED
@@ -250,6 +250,11 @@ const shippedEnv = path.join(targetDir, "env");
250
250
  if (fs.existsSync(shippedEnv)) {
251
251
  fs.renameSync(shippedEnv, path.join(targetDir, ".env"));
252
252
  }
253
+ // ship "dockerignore" → ".dockerignore" (same npm-safety dance)
254
+ const shippedDockerignore = path.join(targetDir, "dockerignore");
255
+ if (fs.existsSync(shippedDockerignore)) {
256
+ fs.renameSync(shippedDockerignore, path.join(targetDir, ".dockerignore"));
257
+ }
253
258
 
254
259
  // Bundle the add-on sources so the app's setup wizard can enable them later
255
260
  // (only for templates that ship the wizard, i.e. have a setup/ dir).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-volt",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Scaffold a new Volt app — no-build, signals-based UI with Socket.io hot reload.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,20 @@
1
+ # Volt app — production container. Runs on Render, Fly.io, Railway, DO App
2
+ # Platform, and any container host. They handle the server, DNS, and TLS; you
3
+ # just set config as env vars.
4
+ #
5
+ # Configure via the platform's env vars (NOT a committed .env):
6
+ # VOLT_ADDONS=db,auth,... DB_DRIVER=... MONGODB_URI / DATABASE_URL
7
+ # MEDIA_DRIVER=s3 S3_ENDPOINT/S3_REGION/S3_BUCKET/S3_KEY/S3_SECRET etc.
8
+ #
9
+ # Tip: run the local wizard first (`npm run dev`) so the add-on packages are
10
+ # saved into package.json; commit package.json, then deploy and set the same
11
+ # config as env vars here. NODE_ENV=production makes the app boot straight up
12
+ # (no setup wizard).
13
+ FROM node:22-alpine
14
+ WORKDIR /app
15
+ ENV NODE_ENV=production
16
+ COPY package*.json ./
17
+ RUN npm install --omit=dev
18
+ COPY . .
19
+ EXPOSE 8080
20
+ CMD ["node", "server.js"]
@@ -0,0 +1 @@
1
+ web: node server.js
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ .git
3
+ .env
4
+ *.log
5
+ npm-debug.log*
6
+ .DS_Store
@@ -0,0 +1,15 @@
1
+ # Fly.io — run `fly launch` (it uses the Dockerfile), then set config:
2
+ # fly secrets set VOLT_ADDONS=db,auth DB_DRIVER=mongodb MONGODB_URI=...
3
+ app = "volt-app"
4
+
5
+ [build]
6
+
7
+ [http_service]
8
+ internal_port = 8080
9
+ force_https = true
10
+ auto_stop_machines = true
11
+ auto_start_machines = true
12
+
13
+ [env]
14
+ PORT = "8080"
15
+ NODE_ENV = "production"
@@ -0,0 +1,15 @@
1
+ # Render blueprint — https://render.com/docs/blueprint-spec
2
+ # Push this repo to GitHub, then in Render: New → Blueprint → pick the repo.
3
+ # Render builds the Dockerfile, gives you HTTPS + a domain, and runs it.
4
+ services:
5
+ - type: web
6
+ name: volt-app
7
+ runtime: docker
8
+ plan: starter
9
+ envVars:
10
+ - key: VOLT_ADDONS
11
+ sync: false # set your add-ons (e.g. "db,auth") in the dashboard
12
+ # Add the rest in the dashboard as needed:
13
+ # DB_DRIVER, MONGODB_URI / DATABASE_URL,
14
+ # MEDIA_DRIVER, S3_ENDPOINT/S3_REGION/S3_BUCKET/S3_KEY/S3_SECRET,
15
+ # SMTP_URL, MAIL_FROM
@@ -397,9 +397,13 @@ async function startStudio() {
397
397
 
398
398
  // --- gate: studio / setup (first run, --edit) / the app ---
399
399
  const editMode = process.argv.includes("--edit") || process.argv.includes("-e");
400
+ // In production / on a PaaS there's no interactive wizard: config comes from the
401
+ // platform's env vars (a Dockerfile sets NODE_ENV=production). Only fall back to
402
+ // the first-run wizard when nothing is configured and we're not in production.
403
+ const configured = fs.existsSync(ENV_PATH) || process.env.VOLT_ADDONS != null || process.env.NODE_ENV === "production";
400
404
  if (process.argv.includes("--studio")) {
401
405
  startStudio();
402
- } else if (editMode || !fs.existsSync(ENV_PATH)) {
406
+ } else if (editMode || !configured) {
403
407
  startSetup();
404
408
  } else {
405
409
  loadEnv();
@@ -0,0 +1,20 @@
1
+ # Volt app — production container. Runs on Render, Fly.io, Railway, DO App
2
+ # Platform, and any container host. They handle the server, DNS, and TLS; you
3
+ # just set config as env vars.
4
+ #
5
+ # Configure via the platform's env vars (NOT a committed .env):
6
+ # VOLT_ADDONS=db,auth,... DB_DRIVER=... MONGODB_URI / DATABASE_URL
7
+ # MEDIA_DRIVER=s3 S3_ENDPOINT/S3_REGION/S3_BUCKET/S3_KEY/S3_SECRET etc.
8
+ #
9
+ # Tip: run the local wizard first (`npm run dev`) so the add-on packages are
10
+ # saved into package.json; commit package.json, then deploy and set the same
11
+ # config as env vars here. NODE_ENV=production makes the app boot straight up
12
+ # (no setup wizard).
13
+ FROM node:22-alpine
14
+ WORKDIR /app
15
+ ENV NODE_ENV=production
16
+ COPY package*.json ./
17
+ RUN npm install --omit=dev
18
+ COPY . .
19
+ EXPOSE 8080
20
+ CMD ["node", "server.js"]
@@ -0,0 +1 @@
1
+ web: node server.js
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ .git
3
+ .env
4
+ *.log
5
+ npm-debug.log*
6
+ .DS_Store
@@ -0,0 +1,15 @@
1
+ # Fly.io — run `fly launch` (it uses the Dockerfile), then set config:
2
+ # fly secrets set VOLT_ADDONS=db,auth DB_DRIVER=mongodb MONGODB_URI=...
3
+ app = "volt-app"
4
+
5
+ [build]
6
+
7
+ [http_service]
8
+ internal_port = 8080
9
+ force_https = true
10
+ auto_stop_machines = true
11
+ auto_start_machines = true
12
+
13
+ [env]
14
+ PORT = "8080"
15
+ NODE_ENV = "production"
@@ -0,0 +1,15 @@
1
+ # Render blueprint — https://render.com/docs/blueprint-spec
2
+ # Push this repo to GitHub, then in Render: New → Blueprint → pick the repo.
3
+ # Render builds the Dockerfile, gives you HTTPS + a domain, and runs it.
4
+ services:
5
+ - type: web
6
+ name: volt-app
7
+ runtime: docker
8
+ plan: starter
9
+ envVars:
10
+ - key: VOLT_ADDONS
11
+ sync: false # set your add-ons (e.g. "db,auth") in the dashboard
12
+ # Add the rest in the dashboard as needed:
13
+ # DB_DRIVER, MONGODB_URI / DATABASE_URL,
14
+ # MEDIA_DRIVER, S3_ENDPOINT/S3_REGION/S3_BUCKET/S3_KEY/S3_SECRET,
15
+ # SMTP_URL, MAIL_FROM
@@ -0,0 +1,20 @@
1
+ # Volt app — production container. Runs on Render, Fly.io, Railway, DO App
2
+ # Platform, and any container host. They handle the server, DNS, and TLS; you
3
+ # just set config as env vars.
4
+ #
5
+ # Configure via the platform's env vars (NOT a committed .env):
6
+ # VOLT_ADDONS=db,auth,... DB_DRIVER=... MONGODB_URI / DATABASE_URL
7
+ # MEDIA_DRIVER=s3 S3_ENDPOINT/S3_REGION/S3_BUCKET/S3_KEY/S3_SECRET etc.
8
+ #
9
+ # Tip: run the local wizard first (`npm run dev`) so the add-on packages are
10
+ # saved into package.json; commit package.json, then deploy and set the same
11
+ # config as env vars here. NODE_ENV=production makes the app boot straight up
12
+ # (no setup wizard).
13
+ FROM node:22-alpine
14
+ WORKDIR /app
15
+ ENV NODE_ENV=production
16
+ COPY package*.json ./
17
+ RUN npm install --omit=dev
18
+ COPY . .
19
+ EXPOSE 8080
20
+ CMD ["node", "server.js"]
@@ -0,0 +1 @@
1
+ web: node server.js
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ .git
3
+ .env
4
+ *.log
5
+ npm-debug.log*
6
+ .DS_Store
@@ -0,0 +1,15 @@
1
+ # Fly.io — run `fly launch` (it uses the Dockerfile), then set config:
2
+ # fly secrets set VOLT_ADDONS=db,auth DB_DRIVER=mongodb MONGODB_URI=...
3
+ app = "volt-app"
4
+
5
+ [build]
6
+
7
+ [http_service]
8
+ internal_port = 8080
9
+ force_https = true
10
+ auto_stop_machines = true
11
+ auto_start_machines = true
12
+
13
+ [env]
14
+ PORT = "8080"
15
+ NODE_ENV = "production"
@@ -0,0 +1,15 @@
1
+ # Render blueprint — https://render.com/docs/blueprint-spec
2
+ # Push this repo to GitHub, then in Render: New → Blueprint → pick the repo.
3
+ # Render builds the Dockerfile, gives you HTTPS + a domain, and runs it.
4
+ services:
5
+ - type: web
6
+ name: volt-app
7
+ runtime: docker
8
+ plan: starter
9
+ envVars:
10
+ - key: VOLT_ADDONS
11
+ sync: false # set your add-ons (e.g. "db,auth") in the dashboard
12
+ # Add the rest in the dashboard as needed:
13
+ # DB_DRIVER, MONGODB_URI / DATABASE_URL,
14
+ # MEDIA_DRIVER, S3_ENDPOINT/S3_REGION/S3_BUCKET/S3_KEY/S3_SECRET,
15
+ # SMTP_URL, MAIL_FROM
@@ -423,9 +423,13 @@ async function startStudio() {
423
423
 
424
424
  // --- gate: studio / setup (first run, --edit) / the app ---
425
425
  const editMode = process.argv.includes("--edit") || process.argv.includes("-e");
426
+ // In production / on a PaaS there's no interactive wizard: config comes from the
427
+ // platform's env vars (a Dockerfile sets NODE_ENV=production). Only fall back to
428
+ // the first-run wizard when nothing is configured and we're not in production.
429
+ const configured = fs.existsSync(ENV_PATH) || process.env.VOLT_ADDONS != null || process.env.NODE_ENV === "production";
426
430
  if (process.argv.includes("--studio")) {
427
431
  startStudio();
428
- } else if (editMode || !fs.existsSync(ENV_PATH)) {
432
+ } else if (editMode || !configured) {
429
433
  startSetup();
430
434
  } else {
431
435
  loadEnv();