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

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

Context

docker-compose.yml embeds postgres:postgres credentials in plain text. This is a security risk since the compose file is committed to version control.

Work

  • Replace inline POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB values in docker-compose.yml with references to a .env file (e.g., ${POSTGRES_USER}).
  • Create or update .env.example with placeholder values and instructions.
  • Add .env to .gitignore if not already present.
  • Update the README or developer setup docs to explain the .env setup step.

Acceptance Criteria

  • docker-compose.yml contains no hardcoded credentials.
  • docker compose up works when a valid .env file is present.
  • .env.example documents all required variables.
  • .env is in .gitignore.

References

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

## Context `docker-compose.yml` embeds `postgres:postgres` credentials in plain text. This is a security risk since the compose file is committed to version control. ## Work - Replace inline `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` values in `docker-compose.yml` with references to a `.env` file (e.g., `${POSTGRES_USER}`). - Create or update `.env.example` with placeholder values and instructions. - Add `.env` to `.gitignore` if not already present. - Update the README or developer setup docs to explain the `.env` setup step. ## Acceptance Criteria - `docker-compose.yml` contains no hardcoded credentials. - `docker compose up` works when a valid `.env` file is present. - `.env.example` documents all required variables. - `.env` is in `.gitignore`. ## References Roadmap: Security hardening — database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-26 14:21:35 +00:00
Author
Owner

Resolved. Database credentials moved to .env file (see .env.example). Implemented in PR #27 (merged).

Resolved. Database credentials moved to `.env` file (see `.env.example`). Implemented in PR #27 (merged).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#69