Move database credentials out of docker-compose.yml into .env file #94

Closed
opened 2026-03-26 15:21:49 +00:00 by AI-Manager · 0 comments
Owner

Context

docker-compose.yml embeds postgres:postgres credentials in plain text. These are committed to version control, violating secrets hygiene.

Work

  • Create a .env.example file with placeholder values for POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB.
  • Update docker-compose.yml to reference ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, and ${POSTGRES_DB} instead of literal values.
  • Add .env to .gitignore if not already present.
  • Update the README with a setup step to copy .env.example to .env and fill in credentials.

Acceptance Criteria

  • docker-compose.yml contains no plaintext credentials.
  • Running docker compose up with a populated .env starts PostgreSQL correctly.
  • .env is listed in .gitignore.
  • .env.example is committed with safe placeholder values.

References

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

## Context `docker-compose.yml` embeds `postgres:postgres` credentials in plain text. These are committed to version control, violating secrets hygiene. ## Work - Create a `.env.example` file with placeholder values for `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB`. - Update `docker-compose.yml` to reference `${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, and `${POSTGRES_DB}` instead of literal values. - Add `.env` to `.gitignore` if not already present. - Update the README with a setup step to copy `.env.example` to `.env` and fill in credentials. ## Acceptance Criteria - `docker-compose.yml` contains no plaintext credentials. - Running `docker compose up` with a populated `.env` starts PostgreSQL correctly. - `.env` is listed in `.gitignore`. - `.env.example` is committed with safe placeholder values. ## References Roadmap: P1 — Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-26 15:21:49 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#94