CI / infra-matrix (full) (push) Successful in 2m26s
CI / backend (17) (push) Successful in 12m23s
CI / ocr-license (push) Successful in 26s
CI / managed-db (push) Successful in 8m44s
CI / infra-matrix (bare) (push) Successful in 1m6s
CI / backend (16) (push) Successful in 12m33s
CI / compose-smoke (push) Successful in 3m30s
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>
92 lines
3.2 KiB
YAML
92 lines
3.2 KiB
YAML
# Insider stack: postgres → migrate (+seed) → backend. No reverse proxy: the backend is its own
|
|
# edge (app/edge.py) and serves the console. Only the backend is published; postgres is expose-only.
|
|
#
|
|
# Ports — the family's standalone scheme, so every module's stack can run side by side on one box:
|
|
# Galena 8021 · Sygna 8041 · Compass 8061 · Counsel 8081 · Insider 8101
|
|
# (Insider's other reserved ports: 8092 / 8094.) On the PLATFORM the modules publish nothing — the
|
|
# front door (Atrium's backend) reaches them on the internal network, one path prefix each.
|
|
#
|
|
# OCR: the core image reads a PDF's text layer only. `docker compose --profile ocr up -d` adds the
|
|
# `ocr-worker` service, built from backend/Dockerfile.ocr with PaddleOCR + Tesseract (all
|
|
# Apache-2.0), and set OCR_WORKER=external in .env so the backend leaves the queue to it.
|
|
#
|
|
# 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:-insider}
|
|
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:-insider}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
migrate:
|
|
build:
|
|
context: ./backend
|
|
additional_contexts: { frontend: ./frontend }
|
|
secrets: [dredd_core_token]
|
|
image: insider-backend:local
|
|
env_file: .env
|
|
command: sh -c "alembic upgrade head && python -m app.seed"
|
|
restart: "no"
|
|
volumes:
|
|
- insider-data:/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
additional_contexts: { frontend: ./frontend }
|
|
secrets: [dredd_core_token]
|
|
image: insider-backend:local
|
|
env_file: .env
|
|
ports:
|
|
- "8101:8000"
|
|
volumes:
|
|
- insider-data:/data
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
|
|
# OPTIONAL (profile `ocr`): the OCR queue worker with the heavy engines. Never in the core image.
|
|
ocr-worker:
|
|
profiles: ["ocr"]
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.ocr
|
|
additional_contexts: { frontend: ./frontend }
|
|
secrets: [dredd_core_token]
|
|
image: insider-ocr:local
|
|
env_file: .env
|
|
command: python -m app.ocr.worker
|
|
restart: unless-stopped
|
|
volumes:
|
|
- insider-data:/data
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
|
|
volumes:
|
|
pgdata:
|
|
insider-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
|