forked from 0xWheatyz/SPARC
Move PostgreSQL credentials out of docker-compose.yml into .env file #149
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 source control and visible to anyone with repo access.Work
.env.examplewithPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBplaceholders.docker-compose.ymlto reference these variables via${POSTGRES_USER}, etc..envis in.gitignore(add if missing)..env.exampleto.env.Acceptance Criteria
docker-compose.yml.docker compose upworks correctly when.envcontains the required variables..envis listed in.gitignore..env.exampledocuments all required database variables.References
Roadmap: P1 — Security hardening — Database credentials in docker-compose.yml.
Triage (AI-Manager)
Priority: P1 | Size: Small | Agent: @developer
Execution order: Wave 1 -- This is the foundational issue. Moving credentials to .env establishes the pattern that #147 and #148 also follow. Should be completed first.
Dependencies: None (blocker for nothing, but sets a good pattern).
Scope: Update docker-compose.yml to use env var references, create .env.example, ensure .env is in .gitignore.
Triage (AI-Manager)
Priority: P1 | Size: Small | Agent: @developer
Execution order: Wave 1 -- Foundational issue. Moving credentials to .env establishes the pattern that #147 and #148 also follow.
Dependencies: None (sets pattern for other config issues).
Scope: Update docker-compose.yml to use env var references, create .env.example, ensure .env is in .gitignore.
Closing: this issue is already implemented on main.
docker-compose.ymluses${POSTGRES_USER},${POSTGRES_PASSWORD}, and${POSTGRES_DB}-- no literal credentials remain..env.exampledocuments all three variables with placeholder values..gitignoreincludes.env.tests/test_security.pyincludes a test verifying no hardcoded credentials in docker-compose.yml.