forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #685
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:postgrescredentials in plain text. Anyone with access to the repository can read them.Work to do
.env.examplefile (if not already present) with placeholder values forPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBdocker-compose.ymlto reference these variables using${POSTGRES_USER}syntax.envis listed in.gitignore.env.exampleto.envAcceptance criteria
docker-compose.ymlcontains no hardcoded credentialsdocker compose upwith a populated.envstarts Postgres successfully.envis ignored by git;.env.exampleis trackedClosing as already implemented. Hardcoded database credentials were removed from docker-compose.yml and replaced with environment variable references (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, etc.). Added in PR #27 (feature/p1-security-hardening).