|
| 1 | +# SPDX-License-Identifier: PMPL-1.0-or-later |
| 2 | +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> |
| 3 | +# |
| 4 | +# BoJ Server — production node compose (Podman Compose compatible) |
| 5 | +# |
| 6 | +# Runs a fully operational BoJ node from the pre-built ghcr.io image. |
| 7 | +# Suitable for Umoja seed nodes and community volunteer nodes. |
| 8 | +# |
| 9 | +# Usage: |
| 10 | +# # Pull latest image |
| 11 | +# podman-compose -f container/compose.prod.yaml pull |
| 12 | +# |
| 13 | +# # Start (daemonised) |
| 14 | +# podman-compose -f container/compose.prod.yaml up -d |
| 15 | +# |
| 16 | +# # View logs |
| 17 | +# podman-compose -f container/compose.prod.yaml logs -f boj-rest |
| 18 | +# |
| 19 | +# # Stop |
| 20 | +# podman-compose -f container/compose.prod.yaml down |
| 21 | +# |
| 22 | +# Seed node environment variables: |
| 23 | +# BOJ_NODE_ID Stable node name (defaults to hostname; set for seeds) |
| 24 | +# BOJ_SEED_NODES Comma-separated host:port pairs to bootstrap federation |
| 25 | +# Defaults to the four continental Umoja seed nodes. |
| 26 | +# |
| 27 | +# For credential-forwarded cartridges set the relevant env vars: |
| 28 | +# GITHUB_TOKEN, NOTIFYHUB_API_KEY, etc. |
| 29 | +# Callers can also supply credentials encrypted in the request body (Option A); |
| 30 | +# see docs/AUTH-DESIGN.adoc for the full credential forwarding design. |
| 31 | + |
| 32 | +services: |
| 33 | + boj-rest: |
| 34 | + image: ghcr.io/hyperpolymath/boj-server:latest |
| 35 | + container_name: boj-node |
| 36 | + restart: unless-stopped |
| 37 | + ports: |
| 38 | + - "7700:7700" |
| 39 | + - "9999:9999/udp" |
| 40 | + volumes: |
| 41 | + - boj-node-data:/data:Z |
| 42 | + environment: |
| 43 | + # Server binding |
| 44 | + APP_HOST: "[::]" |
| 45 | + APP_PORT: "7700" |
| 46 | + APP_DATA_DIR: "/data" |
| 47 | + APP_LOG_FORMAT: "json" |
| 48 | + # Federation |
| 49 | + BOJ_QUIC: "1" |
| 50 | + BOJ_FEDERATION_PORT: "9999" |
| 51 | + # Override with a memorable name for seed nodes, e.g. "seed-eu-west" |
| 52 | + # BOJ_NODE_ID: "" |
| 53 | + # Bootstrap peers — defaults to all four Umoja seed nodes. |
| 54 | + # Override for private/staging networks. |
| 55 | + BOJ_SEED_NODES: "eu.boj.hyperpolymath.dev:9999,de.boj.hyperpolymath.dev:9999,us.boj.hyperpolymath.dev:9999,ap.boj.hyperpolymath.dev:9999" |
| 56 | + security_opt: |
| 57 | + - no-new-privileges:true |
| 58 | + read_only: true |
| 59 | + tmpfs: |
| 60 | + - /tmp:size=64m,noexec,nosuid,nodev |
| 61 | + healthcheck: |
| 62 | + test: ["CMD", "curl", "-sf", "http://localhost:7700/health"] |
| 63 | + interval: 30s |
| 64 | + timeout: 10s |
| 65 | + retries: 3 |
| 66 | + start_period: 30s |
| 67 | + |
| 68 | + capability-gateway: |
| 69 | + image: ghcr.io/hyperpolymath/boj-server:latest |
| 70 | + container_name: boj-gateway |
| 71 | + restart: unless-stopped |
| 72 | + entrypoint: ["/app/gateway/bin/http_capability_gateway", "start"] |
| 73 | + depends_on: |
| 74 | + boj-rest: |
| 75 | + condition: service_healthy |
| 76 | + ports: |
| 77 | + - "7800:7800" |
| 78 | + environment: |
| 79 | + GATEWAY_PORT: "7800" |
| 80 | + GATEWAY_UPSTREAM: "http://boj-rest:7700" |
| 81 | + BOJ_CARTRIDGES_ROOT: "/app/cartridges" |
| 82 | + GATEWAY_LOG_FORMAT: "json" |
| 83 | + security_opt: |
| 84 | + - no-new-privileges:true |
| 85 | + read_only: true |
| 86 | + tmpfs: |
| 87 | + - /tmp:size=32m,noexec,nosuid,nodev |
| 88 | + healthcheck: |
| 89 | + test: ["CMD", "curl", "-sf", "http://localhost:7800/health"] |
| 90 | + interval: 30s |
| 91 | + timeout: 10s |
| 92 | + retries: 3 |
| 93 | + start_period: 15s |
| 94 | + |
| 95 | +volumes: |
| 96 | + boj-node-data: |
| 97 | + driver: local |
0 commit comments