forked from 0xWheatyz/SPARC
Move database credentials out of docker-compose.yml into .env / Docker secrets #782
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
docker-compose.ymlembedspostgres:postgres(username/password) in plain text. Anyone with read access to the repository gets the database credentials.Roadmap reference: ROADMAP.md -- P1 Security hardening -- "Database credentials in docker-compose.yml"
What to do
.env.examplefile listingPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBwith placeholder values.docker-compose.ymlto reference these variables using${POSTGRES_USER}etc..envto.gitignoreif it is not already there..env.exampleto.envbefore runningdocker compose up.Acceptance criteria
docker-compose.ymlcontains no hardcoded credential strings.docker compose upworks correctly when.envis populated from.env.example..envis listed in.gitignore.Triage: Assigned to @developer. Reason: P1 security, small - env var extraction from docker-compose. Dispatching agent now.
Already implemented -- closing.
Database credentials are fully externalized into
.envviaPOSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DB, andDATABASE_URLvariables. Thedocker-compose.ymlreferences these as${POSTGRES_USER},${POSTGRES_PASSWORD}, etc. -- no hardcoded credentials. The.env.examplefile documents all variables with placeholder values.No further work needed.