refactor: split monolith into per-domain stacks (Phase A: build)

Add stacks/<domain>/ compose + env for the 11 target stacks (proxy, media,
foundry, owncloud, resume, famapp, authentik, notify, monitoring, remote, dev).
Each app stack joins a shared external `edge` network for Caddy and keeps its
DB/cache co-located (no shared backing services). All named volumes convert to
tiered bind mounts: DBs/configs -> /config (SSD), blobs/repos/registry ->
/storage1/labdata (ZFS). Gitea repos+LFS split to ZFS.

Move Vault into the management plane (portainer-compose.yml) and add the shared
`edge` network there. apply-compose.ps1 -Portainer now also pushes vault.hcl.

Additive only: root docker-compose.yml/.env/Caddyfile untouched, so the live
monolith is unchanged. Live cutover (Phase B) is next.
This commit is contained in:
ginnoir
2026-06-04 16:11:31 -05:00
parent e174807481
commit 57cd6ed270
23 changed files with 1296 additions and 8 deletions
+5
View File
@@ -0,0 +1,5 @@
# foundry stack secrets
FOUNDRY_USERNAME=ginnoir
FOUNDRY_PASSWORD=agt-UAU!uky_ykh3juy
FOUNDRY_ADMIN_KEY=fuckyouben
FOUNDRY_PATCH_URLS=https://gist.githubusercontent.com/ginnoir/898b152a09369f9089770daa71887262/raw/a354e4284f2b1feb616910f65bfe65a4ffdb5473/plutonium-12.x.sh
+69
View File
@@ -0,0 +1,69 @@
# foundry stack — Foundry VTT instances + 5etools mirror.
# Tabletop services; bind-mounted to /storage1/foundry*. They don't talk to each
# other, so they only need `edge` for Caddy to proxy them.
services:
foundry:
container_name: foundry
image: felddy/foundryvtt:latest
hostname: valhalla-primary
init: true
restart: unless-stopped
networks: [edge]
volumes:
- /storage1/foundry:/data
- /storage1/foundry/updatemain.bash:/home/foundry/updatemain.bash
- /storage1/Books/Tabletop:/data/Data/storage
environment:
- FOUNDRY_USERNAME=${FOUNDRY_USERNAME}
- FOUNDRY_PASSWORD=${FOUNDRY_PASSWORD}
- FOUNDRY_ADMIN_KEY=${FOUNDRY_ADMIN_KEY}
- CONTAINER_VERBOSE=true
- FOUNDRY_HOSTNAME=foundry.ginnoir.com
- FOUNDRY_PROXY_PORT=443
- FOUNDRY_PROXY_SSL=true
- CONTAINER_PRESERVE_OWNER=/data/Data/storage
- FOUNDRY_UID=1000
- FOUNDRY_GID=1000
- CONTAINER_PATCH_URLS=${FOUNDRY_PATCH_URLS}
ports:
- "30000:30000"
foundry2:
container_name: foundry2
image: felddy/foundryvtt:latest
hostname: valhalla-secondary
init: true
restart: unless-stopped
networks: [edge]
volumes:
- /storage1/foundry2:/data
- /storage1/foundry/updatemain.bash:/home/foundry/updatemain.bash
- /storage1/Books/Tabletop:/data/Data/storage
environment:
- FOUNDRY_USERNAME=${FOUNDRY_USERNAME}
- FOUNDRY_PASSWORD=${FOUNDRY_PASSWORD}
- FOUNDRY_ADMIN_KEY=${FOUNDRY_ADMIN_KEY}
- CONTAINER_VERBOSE=true
- FOUNDRY_HOSTNAME=foundry2.ginnoir.com
- FOUNDRY_PROXY_PORT=443
- FOUNDRY_PROXY_SSL=true
- CONTAINER_PRESERVE_OWNER=/data/Data/storage
- FOUNDRY_UID=1000
- FOUNDRY_GID=1000
- CONTAINER_PATCH_URLS=${FOUNDRY_PATCH_URLS}
ports:
- "30001:30000"
5etools:
container_name: 5etools
image: ghcr.io/5etools-mirror-3/5etools-src:latest
restart: unless-stopped
networks: [edge]
ports:
- "9009:80"
networks:
edge:
name: edge
external: true