Files
Elternbeirat/compose.dev.yaml
T
TomandClaude Opus 5.5 05b1666f81 Deploy the stack from the repo's compose.yaml via Gitea Actions
- deploy.yml gets a deploy job after the build: pull, compose up on Unraid
  through the runner's Docker socket, then a health gate on eb-blazor /health
  from inside proxynet; docs-only pushes trigger nothing, manual runs allowed
- STRATO_DYNDNS_PASSWORD comes from a Gitea secret instead of the Compose
  Manager env file
- restart: always, because Unraid stops containers explicitly on shutdown and
  unless-stopped would leave the stack down after a reboot; the dev overlay
  turns it off
- Docs describe the automatic rollout and the one-time switch away from the
  Compose Manager stack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 00:37:42 +02:00

67 lines
2.9 KiB
YAML

# Dev overlay: layered on top of compose.yaml for local development.
# docker compose -f compose.yaml -f compose.dev.yaml up --build
#
# It adds host port mappings (so the stack is reachable from the browser), builds
# the web image from local source instead of pulling it from the registry, and
# swaps the Unraid pb_data bind mount for a throwaway named volume (the /mnt/user
# path only exists on the server).
# No name: here on purpose -- the project name is set once in the base file.
services:
eb-pocketbase:
# The base's `restart: always` is for Unraid; locally the stack should not come
# back on its own after a reboot of the dev machine.
restart: "no"
ports:
- "8090:8090" # PocketBase admin UI at http://localhost:8090/_/
environment:
# Local only: on a fresh pb_data the image auto-creates this superuser, so
# you skip the /_/ setup screen. Same credentials as the test fixture. This
# stays out of the prod base -- there the superuser is set up by hand / #9.
PB_ADMIN_EMAIL: test@example.com
PB_ADMIN_PASSWORD: test-password
volumes:
# Local: a named Docker volume instead of the Unraid /mnt/user bind mount
# from the base file (that path only exists on the server). The "!reset"
# tag clears the inherited bind mount so only this volume applies.
- !reset null
- pb_data_dev:/pb_data
# Dev-only seed: PocketBase runs the JS migrations in this folder on start.
# On a fresh pb_data_dev volume it creates the content collections and fills
# them with example records (see pb/pb_migrations). Guarded to be a no-op on
# a populated volume. Deliberately NOT in the base file -- production is
# seeded by hand, never from this repo.
- ./pb/pb_migrations:/pb_migrations
eb-web:
# Build from local source instead of pulling the registry image, so local code
# changes show up without a push+CI round-trip. image: "" clears the inherited
# tag from the base, which forces compose to use the build below.
image: ""
restart: "no"
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:8080" # web app at http://localhost:5000
eb-ddns:
# Never update the public DNS from a dev machine. A profile nobody enables keeps
# the service out of `up`.
profiles: [disabled]
networks:
default:
# Back to the project-derived name (eb-stack_default, eb-test-stack_default), so
# the dev and test stacks don't share one network and the tests' `down` does not
# try to remove the network the dev stack still uses.
name: !reset null
proxynet:
# The base expects NPM's network on Unraid. Locally there is no NPM, so compose
# creates a project-local network instead of failing on the missing external one.
external: false
volumes:
pb_data_dev: # throwaway local volume; remove with `docker volume rm`