forked from 0xWheatyz/SPARC
Remove hardcoded database credentials from docker-compose.yml #639
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:postgresin plain text. Credentials should not live in version-controlled compose files.What to do
POSTGRES_USER,POSTGRES_PASSWORD, and related values fromdocker-compose.yml.envfile instead using theenv_filedirective or Docker Compose variable interpolation (${POSTGRES_PASSWORD}).env.examplefile (if it does not already exist) with placeholder values and documentation.envis listed in.gitignoreAcceptance criteria
docker-compose.ymlcontains no hardcoded database credentialsdocker-compose upworks correctly when.envis populated from.env.example.envis ignored by git.env.exampledocuments all required variablesClosing as already resolved.
docker-compose.ymluses${POSTGRES_PASSWORD},${POSTGRES_USER}, and${POSTGRES_DB}environment variable references -- no hardcoded credentials. Users set values via.envfile per the documented workflow.