-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added: STOP_SERVER_DELAY_COMMAND #4109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+13
−2
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,10 +50,12 @@ If this behavior interferes with the log content, then disable TTY or remove the | |
|
|
||
| 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. | ||
|
|
||
| To set a custom command to run at the start of this delay period, set `STOP_SERVER_DELAY_COMMAND` to the full command. This will run in place of the announcement. | ||
|
|
||
| !!! warning "Increase stop grace period" | ||
|
|
||
| The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed. | ||
| The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed. | ||
|
|
||
| The grace period can be increased using [the -t option on `docker compose down`](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file. | ||
|
|
||
| The `STOP_SERVER_ANNOUNCE_DELAY` can be bypassed by sending a `SIGUSR1` signal to the `mc-server-runner` process. | ||
|
|
@@ -98,11 +100,13 @@ Set the environment variable `GENERATE_LOG4J2_CONFIG` to "true" to enable the fo | |
| You can customize various aspects of the logging behavior using environment variables: | ||
|
|
||
| - `LOG_LEVEL` : Root logger level (default: `info`) | ||
|
|
||
| ``` | ||
| -e LOG_LEVEL=debug | ||
| ``` | ||
|
|
||
| - `ROLLING_LOG_FILE_PATTERN` : Pattern for rolled log file names (default: `logs/%d{yyyy-MM-dd}-%i.log.gz`) | ||
|
|
||
| ``` | ||
| -e ROLLING_LOG_FILE_PATTERN="logs/archive/%d{yyyy-MM-dd}-%i.log.gz" | ||
| ``` | ||
|
|
@@ -128,6 +132,7 @@ For full control over how log messages are formatted, you can customize the Log4 | |
| ### Example configurations | ||
|
|
||
| Simple timestamp customization (most common use case): | ||
|
|
||
| ```yaml | ||
| environment: | ||
| # What you see in docker logs | ||
|
|
@@ -137,6 +142,7 @@ environment: | |
| ``` | ||
|
|
||
| Advanced customization: | ||
|
|
||
| ```yaml | ||
| environment: | ||
| LOG_LEVEL: debug | ||
|
|
@@ -191,14 +197,14 @@ Be sure to also increase the shutdown timeout described [here for docker compose | |
|
|
||
| ## Setup only | ||
|
|
||
| If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`. | ||
| If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`. | ||
|
|
||
| ## Enable Flare Flags | ||
|
|
||
| To enable the JVM flags required to fully support the [Flare profiling suite](https://blog.airplane.gg/flare), set the following variable: | ||
|
|
||
| -e USE_FLARE_FLAGS=true | ||
|
|
||
| Flare is built-in to Pufferfish/Purpur, and is available in [plugin form](https://github.com/TECHNOVE/FlarePlugin) for other server types. | ||
|
|
||
| ## Enable support for optimized SIMD operations | ||
|
|
@@ -227,8 +233,8 @@ environment: | |
|
|
||
| The files will be downloaded to `/data/` relative paths, so `plugins/WorldEdit` will be saved as `/data/plugins/WorldEdit/config.yml`. | ||
|
|
||
| !!! note | ||
| The downloaded files can be further processed using [environment variable replacement](interpolating.md) or [patch definitions](interpolating.md#patching-existing-files) | ||
| !!! note | ||
| The downloaded files can be further processed using [environment variable replacement](interpolating.md) or [patch definitions](interpolating.md#patching-existing-files) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The indent was important here for the admonition |
||
|
|
||
| ## Enable timestamps in init logs | ||
|
|
||
|
|
||
|
itzg marked this conversation as resolved.
|
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.