Created
July 8, 2024 15:05
-
-
Save Stankye/2d37c68c122027a3c5f35e38fe1b2f30 to your computer and use it in GitHub Desktop.
MC 1.21
This file contains hidden or 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
services: | |
# TODO | |
# luckyperms, proxy, postgres shared, discord/matrix brigde, ops, whitelist, custom datapacks for init, litmatica, carpet, way to sync mods/datapacks from GH, anti-xray, anti-cheap, openresty for reverseproxy for dynmap, (maybe a keycloak plugin for forward auth on proxy), unifiedmetrics when it updates to 1.21 or find a real otel one, grafana+prom setup, rcon web?, better backup endpoints, worldgen mods | |
mc: | |
image: itzg/minecraft-server:java21-graalvm | |
container_name: "MinecraftFabric" | |
ports: | |
- "25565:25565" | |
- "8123:8123" | |
environment: | |
EULA: "TRUE" | |
ONLINE_MODE: "TRUE" | |
VERSION: 1.21 | |
TYPE: FABRIC | |
#OPS: "" # replace with uuid | |
#EXISTING_OPS_FILE : "MERGE" | |
# unifiedmetrics @ xwRVtqbA not on 1.21 | |
# carpet,carpet-extra @ TQTTVgYE not on 1.21, TjVkbhbd is on 1.21 | |
# anti-xray removed since mixins are erroring | |
# dcintegration todo, need to document setup | |
MODRINTH_PROJECTS: fabric-api,lithium,vmp-fabric:OPdBcjR7,c2me-fabric:9W7QWKBL,noisium,krypton,chunky,tcdcommons,better-stats,luckperms,shulkerboxtooltip,dynmap:ipBhc6VW,appleskin,ferrite-core,modernfix,spark | |
# LITEMATICA FORKED @ https://github.com/sakura-ryoko | |
# CURSEFORGE_PROJECTS: litematica,malilib | |
# https://vanillatweaks.net/share#dFRmhh | |
MOTD: "Minecraft Fabric 1.21" | |
# ICON: "https://example.com/icon.png" | |
SPAWN_PROTECTION: 0 | |
MAX_MEMORY: 8G | |
DIFFICULTY: "Normal" | |
# VIEW_DISTANCE: 16 | |
ANNOUNCE_PLAYER_ACHIEVEMENTS: true | |
MAX_PLAYERS: 9001 | |
# JVM Flags untuned | |
JVM_OPTS: "--add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=28 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:+PerfDisableSharedMem -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5 -XX:G1ConcRSHotCardLimit=16 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:+UseNUMA -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:NmethodSweepActivity=1 -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:AllocatePrefetchStyle=3 -XX:+AlwaysActAsServerClassMachine -XX:+UseTransparentHugePages -XX:LargePageSizeInBytes=2M -XX:+UseLargePages -XX:+EagerJVMCI -Dgraal.TuneInlinerExploration=1 -Dgraal.LoopRotation=true -Dgraal.OptWriteMotion=true -Dgraal.CompilerConfiguration=enterprise" | |
RCON_CMDS_STARTUP: |- | |
/gamerule doFireTick false | |
/chunky world overworld | |
/chunky spawn | |
/chunky radius 1000 | |
/chunky start | |
/dynmap fullrender overworld 0 0 | |
RCON_CMDS_FIRST_CONNECT: |- | |
/chunky pause | |
/dynmap pause all | |
RCON_CMDS_LAST_DISCONNECT: |- | |
/chunky continue | |
/dynmap pause none | |
volumes: | |
- ./mc-data:/data | |
depends_on: | |
restore-backup: | |
condition: service_completed_successfully | |
restore-backup: | |
# Same image as mc, but any base image with bash and tar will work | |
image: itzg/mc-backup | |
user: "1000" | |
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 | |
backups: | |
image: itzg/mc-backup | |
user: "1000" | |
depends_on: | |
mc: | |
condition: service_healthy | |
environment: | |
BACKUP_INTERVAL: "2h" | |
RCON_HOST: mc | |
# since this service waits for mc to be healthy, no initial delay is needed | |
INITIAL_DELAY: 0 | |
# As an example, to backup only the world data: | |
# INCLUDES: world,world_nether,world_the_end | |
volumes: | |
- ./mc-data:/data:ro | |
- ./mc-backups:/backups | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment