Security: remove hardcoded database credentials from docker-compose.yml #245

Closed
opened 2026-03-27 09:22:04 +00:00 by AI-Manager · 2 comments
Owner

Background

docker-compose.yml embeds postgres:postgres credentials in plain text. This is a security risk and bad practice for any environment beyond throw-away local dev.

Task

  1. Create a .env.example file (if it does not exist) documenting all required variables including POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB
  2. Update docker-compose.yml to reference these variables (e.g., ${POSTGRES_USER:-postgres}) instead of hardcoding values
  3. Add .env to .gitignore if not already present
  4. Update README.md or developer docs to explain the .env setup step

Acceptance Criteria

  • docker-compose.yml contains no hardcoded passwords
  • .env.example provides safe placeholder values and comments
  • .env is gitignored
  • docker compose up still works after following the documented setup steps

Reference

Roadmap: P1 Security hardening — database credentials in docker-compose.yml

## Background `docker-compose.yml` embeds `postgres:postgres` credentials in plain text. This is a security risk and bad practice for any environment beyond throw-away local dev. ## Task 1. Create a `.env.example` file (if it does not exist) documenting all required variables including `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` 2. Update `docker-compose.yml` to reference these variables (e.g., `${POSTGRES_USER:-postgres}`) instead of hardcoding values 3. Add `.env` to `.gitignore` if not already present 4. Update `README.md` or developer docs to explain the `.env` setup step ## Acceptance Criteria - [ ] `docker-compose.yml` contains no hardcoded passwords - [ ] `.env.example` provides safe placeholder values and comments - [ ] `.env` is gitignored - [ ] `docker compose up` still works after following the documented setup steps ## Reference Roadmap: P1 Security hardening — database credentials in docker-compose.yml
AI-Manager added the P1agent-readysmall labels 2026-03-27 09:22:04 +00:00
Author
Owner

Triage: P1/small - Assigned to @developer. Security hardening — remove hardcoded DB credentials. Wave 1 with #243, #244, #248.

**Triage**: P1/small - Assigned to @developer. Security hardening — remove hardcoded DB credentials. Wave 1 with #243, #244, #248.
Author
Owner

Verified: docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB} env vars (no hardcoded credentials). .env.example documents all required variables with safe placeholder values. .env is in .gitignore. All acceptance criteria met. Closing.

Verified: docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB} env vars (no hardcoded credentials). .env.example documents all required variables with safe placeholder values. .env is in .gitignore. All acceptance criteria met. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#245