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>
73 lines
2.7 KiB
YAML
73 lines
2.7 KiB
YAML
# Parafa 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.
|
|
#
|
|
# 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.
|
|
#
|
|
# Published on host port 8121 (the family's standalone ports: Galena 8021 · Sygna 8041 · Compass
|
|
# 8061 · Counsel 8081 · Insider 8101, with 8092/8094 reserved · Parafa 8121). On the PLATFORM the
|
|
# modules publish nothing; Atrium's front door forwards /parafa/* to the backend.
|
|
services:
|
|
postgres:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-parafa}
|
|
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:-parafa}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
migrate:
|
|
build:
|
|
context: ./backend
|
|
additional_contexts: { frontend: ./frontend }
|
|
secrets: [dredd_core_token]
|
|
image: parafa-backend:local
|
|
env_file: .env
|
|
command: sh -c "alembic upgrade head && python -m app.seed"
|
|
restart: "no"
|
|
volumes:
|
|
- parafa-data:/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
additional_contexts: { frontend: ./frontend }
|
|
secrets: [dredd_core_token]
|
|
image: parafa-backend:local
|
|
env_file: .env
|
|
ports:
|
|
- "${PARAFA_PORT:-8121}:8000"
|
|
volumes:
|
|
- parafa-data:/data
|
|
# The operator's signing certificate (PKCS#12) and its passphrase file, read-only, from a
|
|
# directory OUTSIDE the repo (never committed, never baked into the image). Point
|
|
# SIGNING_PKCS12_PATH / SIGNING_PKCS12_PASSPHRASE_FILE at the files under /run/parafa-signer.
|
|
- ${PARAFA_SIGNER_DIR:-./signer}:/run/parafa-signer:ro
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
|
|
volumes:
|
|
pgdata:
|
|
parafa-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
|