Move Garage and garage-webui to stpcore
Test and deploy / test (push) Successful in 18s
Test and deploy / deploy (push) Successful in 30s

Garage now runs on the stpcore LXC (adamf/stpcore), the shared core
other stacks depend on. caddy, backend and usaco pin the name `garage`
to it with GARAGE_UPSTREAM; /garage/ goes to stpcore's Caddy with
X-Core-Token. The disk fallback for /uploads/ is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-26 14:32:33 +00:00
co-authored by Claude Opus 5.5
parent d0ff2e125b
commit 223c8ae35a
13 changed files with 108 additions and 237 deletions
+6 -49
View File
@@ -23,12 +23,8 @@ volumes:
# Deleting this wipes posts, users and messages.
dbdata:
# Private attachments, plus any upload Garage refused. Caddy serves
# /uploads/ from the bucket first, then from here.
# /uploads/ from the bucket (on stpcore) first, then from here.
uploads:
# Back up meta and data together: the bytes are unreadable without meta.
# A fresh pair needs garage/bootstrap.sh.
garage_meta:
garage_data:
# Written by the one-shot `vue` build container, served by Caddy.
vue_dist:
# Named only so the image's VOLUME doesn't leave anonymous volumes behind.
@@ -73,12 +69,15 @@ services:
- RECEIPT_WEB_UPSTREAM=${RECEIPT_WEB_UPSTREAM:-127.0.0.1:9}
- STPPRIV_LAN_IP=${STPPRIV_LAN_IP:-192.0.2.1}
- RECEIPT_WEB_TOKEN=${RECEIPT_WEB_TOKEN:-}
- GARAGE_WEBUI_TOKEN=${GARAGE_WEBUI_TOKEN:-}
# The adamf/cto stack's web container; "offline" while that stack is down.
- RADAR_UPSTREAM=${RADAR_UPSTREAM:-radar-web:80}
- CLOUDFLARE_DNS_API_TOKEN=${CLOUDFLARE_DNS_API_TOKEN:-}
# Keeps the Gitea hop on the LAN; public DNS points at Cloudflare.
# `garage` is on stpcore; the 127.0.0.1 default fails fast to disk.
extra_hosts:
- "${GITEA_HOST}:${GITEA_UPSTREAM}"
- "garage:${GARAGE_UPSTREAM:-127.0.0.1}"
networks:
app-network:
# So cloudflared's origin (https://www.DOMAIN) lands here under a name
@@ -141,6 +140,7 @@ services:
condition: service_healthy
extra_hosts:
- "${GITEA_HOST}:${GITEA_UPSTREAM}"
- "garage:${GARAGE_UPSTREAM:-127.0.0.1}"
networks:
- app-network
env_file:
@@ -286,6 +286,7 @@ services:
- usaco-runner
extra_hosts:
- "${GITEA_HOST}:${GITEA_UPSTREAM}"
- "garage:${GARAGE_UPSTREAM:-127.0.0.1}"
networks:
- app-network
- usaco-runner-net
@@ -378,47 +379,3 @@ services:
- AUTOHEAL_CONTAINER_LABEL=autoheal
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Public uploads bucket. Nothing depends on it: Caddy and the backend fall
# back to the `uploads` volume. First run: garage/bootstrap.sh.
garage:
image: dxflrs/garage:v2.5.0
container_name: garage
restart: always
networks:
- app-network
environment:
- GARAGE_RPC_SECRET=${GARAGE_RPC_SECRET}
- GARAGE_ADMIN_TOKEN=${GARAGE_ADMIN_TOKEN}
volumes:
- ./garage/garage.toml:/etc/garage.toml:ro
- garage_meta:/var/lib/garage/meta
- garage_data:/var/lib/garage/data
healthcheck:
test: ["CMD", "/garage", "status"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Admin-gated at /garage/; holds the admin token, so never publish it.
# Files uploaded here are public at /uploads/ with no backend checks.
garage-webui:
image: khairul169/garage-webui:1.1.0
container_name: garage-webui
restart: always
depends_on:
- garage
networks:
- app-network
environment:
- BASE_PATH=/garage
- API_BASE_URL=http://garage:3903
- API_ADMIN_KEY=${GARAGE_ADMIN_TOKEN}
- S3_ENDPOINT_URL=http://garage:3900
- S3_REGION=garage
# No /tmp in the image; large multipart uploads spool there.
tmpfs:
- /tmp
volumes:
- ./garage/garage.toml:/etc/garage.toml:ro