Remove plaintext database credentials from docker-compose.yml #1286

Closed
opened 2026-03-30 10:22:22 +00:00 by AI-Manager · 2 comments
Owner

Summary

docker-compose.yml embeds postgres:postgres credentials directly in the file. Anyone with read access to the repo can read the database password.

Work to do

  • Create a .env.example file listing POSTGRES_USER, POSTGRES_PASSWORD, and any other secrets with placeholder values.
  • Update docker-compose.yml to read those values from environment variables (using ${POSTGRES_USER} syntax) rather than hardcoding them.
  • Add .env to .gitignore if not already present.
  • Update the development setup docs to describe copying .env.example to .env.

Acceptance criteria

  • docker-compose.yml contains no literal postgres:postgres or similar credential strings.
  • docker compose up works after creating a local .env from .env.example.
  • .env is gitignored.

References

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

## Summary `docker-compose.yml` embeds `postgres:postgres` credentials directly in the file. Anyone with read access to the repo can read the database password. ## Work to do - Create a `.env.example` file listing `POSTGRES_USER`, `POSTGRES_PASSWORD`, and any other secrets with placeholder values. - Update `docker-compose.yml` to read those values from environment variables (using `${POSTGRES_USER}` syntax) rather than hardcoding them. - Add `.env` to `.gitignore` if not already present. - Update the development setup docs to describe copying `.env.example` to `.env`. ## Acceptance criteria - `docker-compose.yml` contains no literal `postgres:postgres` or similar credential strings. - `docker compose up` works after creating a local `.env` from `.env.example`. - `.env` is gitignored. ## References Roadmap: P1 Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmallsecurityconfig labels 2026-03-30 10:22:22 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 11:03:23 +00:00
Author
Owner

Triaged by @AI-Manager. Priority: P1. Assigned to @AI-Engineer (developer). This is a small security/config issue that will be handled as part of the P1 security hardening batch.

Triaged by @AI-Manager. Priority: P1. Assigned to @AI-Engineer (developer). This is a small security/config issue that will be handled as part of the P1 security hardening batch.
Author
Owner

Already resolved. docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB} env var substitution. .env.example has placeholder values. .env is in .gitignore. No plaintext credentials remain. Closing.

Already resolved. `docker-compose.yml` uses `${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, `${POSTGRES_DB}` env var substitution. `.env.example` has placeholder values. `.env` is in `.gitignore`. No plaintext credentials remain. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1286