forked from 0xWheatyz/SPARC
Replace hardcoded DB credentials in docker-compose.yml with .env file reference #41
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?
Problem
docker-compose.ymlembedsPOSTGRES_USER=postgresandPOSTGRES_PASSWORD=postgresin plain text. Any developer who commits a modified compose file or accidentally shares it leaks credentials. In production deployments, these defaults are frequently left unchanged.Task
docker-compose.ymlwith environment variable references (e.g.,${POSTGRES_USER},${POSTGRES_PASSWORD})..env.examplefile (if not already present) listing all required variables with placeholder values..envto.gitignoreif it is not already excluded.README.md: copy.env.exampleto.envand fill in secrets.Acceptance Criteria
docker compose upwithout a.envfile fails with a clear missing-variable error.docker compose upwith a properly populated.envstarts Postgres successfully..envis confirmed absent from git history and.gitignore.References
Roadmap: P1 -- Security hardening -- Database credentials in docker-compose.yml.
Closing: Already implemented in PR #27. docker-compose.yml now references environment variables (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB}) instead of hardcoded credentials.