mirror of
https://github.com/tgdrive/teldrive.git
synced 2024-11-14 11:45:29 +08:00
chore(docs): add compose for db backup
This commit is contained in:
parent
7531cac0f3
commit
8b58c8e10c
1 changed files with 24 additions and 0 deletions
24
docker/compose/db-backup.yml
Normal file
24
docker/compose/db-backup.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
services:
|
||||
rclone-backup:
|
||||
image: ghcr.io/bhunter234/rclone-backup # for postgres 16 use ghcr.io/adrienpoupa/rclone-backup
|
||||
container_name: rclone-backup
|
||||
environment:
|
||||
- RCLONE_REMOTE_NAME=remote # use any rclone remote to backup db file gdrive is recommended
|
||||
- BACKUP_KEEP_DAYS=10
|
||||
- CRON=0 */6 * * * # backup file every 6 hours
|
||||
- ZIP_ENABLE=true
|
||||
- DB_TYPE=postgresql
|
||||
- PG_HOST=postgres
|
||||
- PG_DBNAME=postgres
|
||||
- PG_USERNAME=user
|
||||
- PG_PASSWORD=pass
|
||||
- ZIP_PASSWORD=zippass
|
||||
restart: always
|
||||
networks:
|
||||
- postgres
|
||||
volumes:
|
||||
- /path/to/rclone/configdir/:/config/rclone
|
||||
|
||||
networks:
|
||||
postgres:
|
||||
external: true
|
Loading…
Reference in a new issue