Files
garage/deploy/docker-compose.yml
T
2026-08-06 19:04:06 +12:00

55 lines
2.0 KiB
YAML

# Matches the house style used for other services on this host (gittea,
# etc.): one folder per service, config as literal env values right in this
# file (no separate .env), bind-mounted ./data, published on a 127.0.0.1
# port for the host's own Caddy to reverse_proxy to.
#
# This example is wired for DB_DRIVER=sqlite + STORAGE_DRIVER=local — no
# Postgres or S3 needed, everything lives under ./data. Fine for production
# on a single-server/personal-use deployment like this one; swap to
# postgres/s3 by changing the env values below (see deploy/.env.example for
# the full var list either way).
services:
vlog:
build:
context: ..
dockerfile: backend/Dockerfile
container_name: vlog
restart: unless-stopped
# Only needed if your OIDC provider runs on the host itself (or another
# compose stack not on this network) rather than a public domain — same
# reason gittea reaches Postgres via host.docker.internal. Safe to leave
# in even if unused.
extra_hosts:
- "host.docker.internal:host-gateway"
# Pick any free host port — this is what your Caddy config points at.
ports:
- "127.0.0.1:4012:8080"
volumes:
- ./data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- DB_DRIVER=sqlite
- DATABASE_URL=/data/vlog.db
- PORT=8080
- STORAGE_DRIVER=local
- LOCAL_STORAGE_PATH=/data/uploads
# Point at your existing OIDC provider (Authentik/Keycloak/Zitadel/etc).
# Register OIDC_REDIRECT_URL with it as this app's callback URL.
- OIDC_ISSUER_URL=https://auth.example.com/realms/your-realm
- OIDC_CLIENT_ID=vlog
- OIDC_CLIENT_SECRET=changeme
- OIDC_REDIRECT_URL=https://garage.example.com/api/auth/callback
# Whatever your Caddy config serves this app as — controls whether
# session cookies are marked Secure (only over https://).
- PUBLIC_BASE_URL=https://garage.example.com
# openssl rand -base64 32
- JWT_SIGNING_SECRET=changeme