forked from 0xWheatyz/SPARC
Move database credentials out of docker-compose.yml into .env file #1402
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. These credentials are committed to version control and will be used as-is by anyone who clones and runs the project.What to do
.env.examplefile with placeholder values for all required secrets (POSTGRES_USER,POSTGRES_PASSWORD,JWT_SECRET, etc.).docker-compose.ymlto reference these values via${VAR}substitution or a top-levelenv_file: .envdirective..env(but NOT.env.example) to.gitignore..envfrom.env.example.Acceptance criteria
docker-compose.yml..envis git-ignored;.env.exampleis committed with safe placeholder values.docker compose upstill works after following the documented setup steps.Triage: Already resolved in main.
docker-compose.ymlalready references${POSTGRES_USER},${POSTGRES_PASSWORD}, and${POSTGRES_DB}from environment variables..env.exampledocuments these with secure defaults. No hardcoded credentials remain in docker-compose.yml. Closing as complete.