Skip to content

[T-005b] Compose core profile: Postgres 17 with secrets, migrate placeholder, make up/down/db-up #27

Closed

Description

@CodewithJha

Task T-005b · Milestone M1 — Foundation · Size S · Priority P1 · Epic #1

Implements NFR-DEP-001 · PR-13

Branch ci/t-005b-compose-profile-postgres-17-with — one task = one branch = one PR (doc 32 §6)

Summary

Create docker/compose.yaml with the core profile skeleton (postgres + one-shot migrate) and dev profile port publishing, plus Makefile targets, so make up starts an empty, healthy stack.

Context / motivation

M1 exit criterion: make up starts an empty stack. Services for api/orchestrator/worker/web are added later by their own tasks (T-047, T-116, T-095).

Scope

In scope

  • postgres (digest-pinned postgres:17, POSTGRES_PASSWORD_FILE from Docker secret db_password, pg_isready healthcheck, named volume pgdata, port 5432 published only in dev profile).
  • migrate one-shot service using the backend image; until T-010b it runs roboprobe --version (placeholder) — command switched to roboprobe db upgrade in T-045a.
  • x-backend anchor per doc 17 §4.1.
  • Makefile: up, down, db-up, logs, ps; secrets/db_password generated by make setup if missing (git-ignored).
  • Compose variables from doc 27 §4.12 with defaults.

Implementation guidance

  • Bind published ports to 127.0.0.1 only (doc 21 §1). Use depends_on: {postgres: {condition: service_healthy}}. All variables come from .env; nothing hard-coded except image names/tags defaults.
  • Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff PLR2004); public APIs typed (mypy strict) and documented.

Configuration keys

From the configuration reference (doc 27). Keys marked (new) must be added to the typed settings models and appear in the generated reference (T-003c).

  • ROBOPROBE_IMAGE_TAG
  • ROBOPROBE_DB_NAME
  • ROBOPROBE_DB_USER

Acceptance criteria

  • make up → postgres healthy, migrate exits 0; make down cleans up.
  • Postgres not reachable from the host unless --profile dev.
  • secrets/ and .env are git-ignored.
  • Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
  • Docs, config reference and CHANGELOG Unreleased updated where behaviour, keys or interfaces changed.
  • Definition of Done (doc 32 §3) satisfied.

Tests required

  • Manual verification steps in PR; automated compose smoke test arrives with T-047/T-117a.

Dependencies

Blocked by: #26 (T-005a)

Blocks: #97 (T-047), #185 (T-116), #200 (T-095), #220 (T-128)

Parallelization notes

Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:

  • docker/compose.yaml
  • Makefile (compose targets)
  • .gitignore (secrets/)

docker/compose.yaml is later extended by T-047 (orchestrator/worker), T-116 (web), T-095 (gazebo), T-125 (observability) — those tasks add new service blocks only.

Definition of Done

Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-005b (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.

References

Design docs: doc 17 §4 · doc 17 §4.1 · doc 29 §3 · doc 21 §1 · doc 27 §4.12 · ADR-0013

Requirements: NFR-DEP-001 · PR-13 (traceability: doc 28)

External:

Activity

  1. added this to the M1 — Foundation milestone on Nov 19, 2026
  2. added
    type:infraCI, build, deployment infrastructure
    area:deployDocker images, compose, release packaging
    priority:P1Required for milestone exit
    taskChild task of a milestone epic
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:deployDocker images, compose, release packagingmilestone:M1M1 — Foundationpriority:P1Required for milestone exitsize:S<= 1 daytaskChild task of a milestone epictype:infraCI, build, deployment infrastructure

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions