forked from 0xWheatyz/SPARC
Move database credentials out of docker-compose.yml into .env / Docker secrets #1498
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Roadmap item: P1 Security hardening
docker-compose.ymlembedspostgres:postgrescredentials in plain text. Anyone with read access to the repo gets production database credentials.What to do
POSTGRES_USER,POSTGRES_PASSWORD, andDATABASE_URLvalues fromdocker-compose.yml.${POSTGRES_USER}) sourced from an.envfile..env.examplewith placeholder values and instructions..envto.gitignoreif not already present.README.mdor setup docs to explain the required.envsetup step.Acceptance criteria
docker-compose.ymlin plain text.env.examplecontains all required variable names with safe placeholder values.envis listed in.gitignoredocker compose upstill works when a valid.envis present[Repo Manager] This issue is already resolved.
docker-compose.ymlreads database credentials from environment variables (${POSTGRES_USER},${POSTGRES_PASSWORD},${POSTGRES_DB}) rather than hardcoding them. The JWT secret is also templated. Closing as complete.