version: "3" services: minecraft: image: itzg/minecraft-server ports: - "25560:25565" volumes: - "./:/data" environment: JVM_OPTS: "-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true" VERSION: "latest" TYPE: "PAPER" EULA: "TRUE" ENABLE_RCON: "true" MEMORY: "4G" RCON_PASSWORD: "..." RCON_PORT: 28016 # enable env variable replacement REPLACE_ENV_VARIABLES: "TRUE" # define an optional prefix for your env variables you want to replace ENV_VARIABLE_PREFIX: "CFG_" # and here are the actual variables CFG_DB_HOST: "http://localhost:3306" CFG_DB_NAME: "minecraft" CFG_DB_PASSWORD_FILE: "/run/secrets/db_password" restart: always container_name: mc