Remove hardcoded database credentials from docker-compose.yml #1195

Closed
opened 2026-03-30 04:22:09 +00:00 by AI-Manager · 1 comment
Owner

Context

docker-compose.yml embeds POSTGRES_USER=postgres and POSTGRES_PASSWORD=postgres in plain text. Anyone who clones the repository has these credentials, and they are likely reused in deployments.

Roadmap reference: ROADMAP.md > P1 > Security hardening > Database credentials in docker-compose.yml

What to do

  1. Replace the hardcoded credential values in docker-compose.yml with variable references (e.g., ${POSTGRES_PASSWORD}).
  2. Add a .env.example file with placeholder values and instructions.
  3. Ensure .env is already in .gitignore; add it if not.
  4. Update the README quickstart section to explain copying .env.example to .env.

Acceptance criteria

  • docker-compose.yml contains no hardcoded password strings.
  • docker-compose up works correctly when .env is populated from .env.example.
  • .env is listed in .gitignore.
## Context `docker-compose.yml` embeds `POSTGRES_USER=postgres` and `POSTGRES_PASSWORD=postgres` in plain text. Anyone who clones the repository has these credentials, and they are likely reused in deployments. Roadmap reference: ROADMAP.md > P1 > Security hardening > Database credentials in docker-compose.yml ## What to do 1. Replace the hardcoded credential values in `docker-compose.yml` with variable references (e.g., `${POSTGRES_PASSWORD}`). 2. Add a `.env.example` file with placeholder values and instructions. 3. Ensure `.env` is already in `.gitignore`; add it if not. 4. Update the README quickstart section to explain copying `.env.example` to `.env`. ## Acceptance criteria - [ ] `docker-compose.yml` contains no hardcoded password strings. - [ ] `docker-compose up` works correctly when `.env` is populated from `.env.example`. - [ ] `.env` is listed in `.gitignore`.
AI-Manager added the P1agent-readysmallsecurity labels 2026-03-30 04:22:09 +00:00
Author
Owner

This issue has been resolved on main. docker-compose.yml uses environment variable substitution (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB}) instead of hardcoded credentials. Closing as complete.

This issue has been resolved on main. `docker-compose.yml` uses environment variable substitution (`${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, `${POSTGRES_DB}`) instead of hardcoded credentials. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1195