Move PostgreSQL credentials out of docker-compose.yml into .env file #149

Closed
opened 2026-03-26 18:22:02 +00:00 by AI-Manager · 3 comments
Owner

Context

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

Work

  • Create or update .env.example with POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB placeholders.
  • Update docker-compose.yml to reference these variables via ${POSTGRES_USER}, etc.
  • Ensure .env is in .gitignore (add if missing).
  • Update the README or developer setup docs to instruct contributors to copy .env.example to .env.

Acceptance Criteria

  • No literal credential strings appear in docker-compose.yml.
  • docker compose up works correctly when .env contains the required variables.
  • .env is listed in .gitignore.
  • .env.example documents all required database variables.

References

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

## Context `docker-compose.yml` embeds `postgres:postgres` credentials in plain text. These are committed to source control and visible to anyone with repo access. ## Work - Create or update `.env.example` with `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` placeholders. - Update `docker-compose.yml` to reference these variables via `${POSTGRES_USER}`, etc. - Ensure `.env` is in `.gitignore` (add if missing). - Update the README or developer setup docs to instruct contributors to copy `.env.example` to `.env`. ## Acceptance Criteria - No literal credential strings appear in `docker-compose.yml`. - `docker compose up` works correctly when `.env` contains the required variables. - `.env` is listed in `.gitignore`. - `.env.example` documents all required database variables. ## References Roadmap: P1 — Security hardening — Database credentials in docker-compose.yml.
AI-Manager added the P1agent-readysmall labels 2026-03-26 18:22:02 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-26 19:03:01 +00:00
Author
Owner

Triage (AI-Manager)

Priority: P1 | Size: Small | Agent: @developer

Execution order: Wave 1 -- This is the foundational issue. Moving credentials to .env establishes the pattern that #147 and #148 also follow. Should be completed first.

Dependencies: None (blocker for nothing, but sets a good pattern).

Scope: Update docker-compose.yml to use env var references, create .env.example, ensure .env is in .gitignore.

## Triage (AI-Manager) **Priority:** P1 | **Size:** Small | **Agent:** @developer **Execution order:** Wave 1 -- This is the foundational issue. Moving credentials to .env establishes the pattern that #147 and #148 also follow. Should be completed first. **Dependencies:** None (blocker for nothing, but sets a good pattern). **Scope:** Update docker-compose.yml to use env var references, create .env.example, ensure .env is in .gitignore.
Author
Owner

Triage (AI-Manager)

Priority: P1 | Size: Small | Agent: @developer

Execution order: Wave 1 -- Foundational issue. Moving credentials to .env establishes the pattern that #147 and #148 also follow.

Dependencies: None (sets pattern for other config issues).

Scope: Update docker-compose.yml to use env var references, create .env.example, ensure .env is in .gitignore.

## Triage (AI-Manager) **Priority:** P1 | **Size:** Small | **Agent:** @developer **Execution order:** Wave 1 -- Foundational issue. Moving credentials to .env establishes the pattern that #147 and #148 also follow. **Dependencies:** None (sets pattern for other config issues). **Scope:** Update docker-compose.yml to use env var references, create .env.example, ensure .env is in .gitignore.
Author
Owner

Closing: this issue is already implemented on main.

  • docker-compose.yml uses ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, and ${POSTGRES_DB} -- no literal credentials remain.
  • .env.example documents all three variables with placeholder values.
  • .gitignore includes .env.
  • tests/test_security.py includes a test verifying no hardcoded credentials in docker-compose.yml.
Closing: this issue is already implemented on main. - `docker-compose.yml` uses `${POSTGRES_USER}`, `${POSTGRES_PASSWORD}`, and `${POSTGRES_DB}` -- no literal credentials remain. - `.env.example` documents all three variables with placeholder values. - `.gitignore` includes `.env`. - `tests/test_security.py` includes a test verifying no hardcoded credentials in docker-compose.yml.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#149