mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-24 06:28:16 +01:00
Version 4.0.x examples
This commit is contained in:
67
examples/compose.yml
Normal file
67
examples/compose.yml
Normal file
@@ -0,0 +1,67 @@
|
||||
services:
|
||||
example-db:
|
||||
hostname: example-db-host
|
||||
container_name: example-db
|
||||
image: tiredofit/mariadb:10.11
|
||||
ports:
|
||||
- 3306:3306
|
||||
volumes:
|
||||
- ./db:/var/lib/mysql
|
||||
environment:
|
||||
- ROOT_PASS=examplerootpassword
|
||||
- DB_NAME=example
|
||||
- DB_USER=example
|
||||
- DB_PASS=examplepassword
|
||||
restart: always
|
||||
networks:
|
||||
- example-db-network
|
||||
|
||||
example-db-backup:
|
||||
container_name: example-db-backup
|
||||
image: tiredofit/db-backup
|
||||
volumes:
|
||||
- ./backups:/backup
|
||||
#- ./post-script.sh:/assets/custom-scripts/post-script.sh
|
||||
environment:
|
||||
- TIMEZONE=America/Vancouver
|
||||
- CONTAINER_NAME=example-db-backup
|
||||
- CONTAINER_ENABLE_MONITORING=FALSE
|
||||
# - DEBUG_MODE=TRUE
|
||||
|
||||
- BACKUP_JOB_CONCURRENCY=1 # Only run one job at a time
|
||||
- DEFAULT_CHECKSUM=NONE # Don't create checksums
|
||||
- DEFAULT_COMPRESSION=ZSTD # Compress all with ZSTD
|
||||
- DEFAULT_DUMP_INTERVAL=1440 # Backup every 1440 minutes
|
||||
- DEFAULT_DUMP_BEGIN=0000 # Start backing up at midnight
|
||||
- DEFAULT_CLEANUP_TIME=8640 # Cleanup backups after a week
|
||||
|
||||
- DB01_TYPE=mariadb
|
||||
- DB01_HOST=example-db-host
|
||||
- DB01_NAME=example
|
||||
- DB01_USER=example
|
||||
- DB01_PASS=examplepassword
|
||||
- DB01_DUMP_INTERVAL=30 # (override) Backup every 30 minutes
|
||||
- DB01_DUMP_BEGIN=+1 # (override) Backup starts immediately
|
||||
- DB01_CLEANUP_TIME=180 # (override) Cleanup backups they are older than 180 minutes
|
||||
- DB01_CHECKSUM=SHA1 # (override) Create a SHA1 checksum
|
||||
- DB01_COMPRESSION=GZ # (override) Compress with GZIP
|
||||
|
||||
#- DB02_TYPE=postgres
|
||||
#- DB02_HOST=example-postgres-host
|
||||
#- DB02_NAME=example
|
||||
#- DB02_USER=example
|
||||
#- DB02_PASS=examplepassword
|
||||
#- DB02_DUMP_INTERVAL=60 # (override) Backup every 60 minutes
|
||||
#- DB02_DUMP_BEGIN=+10 # (override) Backup starts in ten minutes
|
||||
#- DB02_CLEANUP_TIME=240 # (override) Cleanup backups they are older than 240 minutes
|
||||
#- DB02_CHECKSUM=MD5 # (override) Create a SHA1 checksum
|
||||
#- DB02_COMPRESSION=BZ # (override) Compress with BZIP
|
||||
|
||||
restart: always
|
||||
networks:
|
||||
- example-db-network
|
||||
|
||||
networks:
|
||||
example-db-network:
|
||||
name: example-db-network
|
||||
|
||||
Reference in New Issue
Block a user