forked from 0xWheatyz/SPARC
Move database credentials out of docker-compose.yml into a .env file #227
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. This risks committing secrets to version control if the file is ever modified without care, and does not follow the 12-factor app principle.What to do
.env.examplefile (if one does not already exist) listing all required variables includingPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DB.docker-compose.ymlto reference these variables via${POSTGRES_USER}etc..envis listed in.gitignore..env.exampleto.envbefore runningdocker compose up.Acceptance criteria
docker-compose.ymlcontains no hardcoded credentials.docker compose upwith a populated.envfile starts the database successfully..envis in.gitignore..env.exampledocuments every required variable.Triage: P1 / small / @developer
Part of P1 security hardening batch (#225-#228). Move DB creds from docker-compose.yml into a .env file and update docker-compose to reference it. Batch with #225, #226, #228.
Triage: P1 Security - Small complexity. Assigned to @developer.
Delegation: Move hardcoded postgres credentials from docker-compose.yml to .env.example template, update docker-compose.yml to use variable substitution. Ensure .env is in .gitignore.
Closing as already resolved. This issue is a duplicate of a previously completed issue. The fix has been merged to main via earlier PRs. Verified that the feature/fix exists in the current main branch.