diff --git a/rxr_mc/docker-compose.yaml b/rxr_mc/docker-compose.yaml index e8de6c3..6ce49a7 100644 --- a/rxr_mc/docker-compose.yaml +++ b/rxr_mc/docker-compose.yaml @@ -9,8 +9,17 @@ services: - TZ=Asia/Shanghai volumes: - ${MC_DIR}:/mc-server - command: > # -XX:NativeMemoryTracking=summary - java -Xms${MAX_MEMORY} -Xmx${MAX_MEMORY} -XX:MaxRAM=${MAX_MEMORY} -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 -jar ${JAR_FILE} nogui + command: > + java -Xms${MAX_MEMORY} -Xmx${MAX_MEMORY} -XX:MaxRAM=${MAX_MEMORY} + -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 + -jar ${JAR_FILE} nogui ports: - "25565:25565" stdin_open: true @@ -19,3 +28,4 @@ services: mem_limit: 10G memswap_limit: 10G # 禁止使用 swap oom_score_adj: -1000 + stop_grace_period: 120s # 设置关闭宽限期为 120 秒 diff --git a/rxr_watchtower/docker-compose.yml b/rxr_watchtower/docker-compose.yml new file mode 100644 index 0000000..63dbb43 --- /dev/null +++ b/rxr_watchtower/docker-compose.yml @@ -0,0 +1,8 @@ +services: + watchtower: + image: containrrr/watchtower:latest + container_name: watchtower + volumes: + - /var/run/docker.sock:/var/run/docker.sock + restart: always + environment: