From da8fb37317e14e9d46c7ca2733dbc7db4e18346c Mon Sep 17 00:00:00 2001 From: itzg Date: Sat, 31 Jul 2021 14:24:59 +0000 Subject: [PATCH 1/3] docs: Auto update markdown TOC --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3bc32b56..b5d866bc 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + From c96d6b29588fc416486dae029e67cdf1ccc3bc9b Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 1 Aug 2021 12:09:18 -0500 Subject: [PATCH 2/3] Added support for STOP_SERVER_ANNOUNCE_DELAY --- Dockerfile | 2 +- README.md | 6 ++++++ start-minecraftFinalSetup | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c74276c1..bf450b53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ - --var version=1.5.0 --var app=mc-server-runner --file {{.app}} \ + --var version=1.6.0 --var app=mc-server-runner --file {{.app}} \ --from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ diff --git a/README.md b/README.md index b5d866bc..d1cf32b9 100644 --- a/README.md +++ b/README.md @@ -1210,6 +1210,12 @@ If you would like to `docker attach` to the Minecraft server console with color > > Make to enable stdin and tty with `-it` when using `docker run` or `stdin_open: true` and `tty: true` when using docker compose. +### Server Shutdown Options + +To allow time for players to finish what they're doing during a graceful server shutdown, set `STOP_SERVER_ANNOUNCE_DELAY` to a number of seconds to delay after an announcement is posted by the server. + +> **NOTE** be sure to adjust Docker's shutdown timeout accordingly, such as using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/). + ### OpenJ9 Specific Options The openj9 image tags include specific variables to simplify configuration: diff --git a/start-minecraftFinalSetup b/start-minecraftFinalSetup index cf83c815..5359fe7f 100644 --- a/start-minecraftFinalSetup +++ b/start-minecraftFinalSetup @@ -173,6 +173,10 @@ function copyFilesForCurseForge() { } mcServerRunnerArgs="--stop-duration ${STOP_DURATION:-60}s" +if [[ ${STOP_SERVER_ANNOUNCE_DELAY} ]]; then + mcServerRunnerArgs="${mcServerRunnerArgs} --stop-server-announce-delay ${STOP_SERVER_ANNOUNCE_DELAY}s" +fi + if [[ ${TYPE} == "CURSE_INSTANCE" ]]; then if isTrue ${DEBUG_EXEC}; then set -x From 327f21f1bbc8328ac35c89fffe4cabbafba14d31 Mon Sep 17 00:00:00 2001 From: itzg Date: Sun, 1 Aug 2021 17:09:37 +0000 Subject: [PATCH 3/3] docs: Auto update markdown TOC --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1cf32b9..ae812249 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Memory Limit](#memory-limit) * [JVM Options](#jvm-options) * [Interactive and Color Console](#interactive-and-color-console) + * [Server Shutdown Options](#server-shutdown-options) * [OpenJ9 Specific Options](#openj9-specific-options) * [Enabling rolling logs](#enabling-rolling-logs) * [Timezone Configuration](#timezone-configuration) @@ -126,7 +127,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - +