Split compose into base + dev overlay for a local two-container stack
This commit is contained in:
1 parent
d78a13815a
commit
bbe792192d
5 files changed
+109
-15
No files matched your search
+30
-13
@@ -1,24 +1,41 @@
|
||||
# TEST setup for the first run on Unraid (without NPM).
|
||||
# Base compose: production-like. Both services, no host port mappings (NPM is the
|
||||
# only path to the web app; the editors reach PocketBase through an NPM subdomain).
|
||||
# Only PocketBase's data is a volume; everything else lives inside the images.
|
||||
#
|
||||
# Pulls the finished image from the Gitea registry (the build happens on the
|
||||
# development machine, see docs/deployment.md) instead of building from source
|
||||
# on Unraid.
|
||||
# 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.)
|
||||
#
|
||||
# Deliberately differs from the production setup:
|
||||
# - There is a port mapping (5000 outside -> 8080 inside) so the app is
|
||||
# reachable in the local network at http://<unraid>:5000. In production the
|
||||
# mapping is dropped; there NPM is the only path to the container (use the
|
||||
# external npm network instead, see docs/deployment.md).
|
||||
#
|
||||
# Once NPM is in place, this file is replaced by the production compose.
|
||||
# Startup order: PocketBase comes up first; once it reports healthy the web app
|
||||
# starts (depends_on -> service_healthy).
|
||||
|
||||
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
|
||||
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-web
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
eb-pocketbase:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
ASPNETCORE_URLS: http://+:8080
|
||||
TZ: Europe/Berlin
|
||||
ports:
|
||||
- "5000:8080" # TEST access, remove in production
|
||||
# The web app reads content from PocketBase over the compose network.
|
||||
PocketBase__BaseUrl: http://eb-pocketbase:8090
|
||||
Reference in new issue
Block a user