61 lines
2.5 KiB
YAML
61 lines
2.5 KiB
YAML
# Base compose: production-like. Both services; only PocketBase's data is a volume,
|
|
# everything else lives inside the images.
|
|
#
|
|
# The two `ports:` blocks below are TEMPORARY. The target state is NPM in front:
|
|
# NPM terminates TLS and is the only path to the web app, and the editors reach
|
|
# PocketBase through an NPM subdomain -- then both port mappings go away (#9). While
|
|
# NPM is not set up yet, the ports are the only way onto the site and the admin UI.
|
|
#
|
|
# 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: unless-stopped
|
|
environment:
|
|
TZ: Europe/Berlin
|
|
volumes:
|
|
# The only state that must survive a restart or redeploy.
|
|
- /mnt/user/appdata/pocketbase/pb_data:/pb_data
|
|
ports:
|
|
# TEMPORARY: exposes the admin UI on the LAN (http://<unraid>:8090/_/) while
|
|
# NPM is not in front yet. Remove once the editors reach PocketBase through an
|
|
# NPM subdomain (#9) -- until then the admin has no other way in.
|
|
- "8090:8090"
|
|
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: unless-stopped
|
|
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
|
|
ports:
|
|
# TEMPORARY: reach the site on the LAN (http://<unraid>:5000) while NPM is not
|
|
# in front yet. Replace with the external npm network once NPM terminates TLS
|
|
# and is the only path in (#9).
|
|
- "5000:8080"
|