Bebe MomentBebe Moment

Environment variables reference

Always inject secrets as runtime env (compose environment: / Synology Container Manager environment). The root .env is gitignored and dockerignored, so it is not baked into the image.

Required

VariableDescription
DATABASE_URLPostgres connection string (postgres://bebe:<pw>@postgres:5432/bebe).
REDIS_URLQueue connection string (redis://redis:6379).
SECRET_KEYSession/encryption key. 32+ bytes (openssl rand -hex 32).
PUBLIC_URLPublic external URL (https://bebe.example.com). The media base URL also falls back to this.

Media-service secrets (required)

Used by the web and media processes inside the app image to authenticate and sign with each other. If missing, photo pages return 500.

VariableDescription
MEDIA_SERVICE_TOKENweb → media bearer token. 32+ bytes (openssl rand -hex 32).
MEDIA_JWT_SECRETSigning key for file-serve / upload tokens. 32+ bytes (generated separately).

DB role split

The entrypoint creates the bebe_web / bebe_media roles with these passwords. web touches only the public schema, media only the media schema.

VariableDescription
DATABASE_URL_WEBFor the web process (bebe_web role).
DATABASE_URL_MEDIAFor the media process (bebe_media role).
BEBE_WEB_DB_PASSWORDPassword for the bebe_web role.
BEBE_MEDIA_DB_PASSWORDPassword for the bebe_media role.

Media base URL (usually unset)

VariableDescription
MEDIA_INTERNAL_URLInternal media address inside the container. Single container, so http://localhost:3001.
MEDIA_PUBLIC_BASE_URLBrowser-facing media base. Usually unset → falls back to PUBLIC_URL. Do not put an unexposed port like :3001.
NEXT_PUBLIC_MEDIA_BASE_URLSame as above. Unset (or equal to PUBLIC_URL) is correct.

Optional

VariableDefaultDescription
PORT3000Exposed port. Avoids Synology's 5000/5001.
TZAsia/SeoulQuiet hours / digest / memory pushes use container-local time, so set the family timezone.
PUID / PGID1000 (DSM example 1026/100)Volume ownership. On Synology, check with id <user>.
ADMIN_USER_EMAILInstance admin email(s) (comma-separated). In the single-family model the first owner is already the admin.
STORAGE_MODElocallocal or s3.
STORAGE_PATH/dataLocal storage path (the mounted volume).
STORAGE_S3_*Endpoint / bucket / keys when using S3/MinIO.
BACKUP_DIR/backupsWhere app backup bundles are written.
FACE_ML_URLhttp://ml:8000Face-recognition ML sidecar address (opt-in). If the ml container isn't running, it's never called.
LOG_LEVELinfopino log level.

Runtime settings (OIDC, SMTP, retention, etc.) are configured in the in-app admin UI, not via env. If a value is provided via env, the UI is locked.