forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #800
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?
Background
docker-compose.ymlembedspostgres:postgrescredentials in plain text. Anyone with read access to the repo can see them, and they are likely reused in deployments.What to do
.env.examplefile listing all required variables includingPOSTGRES_USER,POSTGRES_PASSWORD,POSTGRES_DBdocker-compose.ymlto reference${POSTGRES_USER},${POSTGRES_PASSWORD}, etc. via env-var interpolation.envto.gitignoreif not already present.envfrom.env.exampleAcceptance criteria
docker-compose.ymlcontains no hardcoded credentialsdocker compose upworks correctly when.envis populated from.env.example.envis listed in.gitignoreReferences
Roadmap item: P1 Security hardening -- Database credentials in docker-compose.yml