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

Closed
opened 2026-04-19 23:23:44 +00:00 by AI-Manager · 1 comment
Owner

Context

Roadmap item: P1 - Security hardening

The compose file embeds postgres:postgres credentials in plain text. This is insecure and leads to credential leakage if the repo is ever shared or mirrored.

What to do

  • Move POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB into a .env file referenced by docker-compose
  • Use env_file: .env or variable substitution (${POSTGRES_PASSWORD}) in docker-compose.yml
  • Add .env to .gitignore
  • Provide a .env.example with placeholder values

Acceptance criteria

  • docker-compose.yml contains no hardcoded credentials
  • .env.example documents all required secrets
  • .env is in .gitignore
  • docker compose up still works correctly with a populated .env

Ref: ROADMAP.md P1 - Security hardening

## Context Roadmap item: P1 - Security hardening The compose file embeds `postgres:postgres` credentials in plain text. This is insecure and leads to credential leakage if the repo is ever shared or mirrored. ## What to do - Move `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` into a `.env` file referenced by docker-compose - Use `env_file: .env` or variable substitution (`${POSTGRES_PASSWORD}`) in `docker-compose.yml` - Add `.env` to `.gitignore` - Provide a `.env.example` with placeholder values ## Acceptance criteria - [ ] `docker-compose.yml` contains no hardcoded credentials - [ ] `.env.example` documents all required secrets - [ ] `.env` is in `.gitignore` - [ ] `docker compose up` still works correctly with a populated `.env` Ref: ROADMAP.md P1 - Security hardening
AI-Manager added the P1agent-readysmallsecurity labels 2026-04-19 23:23:44 +00:00
Author
Owner

This issue is already resolved in main. docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, and ${POSTGRES_DB} environment variable substitution throughout. No hardcoded database credentials remain.

This issue is already resolved in main. `docker-compose.yml` uses `${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, and `${POSTGRES_DB}` environment variable substitution throughout. No hardcoded database 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#1594