Files
Atrium/docker-compose.yml
adminandClaude Opus 5.5 9304f102f7
CI / compose-smoke (push) Successful in 2m17s
CI / deploy-kit-tests (push) Successful in 2m55s
CI / backend (16) (push) Successful in 4m0s
CI / backend (17) (push) Successful in 3m59s
CI / managed-db (push) Successful in 3m55s
deploy kit / preflight (push) Successful in 1m27s
Fetch private dredd-core from the Haski Gitea, not GitHub
The Dockerfiles still rewrote credentials for github.com only, so the build
token never reached Gitea and installs worked only while dredd-core was
public. Rewrite http://77.216.148.202:3000/ instead, give every workflow
that pip-installs the same rewrite (org secret DREDD_CORE_TOKEN, the
read-only haski-reader token), and drop the GitHub PAT leftovers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 22:18:15 +01:00

71 lines
2.7 KiB
YAML

# Atrium stack: postgres → migrate (+seed) → backend. No Caddy: the backend IS the edge.
# Only the backend is published (host :80); postgres is expose-only.
#
# The backend runs the image's CMD, the platform's front door (app/frontdoor.py), exactly as on the
# platform: `/` → 302 /atrium/, Atrium at /atrium, and with FRONTDOOR_UPSTREAMS empty (standalone, no
# modules) every other path is the plain 404. TLS is your own terminator in front (or, later, uvicorn
# with a certificate). Volumes and the DB name are distinct from a sibling's stack, but every sibling
# publishes :80 too — on ONE host, change the published port below before starting both. Each app in the family keeps its OWN
# database; what they share is the `dredd-core` package, not a cluster.
services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: ${POSTGRES_DB:-atrium}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change_me_super}
DB_APP_PASSWORD: ${DB_APP_PASSWORD:-change_me_app}
DB_MIGRATOR_PASSWORD: ${DB_MIGRATOR_PASSWORD:-change_me_migrator}
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d:ro
expose: ["5432"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d ${POSTGRES_DB:-atrium}"]
interval: 5s
timeout: 5s
retries: 20
migrate:
build:
context: ./backend
secrets: [dredd_core_token]
# The image carries the console (backend/Dockerfile: COPY --from=frontend).
additional_contexts:
frontend: ./frontend
image: atrium-backend:local
env_file: .env
command: sh -c "alembic upgrade head && python -m app.seed"
restart: "no"
depends_on:
postgres:
condition: service_healthy
backend:
build:
context: ./backend
secrets: [dredd_core_token]
# The image carries the console (backend/Dockerfile: COPY --from=frontend).
additional_contexts:
frontend: ./frontend
image: atrium-backend:local
env_file: .env
# Standalone: no modules to proxy to; anything outside /atrium is the front door's 404.
environment:
FRONTDOOR_UPSTREAMS: ""
ports:
- "80:8000"
depends_on:
migrate:
condition: service_completed_successfully
volumes:
pgdata:
secrets:
# Used only by the build stage's one `pip install`; no running container gets it. Compose resolves
# the variable from the shell OR the project .env (shell wins) — keep it in the shell, because every
# service here also loads .env at runtime and would receive the token:
# DREDD_CORE_TOKEN=<read-only Gitea token> docker compose up -d --build
dredd_core_token:
environment: DREDD_CORE_TOKEN