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

Closed
opened 2026-03-27 14:21:58 +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 can see the database password.

Work

  • Remove the hardcoded values from docker-compose.yml.
  • Reference them from a .env file or Docker secrets instead (e.g., ${POSTGRES_USER}, ${POSTGRES_PASSWORD}).
  • Add a .env.example file with placeholder values and instructions.
  • Ensure .env is listed in .gitignore.
  • Update the README with setup instructions for creating the .env file.

Acceptance Criteria

  • docker-compose.yml contains no hardcoded credentials.
  • .env.example documents all required variables.
  • .env is ignored by git.
  • docker compose up succeeds when a valid .env is present.

Reference

Roadmap item: 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 can see the database password. ## Work - Remove the hardcoded values from `docker-compose.yml`. - Reference them from a `.env` file or Docker secrets instead (e.g., `${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`). - Add a `.env.example` file with placeholder values and instructions. - Ensure `.env` is listed in `.gitignore`. - Update the README with setup instructions for creating the `.env` file. ## Acceptance Criteria - `docker-compose.yml` contains no hardcoded credentials. - `.env.example` documents all required variables. - `.env` is ignored by git. - `docker compose up` succeeds when a valid `.env` is present. ## Reference Roadmap item: Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-27 14:21:58 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 15:02:44 +00:00
Author
Owner

[Repo Manager] This issue is resolved. docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB} variable references. .env.example exists with placeholder values. .gitignore includes .env.

[Repo Manager] This issue is resolved. docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB} variable references. .env.example exists with placeholder values. .gitignore includes .env.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#337