Created
November 26, 2020 10:12
-
-
Save Silthus/cde922bbab1bd67eaf303515b5168b6b to your computer and use it in GitHub Desktop.
mc-restic-compose-backup example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
backup: | |
image: silthus/mc-restic-compose-backup | |
env_file: | |
- backup.env | |
- backup.secrets.env | |
- sql.secrets.env | |
volumes: | |
# We need to communicate with docker | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
# Persistent storage of restic cache (greatly speeds up all restic operations) | |
- cache:/cache | |
- /etc/timezone:/etc/timezone:ro | |
networks: | |
- minecraft | |
volumes: | |
cache: | |
networks: | |
minecraft: | |
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
db: | |
image: mariadb | |
user: ${CURRENT_USER} | |
env_file: | |
- sql.secrets.env | |
- mysql.env | |
networks: | |
- minecraft | |
volumes: | |
- './database:/var/lib/mysql:Z' | |
- './configs/my.cnf:/etc/mysql/my.cnf' | |
ulimits: | |
nofile: | |
soft: 20000 | |
hard: 40000 | |
labels: | |
restic-compose-backup.mariadb: true | |
networks: | |
minecraft: | |
driver: bridge | |
volumes: | |
cache: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
main: | |
image: itzg/minecraft-server:adopt11 | |
command: --world-dir=/data/worlds | |
user: ${CURRENT_USER} | |
restart: always | |
volumes: | |
- ./servers/main:/data:z | |
- /etc/timezone:/etc/timezone:ro | |
labels: | |
restic-compose-backup.volumes: true | |
restic-compose-backup.volumes.include: "servers/main" | |
env_file: | |
- sql.secrets.env | |
- discord.secrets.env | |
- globals.env | |
- server-properties.env | |
depends_on: | |
- db | |
networks: | |
- minecraft | |
networks: | |
minecraft: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment