Files
Lexicon/docker-compose.yml
adminandClaude Opus 5.5 57d82488ae
CI / backend (16) (push) Successful in 2m9s
CI / backend (17) (push) Successful in 2m10s
CI / managed-db (push) Successful in 1m31s
CI / compose-smoke (push) Successful in 2m2s
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:29 +01:00

63 lines
2.0 KiB
YAML

# Lexicon stack: postgres → migrate (+seed) → backend. No reverse proxy: the backend is its own
# edge (app/edge.py) and has no console (Atrium's chat calls its API). Only the backend is published; postgres is expose-only.
#
# Runs alongside a sibling's stack — different volumes, different DB name. 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:-lexicon}
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:-lexicon}"]
interval: 5s
timeout: 5s
retries: 20
migrate:
build:
context: ./backend
secrets: [dredd_core_token]
image: lexicon-backend:local
env_file: .env
command: sh -c "alembic upgrade head && python -m app.seed"
restart: "no"
volumes:
- lexicon-data:/data
depends_on:
postgres:
condition: service_healthy
backend:
build:
context: ./backend
secrets: [dredd_core_token]
image: lexicon-backend:local
env_file: .env
ports:
- "80:8000"
volumes:
- lexicon-data:/data
depends_on:
migrate:
condition: service_completed_successfully
volumes:
pgdata:
lexicon-data:
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