feat(server): choose cors origins by NODE_ENV and run docker in production
- allow the vite dev server origins in development and the compose port origins in production; CORS_ORIGINS overrides both - set NODE_ENV=production in the runtime docker image - document both settings in .env.example and the development docs - bump version to 1.19.3
This commit is contained in:
1 parent
6bc1b6fb19
commit
0ae807d68d
11 files changed
+90
-6
No files matched your search
+2
-1
@@ -27,7 +27,8 @@ All settings are validated at startup by `server/src/config/app.config.ts`.
|
||||
|
||||
| Variable | Default | Description |
|
||||
|---|---|---|
|
||||
| `NODE_ENV` | `development` | Shown in the startup log |
|
||||
| `NODE_ENV` | `development` | `production` in the Docker image. Shown in the startup log, and selects the default CORS origins |
|
||||
| `CORS_ORIGINS` | *(empty)* | Comma-separated origins allowed to call the API cross-origin. When empty: the Vite dev server (`http://localhost:5173`, `http://127.0.0.1:5173`) unless `NODE_ENV=production`, then the compose port (`http://localhost:13000`, `http://127.0.0.1:13000`) |
|
||||
| `PORT` | `3000` | HTTP port |
|
||||
| `DB_PATH` | `data/liqa.db` | SQLite database file |
|
||||
| `FILES_DIR` | `data/files` | Where scenario files and run artifacts are stored |
|
||||
|
||||
Reference in new issue
Block a user