Skip to content

Commit ca58521

Browse files
committed
docs(docker): flag OS_SECRET_KEY / OS_AUTH_SECRET as required-in-production
Image-level verification of the 12.1 build against postgres showed the container refuses to boot without OS_SECRET_KEY (LocalCryptoProvider guards sys_secret/datasource credentials in production). The compose already passed these through but with empty defaults, so a bare `docker compose up` crashes mid-boot with no obvious hint. Add a header block + inline REQUIRED markers.
1 parent bac4d81 commit ca58521

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

docker/docker-compose.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# ===========================================================================
2+
# ⚠️ REQUIRED in production (image runs with NODE_ENV=production):
3+
# - OS_SECRET_KEY : 32-byte hex, stable across restarts/nodes. Without it
4+
# the container REFUSES TO START (LocalCryptoProvider
5+
# guards sys_secret / datasource credentials). It is NOT
6+
# auto-generated on purpose — a minted-then-lost key would
7+
# make every encrypted value undecryptable.
8+
# - OS_AUTH_SECRET : session signing secret; plugin-auth refuses a temporary
9+
# dev secret in production.
10+
# Generate each once and keep them: openssl rand -hex 32
11+
# Set them in a .env file next to this compose (or export in the shell):
12+
# OS_SECRET_KEY=... OS_AUTH_SECRET=...
13+
# ===========================================================================
114
services:
215
objectos:
316
build:
@@ -13,8 +26,8 @@ services:
1326
OS_PROJECT_ID: ${OS_PROJECT_ID:-}
1427
OS_ARTIFACT_FILE: ${OS_ARTIFACT_FILE:-/artifacts/objectstack.json}
1528
OS_BUSINESS_DB_URL: ${OS_BUSINESS_DB_URL:-file:/var/lib/objectos/data.db}
16-
OS_SECRET_KEY: ${OS_SECRET_KEY:-}
17-
OS_AUTH_SECRET: ${OS_AUTH_SECRET:-}
29+
OS_SECRET_KEY: ${OS_SECRET_KEY:-} # REQUIRED — empty = container won't boot (see header)
30+
OS_AUTH_SECRET: ${OS_AUTH_SECRET:-} # REQUIRED in production (see header)
1831
OS_CORS_ORIGIN: ${OS_CORS_ORIGIN:-}
1932
OS_CACHE_DIR: /var/cache/objectos
2033
PORT: 3000

0 commit comments

Comments
 (0)