Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by setupmc.com on 2025-04-28T20:18:49.330Z
- services:
- mc:
- image: itzg/minecraft-server:latest
- tty: true
- stdin_open: true
- ports:
- - "25565:25565"
- - "8123:8123"
- environment:
- EULA: "TRUE"
- TYPE: "FABRIC"
- VERSION: "1.21.7"
- MEMORY: "8192M"
- MOTD: "<redacted>"
- TZ: "Europe/Oslo"
- DIFFICULTY: "3"
- OPS: |-
- MyMinecraftName
- ENABLE_WHITELIST: "true"
- WHITELIST: |-
- MyMinecraftName
- CURSEFORGE_FILES: |-
- fabric-api
- lithium
- servux
- dynmapforge
- CF_API_KEY: "<redacted>"
- LOG_TIMESTAMP: "true"
- ICON: "/server-icon.png"
- SIMULATION_DISTANCE: "12"
- VIEW_DISTANCE: "32"
- RCON_CMDS_STARTUP: |-
- gamerule playersSleepingPercentage 0
- ENABLE_RCON: "true"
- RCON_PASSWORD: "<redacted>"
- volumes:
- - "./data:/data"
- - "./server-icon.png:/server-icon.png:ro"
- restore-backup:
- # Same image as mc, but any base image with bash and tar will work
- image: itzg/mc-backup
- depends_on:
- mc:
- condition: service_healthy
- restart: "no"
- entrypoint: restore-tar-backup
- volumes:
- # Must be same mount as mc service, needs to be writable
- - "./data:/data"
- # Must be same mount as backups service, but can be read-only
- - "./mc-backups:/backups:ro"
- backups:
- image: itzg/mc-backup
- depends_on:
- mc:
- condition: service_healthy
- environment:
- TZ: "Europe/Oslo"
- BACKUP_INTERVAL: "24h"
- PRUNE_BACKUPS_COUNT: 8
- RCON_HOST: mc
- RCON_PASSWORD: "<redacted>"
- # since this service waits for mc to be healthy, no initial delay is needed
- INITIAL_DELAY: 0
- volumes:
- - "./data:/data:ro"
- - "./mc-backups:/backups"
Advertisement
Add Comment
Please, Sign In to add comment