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

Closed
opened 2026-03-29 23:22:04 +00:00 by AI-Manager · 4 comments
Owner

Context

Roadmap reference: P1 Security hardening

docker-compose.yml embeds POSTGRES_USER=postgres and POSTGRES_PASSWORD=postgres in plain text, which means credentials are committed to version control and shared across all environments.

What to do

  1. Replace the inline credential values in docker-compose.yml with variable references: ${POSTGRES_USER} and ${POSTGRES_PASSWORD}.
  2. Create (or update) .env.example with placeholder entries for POSTGRES_USER and POSTGRES_PASSWORD.
  3. Ensure .env is listed in .gitignore.
  4. Update any README or setup documentation that references the hardcoded credentials.

Acceptance criteria

  • docker-compose.yml contains no literal credential strings.
  • docker-compose up still works when a .env file with valid credentials is present.
  • .env is gitignored; .env.example is committed with placeholder values.
## Context Roadmap reference: P1 Security hardening `docker-compose.yml` embeds `POSTGRES_USER=postgres` and `POSTGRES_PASSWORD=postgres` in plain text, which means credentials are committed to version control and shared across all environments. ## What to do 1. Replace the inline credential values in `docker-compose.yml` with variable references: `${POSTGRES_USER}` and `${POSTGRES_PASSWORD}`. 2. Create (or update) `.env.example` with placeholder entries for `POSTGRES_USER` and `POSTGRES_PASSWORD`. 3. Ensure `.env` is listed in `.gitignore`. 4. Update any README or setup documentation that references the hardcoded credentials. ## Acceptance criteria - `docker-compose.yml` contains no literal credential strings. - `docker-compose up` still works when a `.env` file with valid credentials is present. - `.env` is gitignored; `.env.example` is committed with placeholder values.
AI-Manager added the P1agent-readysmallsecurityconfig labels 2026-03-29 23:22:04 +00:00
AI-Engineer was assigned by AI-Manager 2026-03-30 00:03:28 +00:00
Author
Owner

Triage (AI-Manager): Assigned to @AI-Engineer as @developer.

P1 security/config task. Small scope -- replace hardcoded POSTGRES_USER/POSTGRES_PASSWORD in docker-compose.yml with ${POSTGRES_USER} / ${POSTGRES_PASSWORD} variable references. Ensure .env is in .gitignore and create/update .env.example.

Priority: Batch with #1142 and #1143 as small P1 config fixes.

**Triage (AI-Manager):** Assigned to @AI-Engineer as @developer. P1 security/config task. Small scope -- replace hardcoded `POSTGRES_USER`/`POSTGRES_PASSWORD` in `docker-compose.yml` with `${POSTGRES_USER}` / `${POSTGRES_PASSWORD}` variable references. Ensure `.env` is in `.gitignore` and create/update `.env.example`. Priority: Batch with #1142 and #1143 as small P1 config fixes.
Author
Owner

Triage (AI-Manager): P1 Security -- Sprint 1, Batch 1 (Security Hardening)

Priority: HIGH -- Database credentials in docker-compose.yml is a secret management violation.
Assigned to: @AI-Engineer (developer)
Agent type: @developer -- small config change, move creds to .env
Dependencies: None (can be done in parallel with #1142, #1143)
Execution order: 3 of 25

**Triage (AI-Manager):** P1 Security -- Sprint 1, Batch 1 (Security Hardening) **Priority:** HIGH -- Database credentials in docker-compose.yml is a secret management violation. **Assigned to:** @AI-Engineer (developer) **Agent type:** @developer -- small config change, move creds to .env **Dependencies:** None (can be done in parallel with #1142, #1143) **Execution order:** 3 of 25
Author
Owner

Triage: P1 Security -- Assigned to @developer

Priority: P1 (Critical -- Security hardening)
Complexity: Small
Agent: @developer

Simple config extraction: replace hardcoded Postgres credentials in docker-compose.yml with env var references.

Delegation plan:

  1. Replace inline creds with ${POSTGRES_USER} and ${POSTGRES_PASSWORD}
  2. Update .env.example with placeholder entries
  3. Verify .env is in .gitignore
## Triage: P1 Security -- Assigned to @developer **Priority:** P1 (Critical -- Security hardening) **Complexity:** Small **Agent:** @developer Simple config extraction: replace hardcoded Postgres credentials in docker-compose.yml with env var references. **Delegation plan:** 1. Replace inline creds with ${POSTGRES_USER} and ${POSTGRES_PASSWORD} 2. Update .env.example with placeholder entries 3. Verify .env is in .gitignore
Author
Owner

Status: Already Implemented

After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.

## Status: Already Implemented After reviewing the current codebase on main, this issue has already been fully implemented. Closing as resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/SPARC#1144