Split compose into base + dev overlay for a local two-container stack

This commit is contained in:
tleininger committed 2026-09-23 08:40:00 +02:00
1 parent d78a13815a
commit bbe792192d
5 files changed
+109 -15

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
# 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).
services:
eb-pocketbase:
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
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: ""
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:8080" # web app at http://localhost:5000
volumes:
pb_data_dev: # throwaway local volume; remove with `docker volume rm`