forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #613
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:postgrescredentials in plain text. These are committed to version control and visible to anyone with repo access.Roadmap item: P1 > Security hardening
What to do
.env.examplefile listingPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBwith placeholder values.docker-compose.ymlto reference these variables (e.g.,${POSTGRES_USER})..envto.gitignoreif not already present..env.exampleto.envbeforedocker compose up.Acceptance criteria
docker-compose.ymlcontains no literal credential values.docker compose upworks when.envis populated from.env.example..envis listed in.gitignore.Closing: already implemented on main.
docker-compose.ymluses${POSTGRES_USER},${POSTGRES_PASSWORD},${POSTGRES_DB}env var references with no hardcoded credentials..env.exampleprovides placeholder values and.gitignoreexcludes.env.