forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #118
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(user/password) in plain text. Anyone with access to the repository can read these credentials.Work
.env.examplefile with placeholder values forPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DB.docker-compose.ymlto reference these variables using${POSTGRES_USER}syntax instead of hardcoded strings..envto.gitignore(if not already present)..env.exampleto.envbefore runningdocker compose up.Acceptance Criteria
docker-compose.ymlcontains no literal credential strings.docker compose upworks correctly after creating.envfrom.env.example..envis listed in.gitignore.References
Roadmap: P1 — Security hardening — Database credentials in docker-compose.yml.
This issue has already been resolved. The
docker-compose.ymlnow uses environment variable references (${POSTGRES_USER},${POSTGRES_PASSWORD},${POSTGRES_DB}) instead of hardcoded credentials. Users set these via a.envfile (documented in.env.example).Resolved by prior security hardening work. Closing.