generated from coop-cloud/example
Add Backup Bot Two support #27
@@ -3,6 +3,7 @@ TYPE=peertube
|
||||
DOMAIN=peertube.example.com # <= EDIT THIS
|
||||
LETS_ENCRYPT_ENV=production
|
||||
COMPOSE_FILE=compose.yml
|
||||
ENABLE_BACKUPS=true
|
||||
|
||||
PEERTUBE_WEBSERVER_PORT=443
|
||||
PEERTUBE_WEBSERVER_HTTPS=true
|
||||
|
||||
+23
@@ -80,6 +80,12 @@ services:
|
||||
deploy:
|
||||
labels:
|
||||
- "coop-cloud.${STACK_NAME}.version=8.4.2+v8.3.2-trixie"
|
||||
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
||||
- "backupbot.backup.volumes.app-assets=false"
|
||||
- "backupbot.backup.volumes.nginx-tmp=false"
|
||||
- "backupbot.backup.volumes.nginx-cache=false"
|
||||
- "backupbot.backup.volumes.postgres-data=false"
|
||||
- "backupbot.backup.volumes.redis-data=false"
|
||||
|
||||
db:
|
||||
image: pgautoupgrade/pgautoupgrade:18-alpine
|
||||
@@ -99,6 +105,22 @@ services:
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
backup:
|
||||
image: postgres:18-trixie
|
||||
entrypoint: ["sleep", "infinity"]
|
||||
secrets:
|
||||
- db_password
|
||||
volumes:
|
||||
- backup-db:/backup
|
||||
networks:
|
||||
- internal
|
||||
deploy:
|
||||
labels:
|
||||
- "backupbot.backup.volumes.backup-db.path=backup.dump"
|
||||
- "backupbot.backup.pre-hook=PGPASSWORD=$$(cat /run/secrets/db_password) pg_dump -h db -U peertube -d peertube -Fc -f /backup/backup.dump"
|
||||
- "backupbot.backup.post-hook=rm -f /backup/backup.dump"
|
||||
- "backupbot.restore.post-hook=PGPASSWORD=$$(cat /run/secrets/db_password) pg_restore -h db -U peertube -d peertube --clean --if-exists --no-owner --no-privileges --exit-on-error /backup/backup.dump && rm -f /backup/backup.dump"
|
||||
|
||||
cache:
|
||||
image: redis:8-alpine
|
||||
volumes:
|
||||
@@ -124,6 +146,7 @@ volumes:
|
||||
nginx-cache:
|
||||
postgres-data:
|
||||
redis-data:
|
||||
backup-db:
|
||||
|
||||
configs:
|
||||
nginx_config:
|
||||
|
||||
Reference in New Issue
Block a user