Added backups
This commit is contained in:
+40
-1
@@ -29,7 +29,40 @@ services:
|
||||
- ./mcserver:/config
|
||||
- ./plugins:/plugins
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
- mc-network
|
||||
restore-backup:
|
||||
# Same image as mc, but any base image with bash and tar will work
|
||||
image: itzg/mc-backup
|
||||
restart: "no"
|
||||
entrypoint: restore-tar-backup
|
||||
volumes:
|
||||
# Must be same mount as mc service, needs to be writable
|
||||
- ./mc-data:/data
|
||||
# Must be same mount as backups service, but can be read-only
|
||||
- ./mc-backups:/backups:ro
|
||||
networks:
|
||||
- mc-network
|
||||
backups:
|
||||
image: itzg/mc-backup
|
||||
depends_on:
|
||||
mc:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
BACKUP_INTERVAL: "24h"
|
||||
RCON_HOST: mc
|
||||
# since this service waits for mc to be healthy, no initial delay is needed
|
||||
INITIAL_DELAY: 0
|
||||
PRUNE_BACKUPS_COUNT: 3
|
||||
RCON_PASSWORD: ${RCON_PASSWORD}
|
||||
RCON_PORT: 25585
|
||||
BACKUP_METHOD: "tar"
|
||||
volumes:
|
||||
- ./mc-data:/data:ro
|
||||
- ./mc-backups:/backups
|
||||
networks:
|
||||
- mc-network
|
||||
broadcaster:
|
||||
image: ghcr.io/mcxboxbroadcast/standalone:latest
|
||||
user: "${UID}:${GID}"
|
||||
@@ -40,4 +73,10 @@ services:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./mcxboxbroadcast/config:/opt/data/config
|
||||
networks:
|
||||
- mc-network
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
mc-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user