Files
atproto-pds-ansible/templates/compose.yaml.j2
govandLetta Code ec09b49282
Deploy PDS / deploy (push) Canceled after 0s
feat: add PDS backup service with rclone + S3
Three backup types: pre-update (Watchtower lifecycle hook),
pre-deploy (Ansible task), and periodic (systemd timer).
All uploads go to OVH S3 via rclone. Backs up SQLite DBs,
pds.env, and Caddy config.

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
2026-08-04 18:00:34 -04:00

55 lines
1.5 KiB
Django/Jinja

services:
pds:
container_name: pds
image: ghcr.io/bluesky-social/pds:{{ pds_image_tag }}
network_mode: host
restart: unless-stopped
volumes:
- type: bind
source: {{ pds_data_dir }}
target: {{ pds_data_dir }}
- type: bind
source: /usr/bin/rclone
target: /usr/local/bin/rclone
read_only: true
- type: bind
source: /etc/rclone/rclone.conf
target: /etc/rclone/rclone.conf
read_only: true
- type: bind
source: /usr/local/bin/backup.sh
target: /usr/local/bin/backup.sh
read_only: true
labels:
- com.centurylinklabs.watchtower.lifecycle.pre-update=/usr/local/bin/backup.sh preupdate
- com.centurylinklabs.watchtower.lifecycle.pre-update-timeout=2
env_file:
- {{ pds_data_dir }}/pds.env
caddy:
container_name: caddy
image: caddy:2
network_mode: host
restart: unless-stopped
volumes:
- type: bind
source: {{ pds_data_dir }}/caddy/data
target: /data
- type: bind
source: {{ pds_data_dir }}/caddy/etc/caddy
target: /etc/caddy
watchtower:
container_name: watchtower
image: ghcr.io/nicholas-fedor/watchtower:latest
network_mode: host
restart: unless-stopped
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
environment:
- WATCHTOWER_CLEANUP=true
- WATCHTOWER_POLL_INTERVAL=3600
- WATCHTOWER_LIFECYCLE_HOOKS=true