Files
Elternbeirat/compose.dev.yaml
T

47 lines
2.1 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:
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: ""
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`