Deploy Caddyfile to valhalla / deploy (push) Successful in 1m24s
Plane had been broken since the June env_file cutover (bare DATABASE_URL / SECRET_KEY entries overrode stack.env with empty values, so the migrator never connected) and TB-018 already dropped it. It held one empty project. Removes the 8 Plane services and their env from the dev stack, the plane.ginnoir.com Caddy block, the Authentik forward-auth provider/app, the nightly pg_dump and minio snapshot path, and stale doc references. A final pg_dump + minio tarball is kept at ~/plane-final-20261026 on valhalla. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
81 lines
3.2 KiB
YAML
81 lines
3.2 KiB
YAML
# backup stack — Kopia snapshots of /config, selected /storage1/labdata paths, and DB dumps.
|
|
# Scope: stacks/backup/SCOPE.md + snapshot-paths.txt (excludes RomM art, registry, transient dirs).
|
|
#
|
|
# Offsite target: Backblaze B2 (S3-compatible). One-time repo setup — see README.md.
|
|
# Schedule: backup-scheduler dumps databases ~02:50, Kopia snapshots ~03:00 (policy).
|
|
#
|
|
# Env convention: stack.env only (no Portainer UI vars). Kopia UI is internal-only
|
|
# via Caddy after you add backup.ginnoir.com (optional, README).
|
|
|
|
services:
|
|
kopia:
|
|
container_name: kopia
|
|
image: kopia/kopia:0.17
|
|
hostname: kopia
|
|
restart: unless-stopped
|
|
networks: [backup, edge]
|
|
env_file:
|
|
- stack.env
|
|
cap_add:
|
|
- SYS_ADMIN
|
|
security_opt:
|
|
- apparmor:unconfined
|
|
devices:
|
|
- /dev/fuse:/dev/fuse
|
|
volumes:
|
|
- /config/kopia/config:/app/config
|
|
- /config/kopia/cache:/app/cache
|
|
- /config/kopia/logs:/app/logs
|
|
- /config:/backup/config:ro
|
|
- /config/backup/dumps:/backup/dumps:ro
|
|
- /storage1/labdata/gitea/repositories:/backup/labdata/gitea/repositories:ro
|
|
- /storage1/labdata/gitea/lfs:/backup/labdata/gitea/lfs:ro
|
|
- /storage1/labdata/famapp/minio:/backup/labdata/famapp/minio:ro
|
|
- /storage1/labdata/resume/minio:/backup/labdata/resume/minio:ro
|
|
- /storage1/labdata/romhacks/metadata:/backup/labdata/romhacks/metadata:ro
|
|
- /storage1/labdata/romhacks/library:/backup/labdata/romhacks/library:ro
|
|
- /storage1/labdata/romm/assets:/backup/labdata/romm/assets:ro
|
|
- /config/backup/init-kopia.sh:/init-kopia.sh:ro
|
|
- /config/backup/snapshot-paths.txt:/snapshot-paths.txt:ro
|
|
ports:
|
|
- "51515:51515"
|
|
entrypoint: ["/bin/sh", "/init-kopia.sh"]
|
|
labels:
|
|
- "com.centurylabs.watchtower.enable=false"
|
|
|
|
backup-scheduler:
|
|
container_name: backup_scheduler
|
|
image: alpine:3.20
|
|
restart: unless-stopped
|
|
networks: [backup, edge] # edge: push heartbeats to uptime_kuma:3001
|
|
env_file:
|
|
- stack.env
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- /config/backup/dumps:/dumps
|
|
- /config/backup/scripts/backup-dump-databases.sh:/scripts/backup-dump-databases.sh:ro
|
|
- /config/backup/scripts/backup-run-snapshots.sh:/scripts/backup-run-snapshots.sh:ro
|
|
- /config/backup/scripts/backup-check-freshness.sh:/scripts/backup-check-freshness.sh:ro
|
|
- /config/backup/snapshot-paths.txt:/snapshot-paths.txt:ro
|
|
# busybox crond reads <dir>/<user> and SILENTLY skips a crontab not owned by root;
|
|
# the host file is ginnoir-owned, so it's copied in root-owned at startup (below)
|
|
- /config/backup/crontab:/crontab.src:ro
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- |
|
|
apk add --no-cache docker-cli curl jq tzdata >/dev/null
|
|
# crond jobs get a bare env; scripts source this instead
|
|
printenv | grep -E '^(NTFY_|KUMA_|KOPIA_REPOSITORY_PASSWORD=|TZ=)' | sed "s/=\(.*\)/='\1'/" > /etc/backup.env || true
|
|
install -o root -g root -m 600 /crontab.src /etc/crontabs/root
|
|
crond -f -l 8 -c /etc/crontabs
|
|
depends_on:
|
|
- kopia
|
|
|
|
networks:
|
|
backup:
|
|
name: backup
|
|
driver: bridge
|
|
edge:
|
|
name: edge
|
|
external: true
|