Production checks
With AVACOM_ENV=production, which docker-compose.prod.yml sets, every service checks its settings when it starts.
It refuses to start if any check fails and lists every problem at once. Outside production the same checks only log
a warning.
The API
Section titled “The API”The backend stops with “Refusing to start with AVACOM_ENV=production:” and one line per problem:
| Problem | Fix |
|---|---|
| AUTH_TYPE is NOAUTH: anyone who can reach the API is an administrator. | Set AUTH_TYPE=DB or OAUTH2PROXY. For an isolated demo only, AVACOM_ALLOW_NO_AUTH=true |
| AVACOM_JWT_SECRET is missing or weak (needs at least 32 random characters). | Generate it with scripts/generate_secrets.py |
| AVACOM_DEFAULT_PASSWORD is weak (needs at least 12 characters) | Use a longer one, or leave it unset to get a random password |
| AVACOM_OAUTH2_PROXY_SHARED_SECRET is missing or weak | With SSO: generate it, and give nginx and the frontend the same value |
| PUSHER_APP_SECRET (realtime) is weak (needs at least 32 random characters). | Generate it |
| AVACOM_CORS_ALLOWED_ORIGINS is ‘*’ | List the origins that may call the API, for example https://avacom.bank.local |
| AVACOM_FIX_SIMULATE=true makes approved fixes look done without running anything | Remove it: it is for dummy data only |
| AVACOM_FIX_FOUR_EYES=false lets the person who prepared a fix approve it alone. | Remove it |
| AVACOM_REPORT_FOUR_EYES=false lets the author of an incident report approve it alone. | Remove it |
| AVACOM_FIX_SSH_WITHOUT_SIGN_IN=true runs approved fixes over SSH without sign-in. | Remove it |
| AVACOM_IMPERSONATION_ENABLED=true lets admin API keys act as any user | Remove it |
A secret counts as weak when it is shorter than 32 characters or is one of the known example values.
Production also hides the API’s own reference at /docs (turn it back on with AVACOM_ENABLE_API_DOCS=true), and
answers unexpected errors without their details. In docker-compose.prod.yml the containers also run without Linux
capabilities and with no-new-privileges, restart by themselves, and only Caddy is published.
The frontend
Section titled “The frontend”“NEXTAUTH_SECRET is not set; refusing to start with AVACOM_ENV=production”. Generate it with
scripts/generate_secrets.py.
Live updates
Section titled “Live updates”“REALTIME_APP_ID, REALTIME_APP_KEY and REALTIME_APP_SECRET are required”, or “REALTIME_APP_SECRET is weak (needs at least 32 random characters)”. Generate the secret.
Checking a settings file before you start
Section titled “Checking a settings file before you start”python scripts/generate_secrets.py --missing-from .env.prodprints only the secrets the file lacks. An empty answer means every generated secret is there.