forked from 0xWheatyz/SPARC
Replace hardcoded database credentials in docker-compose.yml with .env file #1267
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. Anyone with repo read access learns the database password, and rotating it requires editing the compose file.Roadmap reference: P1 - Security hardening
What to do
POSTGRES_USER,POSTGRES_PASSWORD, andPOSTGRES_DBinto a.envfile (already gitignored or to be gitignored).docker-compose.ymlas${POSTGRES_USER}etc..env.examplewith placeholder values and instructions.Acceptance criteria
docker-compose.ymlcontains no literal credential strings..env.exampledocuments every required variable.docker compose upstill works with the example values..envis listed in.gitignore.Triage: Already Implemented
This feature is fully implemented in the current codebase on
main:docker-compose.ymluses${POSTGRES_USER},${POSTGRES_PASSWORD}, and${POSTGRES_DB}environment variable references throughout (no hardcoded credentials).DATABASE_URLis constructed from these variables:postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}..env.exampledocuments all required variables.All acceptance criteria are met. Closing as completed.