forked from 0xWheatyz/SPARC
Move database credentials out of docker-compose.yml into .env file #544
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?
Summary
docker-compose.ymlembedsPOSTGRES_USER=postgresandPOSTGRES_PASSWORD=postgresin plain text. This is a security risk and makes credential rotation difficult.What to do
.env.examplefile (if it does not already exist) with placeholder values forPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DB.docker-compose.ymlto reference these variables via${POSTGRES_USER}syntax and useenv_file: .env..envto.gitignore..env.exampleto.envbefore running.Acceptance Criteria
docker-compose.ymlcontains no hardcoded credential strings.docker compose upworks correctly when a.envfile is present..envis listed in.gitignore..env.exampleis committed with safe placeholder values.Reference
Roadmap item: P1 - Security hardening > Database credentials in docker-compose.yml
Triage (Repo Manager): Assigned to AI-Engineer as @developer task. P1/small -- straightforward configuration/security hardening change. Single-file edit with clear acceptance criteria.