Files
Galena/docker-compose.yml
adminandClaude Opus 5.5 9088b5c206
CI / backend (Postgres 17) (push) Successful in 5m10s
CI / managed Postgres (shared database, emulated, Postgres 17) (push) Successful in 4m20s
CI / backend (Postgres 16) (push) Successful in 5m11s
CI / editor-license (push) Successful in 1m21s
CI / one platform, one account (emulated, Postgres 17) (push) Successful in 1m40s
CI / compose-smoke (push) Successful in 2m17s
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:23 +01:00

84 lines
3.5 KiB
YAML

# Galena stack: postgres → migrate (+seed) → backend.
# No reverse proxy: the backend serves the API, the console and its own security headers, and is
# published on host port 8021; postgres is expose-only. For TLS put your own terminator in front (and
# set FORWARDED_ALLOW_IPS to its address), or run Galena as a module of the platform, where Atrium
# is the front door.
#
# ── Host ports ────────────────────────────────────────────────────────────────
# The family numbers its development ports app / db / static, twenty apart per app:
# Galena 8012 / 8014 / 8021, Sygna 8032 / 8034 / 8041, Compass 8052 / 8054 / 8061,
# Counsel 8072 / 8074 / 8081. The stacks therefore run side by side; taking :80 would collide
# with a sibling stack on the first `up`. Galena's console + API are published once, on 8021.
# On the platform the modules publish nothing and Atrium's front door keeps :80.
services:
postgres:
image: postgres:16
environment:
POSTGRES_DB: ${POSTGRES_DB:-galena}
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:-galena}"]
interval: 5s
timeout: 5s
retries: 20
migrate:
build:
context: ./backend
# The console (../frontend) is copied into the image from this named context
# (backend/Dockerfile: COPY --from=frontend).
additional_contexts:
frontend: ./frontend
secrets: [dredd_core_token]
image: galena-backend:local
env_file: .env
command: sh -c "alembic upgrade head && python -m app.seed"
restart: "no"
volumes:
- galena-data:/data
depends_on:
postgres:
condition: service_healthy
backend:
build:
context: ./backend
# The console (../frontend) is copied into the image from this named context
# (backend/Dockerfile: COPY --from=frontend).
additional_contexts:
frontend: ./frontend
secrets: [dredd_core_token]
image: galena-backend:local
env_file: .env
ports: ["8021:8000"]
environment:
# Nothing sits in front of the backend here, so no hop may set X-Forwarded-For: empty = the
# image's default (loopback only). Behind your own TLS terminator, set its address instead.
FORWARDED_ALLOW_IPS: ${FORWARDED_ALLOW_IPS:-}
volumes:
- galena-data:/data
# Optional frontend plugins (e.g. the GPL DjVu Viewer). Mount a host folder of plugins and set
# PLUGINS_DIR=/plugins in .env. Read-only — the backend only serves their static assets.
# - ./plugins:/plugins:ro
depends_on:
migrate:
condition: service_completed_successfully
volumes:
pgdata:
galena-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 the
# migrate and backend services load .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