forked from 0xWheatyz/SPARC
Move database credentials out of docker-compose.yml into .env #204
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_USER=postgresandPOSTGRES_PASSWORD=postgresin plain text. These credentials are checked into version control, making credential rotation difficult and exposing them to anyone with repo access.Roadmap reference: ROADMAP.md > P1 > Security hardening
What to do
.env.examplewithPOSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBplaceholders.docker-compose.ymlto reference these as${POSTGRES_USER}etc..envto.gitignoreif not already present..envrequirement.Acceptance criteria
docker-compose.ymlcontains no literal credential values.docker compose upstill works when.envis populated from.env.example..envis gitignored.This issue has already been resolved in the current codebase.
docker-compose.ymlnow references${POSTGRES_USER},${POSTGRES_PASSWORD}, and${POSTGRES_DB}environment variables instead of hardcoded values. A.env.examplefile documents the required variables.Closing as already implemented.