Files
Elternbeirat/compose.yaml
T
TomandClaude Opus 5.5 24c787fb58 Move server-wide docs to the Infrastructure repo
- docs/unraid-infrastructure.md goes; host, network pattern, NPM, monitoring
  and the other containers now live in Tom/Infrastructure, referenced by its
  Gitea URL instead of a local path
- deployment.md stays self-contained: new prerequisite for proxynet and NPM,
  dig by IP (AdGuard blocks rzone.de), no docker login needed on Unraid,
  drops the finished Compose Manager switch and the generic NPM/runner pitfalls
- architektur.md AE-5 reflects the deploy from the repo and the Gitea secret
- entwicklung.md lists all three services of compose.yaml
- CLAUDE.md drops the obsolete YamlDotNet note (#50)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 14:46:16 +02:00

100 lines
4.1 KiB
YAML

# Base compose: production-like. PocketBase, the web app and the DynDNS updater;
# only PocketBase's data is a volume, everything else lives inside the images or
# in this file.
#
# NPM runs outside this stack (the `nginx` container on Unraid) and reaches both the
# web app (eb-blazor:8080) and the PocketBase admin (eb-pocketbase:8090, for
# redaktion.elternbeirat-igmh.info) by name over the external Docker network
# `proxynet`. No service publishes a host port: NPM is the only way in. proxynet
# and the network pattern: Infrastructure repo, docs/networks.md.
#
# On Unraid this file is deployed as is by .gitea/workflows/deploy.yml (project
# eb-stack), not pasted into the Compose Manager.
#
# `restart: always`, not `unless-stopped`: Unraid stops every container explicitly
# when Docker or the array goes down, and `unless-stopped` treats that as a manual
# stop -- the stack would stay down after a reboot. Without the Compose Manager
# there is no autostart toggle to bring it back.
# For local development use the dev overlay on top, which adds host ports and builds
# the web image from source:
# docker compose -f compose.yaml -f compose.dev.yaml up --build
# (The Rider run config "DevEnvironment" does exactly this with one click.)
#
# Startup order: PocketBase comes up first; once it reports healthy the web app
# starts (depends_on -> service_healthy).
# Fixed project name, so the stack has a stable name in Docker regardless of the
# folder name. Set once here in the base; overlays don't set their own name: (the
# tests override it with -p eb-test-stack).
name: eb-stack
services:
eb-pocketbase:
image: ghcr.io/muchobien/pocketbase:0.40.4
container_name: eb-pocketbase
restart: always
environment:
TZ: Europe/Berlin
volumes:
# The only state that must survive a restart or redeploy.
- /mnt/user/appdata/pocketbase/pb_data:/pb_data
networks:
# default: serve the web app. proxynet: be reached by NPM as eb-pocketbase:8090
# for redaktion.elternbeirat-igmh.info.
- default
- proxynet
healthcheck:
# The image ships this endpoint; the web app waits for it to pass.
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8090/api/health"]
interval: 5s
timeout: 3s
retries: 10
eb-web:
image: gitea.anticarnist.de/tom/elternbeirat:latest
container_name: eb-blazor
restart: always
depends_on:
eb-pocketbase:
condition: service_healthy
environment:
ASPNETCORE_URLS: http://+:8080
TZ: Europe/Berlin
# The web app reads content from PocketBase over the compose network.
PocketBase__BaseUrl: http://eb-pocketbase:8090
networks:
# default: reach eb-pocketbase. proxynet: be reached by NPM as eb-blazor:8080.
- default
- proxynet
eb-ddns:
# Keeps the A record of elternbeirat-igmh.info at Strato pointed at the current
# public IP of the connection. The FritzBox can't do it: its single DynDNS slot
# already serves anticarnist.de. www is a CNAME on the domain and follows on its
# own. The whole config lives here in CONFIG, so the container needs no config
# file and no volume -- only the password comes from the stack's env
# (STRATO_DYNDNS_PASSWORD, never in the repo). The ":-" default keeps dev and
# tests quiet, where the service is disabled. Setup: docs/deployment.md.
image: qmcgaw/ddns-updater:2.10
container_name: eb-ddns
restart: always
environment:
TZ: Europe/Berlin
PERIOD: 5m
CONFIG: >-
{"settings":[
{"provider":"strato","domain":"elternbeirat-igmh.info","password":"${STRATO_DYNDNS_PASSWORD:-}","ip_version":"ipv4"}
]}
networks:
default:
# A fixed name instead of the project-derived one: the Compose Manager names the
# project after the stack folder (elternbeirat_default otherwise). Changing it
# needs Compose Down + Up; a plain Up leaves containers on the old network.
name: eb-internal
proxynet:
# Created once on Unraid (`docker network create proxynet`) and shared with NPM.
# The dev overlay turns it into a local network, so no machine but Unraid needs it.
external: true