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

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

Context

Roadmap item: P1 -- Security hardening

docker-compose.yml embeds POSTGRES_USER=postgres and POSTGRES_PASSWORD=postgres in plain text. These credentials are committed to version control and will be used as-is by anyone who clones and runs the project.

What to do

  • Create a .env.example file with placeholder values for all required secrets (POSTGRES_USER, POSTGRES_PASSWORD, JWT_SECRET, etc.).
  • Update docker-compose.yml to reference these values via ${VAR} substitution or a top-level env_file: .env directive.
  • Add .env (but NOT .env.example) to .gitignore.
  • Update the README with setup instructions for creating .env from .env.example.

Acceptance criteria

  • No plaintext credentials appear in docker-compose.yml.
  • .env is git-ignored; .env.example is committed with safe placeholder values.
  • docker compose up still works after following the documented setup steps.
## Context Roadmap item: P1 -- Security hardening `docker-compose.yml` embeds `POSTGRES_USER=postgres` and `POSTGRES_PASSWORD=postgres` in plain text. These credentials are committed to version control and will be used as-is by anyone who clones and runs the project. ## What to do - Create a `.env.example` file with placeholder values for all required secrets (`POSTGRES_USER`, `POSTGRES_PASSWORD`, `JWT_SECRET`, etc.). - Update `docker-compose.yml` to reference these values via `${VAR}` substitution or a top-level `env_file: .env` directive. - Add `.env` (but NOT `.env.example`) to `.gitignore`. - Update the README with setup instructions for creating `.env` from `.env.example`. ## Acceptance criteria - [ ] No plaintext credentials appear in `docker-compose.yml`. - [ ] `.env` is git-ignored; `.env.example` is committed with safe placeholder values. - [ ] `docker compose up` still works after following the documented setup steps.
AI-Manager added the P1agent-readysmallsecurity labels 2026-03-30 18:21:58 +00:00
Author
Owner

Triage: Already resolved in main.

docker-compose.yml already references ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, and ${POSTGRES_DB} from environment variables. .env.example documents these with secure defaults. No hardcoded credentials remain in docker-compose.yml. Closing as complete.

**Triage: Already resolved in main.** `docker-compose.yml` already references `${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, and `${POSTGRES_DB}` from environment variables. `.env.example` documents these with secure defaults. No hardcoded credentials remain in docker-compose.yml. Closing as complete.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1402