53 lines
2 KiB
YAML
53 lines
2 KiB
YAML
|
|
# Garage — private object store on the Pi
|
||
|
|
#
|
||
|
|
# NOT Flux-managed. Flux watches ./clusters/homek8s and none of it references
|
||
|
|
# this directory; the container is applied on rpi by hand (see README.md).
|
||
|
|
# The point of committing it is reproducibility: a rebuilt Pi comes back from
|
||
|
|
# this directory plus a backup.
|
||
|
|
#
|
||
|
|
# Installed to /etc/garage/docker-compose.yml (root:root 0644). State stays on
|
||
|
|
# the existing bind mounts under /home/sirius/websites/garage/ so this file can
|
||
|
|
# replace the old in-place definition without moving a byte of data.
|
||
|
|
#
|
||
|
|
# Exposure rule: every port is published on an EXPLICIT address. There is no
|
||
|
|
# 0.0.0.0 publish anywhere. 10.10.0.1 is the WireGuard hub address (the mesh),
|
||
|
|
# 127.0.0.1 is the Pi itself. Docker scopes a specific-IP publish to that
|
||
|
|
# destination only, so the LAN (192.168.1.125) and anything public stay closed
|
||
|
|
# even before the host firewall in host/garage-firewall.nft is considered.
|
||
|
|
|
||
|
|
name: garage
|
||
|
|
|
||
|
|
services:
|
||
|
|
garage:
|
||
|
|
image: dxflrs/garage:v1.1.0
|
||
|
|
container_name: garage
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
# GARAGE_RPC_SECRET. 0640 root:root, never in git. Single node: the value
|
||
|
|
# only authenticates RPC between Garage nodes, and there are none — a fresh
|
||
|
|
# `openssl rand -hex 32` is a valid restore value.
|
||
|
|
env_file:
|
||
|
|
- /etc/garage/garage.env
|
||
|
|
|
||
|
|
command: ["/garage", "-c", "/etc/garage.toml", "server"]
|
||
|
|
|
||
|
|
ports:
|
||
|
|
# S3 API over the WireGuard mesh. This is the only endpoint anything in
|
||
|
|
# the cluster uses (site media sync in, CI sync out).
|
||
|
|
- "10.10.0.1:3900:3900"
|
||
|
|
# Prometheus /metrics over the mesh (see monitoring/controllers/home/garage.yaml).
|
||
|
|
- "10.10.0.1:3903:3903"
|
||
|
|
# Host-local S3 for backup verification / manual `garage` CLI work on the
|
||
|
|
# Pi itself. Loopback only.
|
||
|
|
- "127.0.0.1:3900:3900"
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
- /etc/garage/garage.toml:/etc/garage.toml:ro
|
||
|
|
- /home/sirius/websites/garage/meta:/data/meta
|
||
|
|
- /home/sirius/websites/garage/data:/data/data
|
||
|
|
|
||
|
|
logging:
|
||
|
|
driver: json-file
|
||
|
|
options:
|
||
|
|
max-size: "10m"
|
||
|
|
max-file: "3"
|