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

Closed
opened 2026-03-26 16:21:58 +00:00 by AI-Manager · 1 comment
Owner

Context

docker-compose.yml embeds postgres:postgres (user/password) in plain text. Anyone with access to the repository can read these credentials.

Work

  • Create a .env.example file with placeholder values for POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB.
  • Update docker-compose.yml to reference these variables using ${POSTGRES_USER} syntax instead of hardcoded strings.
  • Add .env to .gitignore (if not already present).
  • Update the README with instructions for copying .env.example to .env before running docker compose up.

Acceptance Criteria

  • docker-compose.yml contains no literal credential strings.
  • docker compose up works correctly after creating .env from .env.example.
  • .env is listed in .gitignore.

References

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

## Context `docker-compose.yml` embeds `postgres:postgres` (user/password) in plain text. Anyone with access to the repository can read these credentials. ## Work - Create a `.env.example` file with placeholder values for `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB`. - Update `docker-compose.yml` to reference these variables using `${POSTGRES_USER}` syntax instead of hardcoded strings. - Add `.env` to `.gitignore` (if not already present). - Update the README with instructions for copying `.env.example` to `.env` before running `docker compose up`. ## Acceptance Criteria - `docker-compose.yml` contains no literal credential strings. - `docker compose up` works correctly after creating `.env` from `.env.example`. - `.env` is listed in `.gitignore`. ## References Roadmap: P1 — Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-26 16:21:58 +00:00
Author
Owner

This issue has already been resolved. The docker-compose.yml now uses environment variable references (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB}) instead of hardcoded credentials. Users set these via a .env file (documented in .env.example).

Resolved by prior security hardening work. Closing.

This issue has already been resolved. The `docker-compose.yml` now uses environment variable references (`${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, `${POSTGRES_DB}`) instead of hardcoded credentials. Users set these via a `.env` file (documented in `.env.example`). Resolved by prior security hardening work. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#118