refactor: rename environment variables and update related configurations

- Updated environment variable names from JERAPAH_FLOW_* to JFLOW_* for consistency and clarity.
- Adjusted database path handling in knexfile.js to reflect the new variable naming.
- Modified logging and retention days configurations to use the new variable names.
- Ensured that the JWT secret and secrets key checks are aligned with the new naming convention.
- Updated workflow test storage prefix to match the new project branding.

This refactor enhances the clarity of environment variable usage and aligns with the project's rebranding efforts.
This commit is contained in:
2026-08-16 22:44:19 +07:00
parent e55f93e4d2
commit 56a5d0e7d2
7 changed files with 19 additions and 25 deletions
+7 -7
View File
@@ -61,12 +61,12 @@ Optional `script.meta.reads = "ctx"` documents expression hosts. `meta.input` /
| Variable | Default | Notes |
|---|---|---|
| `JERAPAH_FLOW_JWT_SECRET` | `scrunner-dev-secret` (dev only) | **Required in production**. `SCRUNNER_JWT_SECRET` is still accepted. |
| `JERAPAH_FLOW_SECRETS_KEY` | `scrunner-dev-secrets-key` (dev only) | Master key for named secrets. **Required in production**. Changing it makes existing secrets unreadable. 64 hex chars are used as a raw AES-256 key; any other string is derived with scrypt. `SCRUNNER_SECRETS_KEY` is still accepted. |
| `JERAPAH_FLOW_DB_PATH` | `packages/server/data/jerapah-flow.db` (or existing `scrunner.db`) | SQLite file. `SCRUNNER_DB_PATH` is still accepted. |
| `JERAPAH_FLOW_LOG_LEVEL` | `debug` | Pino level |
| `JERAPAH_FLOW_RETENTION_DAYS` | `30` | Run history prune |
| `JERAPAH_FLOW_CORS_ORIGIN` | `http://localhost:5173` | Vite origin in dev |
| `JFLOW_JWT_SECRET` | `jflow-dev-secret` (dev only) | **Required in production**. |
| `JFLOW_SECRETS_KEY` | `jflow-dev-secrets-key` (dev only) | Master key for named secrets. **Required in production**. Changing it makes existing secrets unreadable. 64 hex chars are used as a raw AES-256 key; any other string is derived with scrypt. |
| `JFLOW_DB_PATH` | `packages/server/data/jerapah-flow.db` | SQLite file. |
| `JFLOW_LOG_LEVEL` | `debug` | Pino level |
| `JFLOW_RETENTION_DAYS` | `30` | Run history prune |
| `JFLOW_CORS_ORIGIN` | `http://localhost:5173` | Vite origin in dev |
| `PORT` | `9000` | HTTP port |
| `NODE_ENV` | — | Set `production` for secure cookies |
@@ -75,7 +75,7 @@ Optional `script.meta.reads = "ctx"` documents expression hosts. `meta.input` /
```bash
pnpm install
pnpm build
JERAPAH_FLOW_JWT_SECRET=... JERAPAH_FLOW_SECRETS_KEY=... NODE_ENV=production pnpm start
JFLOW_JWT_SECRET=... JFLOW_SECRETS_KEY=... NODE_ENV=production pnpm start
```
The server serves `packages/web/dist` when that folder exists.