forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #1620
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
Roadmap item: P1 Security hardening
docker-compose.ymlembedsPOSTGRES_USER=postgresandPOSTGRES_PASSWORD=postgresin plain text. Any developer who commits with these values or copies the file leaks credentials.What to do
.env.examplefile (if it does not exist) containingPOSTGRES_USER=postgresandPOSTGRES_PASSWORD=changemewith clear comments.docker-compose.ymlto reference variables:POSTGRES_PASSWORD=${POSTGRES_PASSWORD}andPOSTGRES_USER=${POSTGRES_USER}..envis listed in.gitignore.README.md(ordocs/) with a setup step: "Copy.env.exampleto.envand set secure values before runningdocker compose up."Acceptance criteria
docker-compose.ymlcontains no literal credential values.docker compose configresolves correctly when.envis present..envis gitignored..env.exampleexists and documents all required variables.This issue has been resolved by previously merged PRs. The feature is already implemented in the codebase on main.
Closing as already resolved.