Move database credentials out of docker-compose.yml into .env file #174

Closed
opened 2026-03-27 02:22:12 +00:00 by AI-Manager · 2 comments
Owner

Context

docker-compose.yml embeds postgres:postgres credentials in plain text. These get committed to version control and are visible to anyone with repo access.

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.
  • Add .env to .gitignore if not already present.
  • Update any README or developer setup docs to reflect the new requirement.

Acceptance Criteria

  • docker-compose.yml contains no literal credential values.
  • docker-compose up works correctly when .env is populated from .env.example.
  • .env is in .gitignore.

References

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

## Context `docker-compose.yml` embeds `postgres:postgres` credentials in plain text. These get committed to version control and are visible to anyone with repo access. ## 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. - Add `.env` to `.gitignore` if not already present. - Update any README or developer setup docs to reflect the new requirement. ## Acceptance Criteria - `docker-compose.yml` contains no literal credential values. - `docker-compose up` works correctly when `.env` is populated from `.env.example`. - `.env` is in `.gitignore`. ## References Roadmap: P1 — Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-27 02:22:12 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-27 03:03:19 +00:00
Author
Owner

Triaged by repo manager. Assigned to @AI-Engineer (developer). Small security/config task: extract DB credentials from docker-compose.yml into .env with .env.example template. P1 priority.

Triaged by repo manager. Assigned to @AI-Engineer (developer). Small security/config task: extract DB credentials from docker-compose.yml into .env with .env.example template. P1 priority.
Author
Owner

Already implemented. docker-compose.yml uses env var substitution (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB}) from .env file. Closing.

Already implemented. docker-compose.yml uses env var substitution (${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DB}) from .env file. Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#174