forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #1594
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
The compose file embeds
postgres:postgrescredentials in plain text. This is insecure and leads to credential leakage if the repo is ever shared or mirrored.What to do
POSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBinto a.envfile referenced by docker-composeenv_file: .envor variable substitution (${POSTGRES_PASSWORD}) indocker-compose.yml.envto.gitignore.env.examplewith placeholder valuesAcceptance criteria
docker-compose.ymlcontains no hardcoded credentials.env.exampledocuments all required secrets.envis in.gitignoredocker compose upstill works correctly with a populated.envRef: ROADMAP.md P1 - Security hardening
This issue is already resolved in main.
docker-compose.ymluses${POSTGRES_USER},${POSTGRES_PASSWORD}, and${POSTGRES_DB}environment variable substitution throughout. No hardcoded database credentials remain.