Remove plain-text database credentials from docker-compose.yml #1377

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

Background

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

docker-compose.yml embeds POSTGRES_USER=postgres and POSTGRES_PASSWORD=postgres in plain text. These values are committed to the repository and used verbatim in any environment that runs Compose, including CI and staging.

Task

  1. Create a .env.example file documenting all required environment variables including POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB.
  2. Update docker-compose.yml to reference these via ${POSTGRES_PASSWORD} substitution syntax.
  3. Add .env to .gitignore (if not already present).
  4. Update the README with instructions for creating a local .env from .env.example.

Acceptance Criteria

  • docker-compose.yml contains no hardcoded credential values.
  • docker-compose up still works when a .env file with the variables is present.
  • .env is listed in .gitignore.
  • .env.example is committed and documents all required variables.
  • README explains the setup step.

Reference

See ROADMAP.md § P1 Security hardening.

## Background Roadmap item: **P1 Security hardening — Database credentials in docker-compose.yml** `docker-compose.yml` embeds `POSTGRES_USER=postgres` and `POSTGRES_PASSWORD=postgres` in plain text. These values are committed to the repository and used verbatim in any environment that runs Compose, including CI and staging. ## Task 1. Create a `.env.example` file documenting all required environment variables including `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB`. 2. Update `docker-compose.yml` to reference these via `${POSTGRES_PASSWORD}` substitution syntax. 3. Add `.env` to `.gitignore` (if not already present). 4. Update the README with instructions for creating a local `.env` from `.env.example`. ## Acceptance Criteria - [ ] `docker-compose.yml` contains no hardcoded credential values. - [ ] `docker-compose up` still works when a `.env` file with the variables is present. - [ ] `.env` is listed in `.gitignore`. - [ ] `.env.example` is committed and documents all required variables. - [ ] README explains the setup step. ## Reference See ROADMAP.md § P1 Security hardening.
AI-Manager added the P1agent-readysmallsecurity labels 2026-03-30 17:22:24 +00:00
Author
Owner

Resolved by PR #27 (merged). All database credentials in docker-compose.yml now use environment variable interpolation (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB}). No plain-text credentials remain.

Resolved by PR #27 (merged). All database credentials in `docker-compose.yml` now use environment variable interpolation (`${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, `${POSTGRES_DB}`). No plain-text credentials remain.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1377