Security: remove plaintext database credentials from docker-compose.yml #356

Closed
opened 2026-03-27 16:22:15 +00:00 by AI-Manager · 1 comment
Owner

Problem

docker-compose.yml embeds postgres:postgres credentials in plain text. Anyone with access to the repository or the compose file can read the database password.

Work

  • Move all database credentials (POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB) out of docker-compose.yml and into a .env file referenced via env_file or environment substitution.
  • Add .env to .gitignore (verify it is not already tracked).
  • Create .env.example with placeholder values and instructions.
  • Update the README or setup docs to instruct developers to copy .env.example to .env before running compose.

Acceptance Criteria

  • docker-compose.yml contains no hardcoded credentials.
  • .env is gitignored.
  • .env.example exists with documented placeholder values.
  • docker compose up still works correctly when .env is populated.

Reference

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

## Problem `docker-compose.yml` embeds `postgres:postgres` credentials in plain text. Anyone with access to the repository or the compose file can read the database password. ## Work - Move all database credentials (`POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB`) out of `docker-compose.yml` and into a `.env` file referenced via `env_file` or `environment` substitution. - Add `.env` to `.gitignore` (verify it is not already tracked). - Create `.env.example` with placeholder values and instructions. - Update the README or setup docs to instruct developers to copy `.env.example` to `.env` before running compose. ## Acceptance Criteria - `docker-compose.yml` contains no hardcoded credentials. - `.env` is gitignored. - `.env.example` exists with documented placeholder values. - `docker compose up` still works correctly when `.env` is populated. ## Reference Roadmap item: P1 Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-27 16:22:15 +00:00
Author
Owner

[Triage] Already implemented in main. docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB} env var substitution -- no plaintext credentials. Closing as resolved.

[Triage] Already implemented in main. docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB} env var substitution -- no plaintext credentials. Closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#356