feat(cli): add production workspace command
This commit is contained in:
@@ -36,6 +36,7 @@ Every command accepts an optional `[app-dir]` (defaults to `.`). Commands that r
|
||||
| `wrnexus workspace <name>` | Scaffold a monorepo (`apps/*` + shared `packages/*`). |
|
||||
| `wrnexus workspace add <name>` | Add and register an app in the current workspace. |
|
||||
| `wrnexus gateway [--port=3000]` | Serve every workspace app behind one port, routed by domain. |
|
||||
| `wrnexus production [workspace-dir]` | Build, migrate, and serve every workspace app in production. |
|
||||
| `wrnexus generate <type> <name>` | Scaffold a `page` \| `component` \| `api` \| `schema`. |
|
||||
| `wrnexus generate routes` | Regenerate the typed routes file (`app/routes.gen.ts`). |
|
||||
| `wrnexus generate docker` | Scaffold `Dockerfile`, `.dockerignore`, and `docker-compose.yml`. |
|
||||
@@ -168,6 +169,17 @@ wrnexus workspace acme
|
||||
wrnexus gateway --port=3000
|
||||
```
|
||||
|
||||
For a complete production start, use the first-class workspace orchestrator:
|
||||
|
||||
```bash
|
||||
wrnexus production --host=0.0.0.0 --port=3000
|
||||
```
|
||||
|
||||
It builds every registered app, applies default and named-database SQL migrations
|
||||
when present, and starts the production gateway only after preparation succeeds.
|
||||
Use `--prepare-only`, `--no-build`, or `--no-migrate` when deployment stages are
|
||||
managed separately; `--environment=<name>` selects another workspace environment.
|
||||
|
||||
From a workspace root, add and register another app in one command:
|
||||
|
||||
```bash
|
||||
|
||||
+11
-11
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/cli",
|
||||
"version": "0.2.63",
|
||||
"version": "0.2.64",
|
||||
"type": "module",
|
||||
"description": "@wrnexus/cli — part of the WrNexus framework.",
|
||||
"license": "MIT",
|
||||
@@ -28,16 +28,16 @@
|
||||
"wrnexus": "./dist/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@wrnexus/core": "^0.2.63",
|
||||
"@wrnexus/router": "^0.2.63",
|
||||
"@wrnexus/csr": "^0.2.63",
|
||||
"@wrnexus/compiler": "^0.2.63",
|
||||
"@wrnexus/styles": "^0.2.63",
|
||||
"@wrnexus/dev-server": "^0.2.63",
|
||||
"@wrnexus/ui": "^0.2.63",
|
||||
"@wrnexus/validation": "^0.2.63",
|
||||
"@wrnexus/i18n": "^0.2.63",
|
||||
"@wrnexus/db": "^0.2.63"
|
||||
"@wrnexus/core": "^0.2.64",
|
||||
"@wrnexus/router": "^0.2.64",
|
||||
"@wrnexus/csr": "^0.2.64",
|
||||
"@wrnexus/compiler": "^0.2.64",
|
||||
"@wrnexus/styles": "^0.2.64",
|
||||
"@wrnexus/dev-server": "^0.2.64",
|
||||
"@wrnexus/ui": "^0.2.64",
|
||||
"@wrnexus/validation": "^0.2.64",
|
||||
"@wrnexus/i18n": "^0.2.64",
|
||||
"@wrnexus/db": "^0.2.64"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
Reference in New Issue
Block a user