diff --git a/docs/misc/healthcheck.md b/docs/misc/healthcheck.md index 920d5d52..1b364ffa 100644 --- a/docs/misc/healthcheck.md +++ b/docs/misc/healthcheck.md @@ -7,14 +7,14 @@ CONTAINER ID IMAGE COMMAND CREATED b418af073764 mc "/start" 43 seconds ago Up 41 seconds (healthy) 0.0.0.0:25565->25565/tcp, 25575/tcp mc ``` -You can also query the container's health in a script friendly way: +You can also query the container's health in a script-friendly way: ``` shell > docker container inspect -f "{{.State.Health.Status}}" mc healthy ``` -There's actually a wrapper script called `mc-health` that takes care of calling `mc-monitor status` with the correct arguments. If needing to customize the health checks parameters, such as in a compose file, then use something like the following in the service declaration: +There's actually a wrapper script called `mc-health` that takes care of calling `mc-monitor status` with the correct arguments. If needing to customize the health checks parameters, such as in a Compose file, then use something like the following in the service declaration: ``` yaml healthcheck: @@ -24,9 +24,16 @@ healthcheck: retries: 20 ``` -Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of healthchecks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`. +Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of health checks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`. -### Healthchecks for older versions +The [health check in a Compose service declaration](https://docs.docker.com/reference/compose-file/services/#healthcheck) can also be disabled using: -This container disables Healthchecks for Versions before b1.8 as those versions do not support any kind of server pinging. -For more information see [Server List Ping](https://wiki.vg/Server_List_Ping#Beta_1.8_to_1.3) +```yaml + healthcheck: + disable: true + test: ["NONE"] +``` + +### Health checks for older versions + +This container disables health checks for Minecraft versions before b1.8 as those versions do not support any kind of server pinging. For more information see [Server List Ping](https://minecraft.wiki/w/Java_Edition_protocol/Server_List_Ping#Beta_1.8_to_1.3). diff --git a/examples/ftba/compose.yml b/examples/ftba/compose.yml index ed910d03..95d625aa 100644 --- a/examples/ftba/compose.yml +++ b/examples/ftba/compose.yml @@ -12,6 +12,9 @@ services: # Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about FTB_MODPACK_ID: "119" # FTB_MODPACK_VERSION_ID: "" + MOTD: | + An FTB server running + %MODPACK_NAME% version %MODPACK_VERSION% MEMORY: 4G volumes: # use a named, managed volume for data volume diff --git a/scripts/start-deployFTBA b/scripts/start-deployFTBA index 8ebcf50b..ba020e03 100755 --- a/scripts/start-deployFTBA +++ b/scripts/start-deployFTBA @@ -36,6 +36,12 @@ function getModLoaderVersion() { function getMinecraftVersion() { jq -r ".modPackTargets.mcVersion" ${ftbManifest} } +function getModpackName() { + jq -r ".name" ${ftbManifest} +} +function getModpackVersion() { + jq -r ".versionName" ${ftbManifest} +} if [[ $(getDistro) = alpine ]]; then logError "The FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead." @@ -102,7 +108,9 @@ modLoader="$(getModLoaderName)" modLoaderVersion="$(getModLoaderVersion)" mcVersion=$(getMinecraftVersion) VERSION="$mcVersion" -export VERSION +MODPACK_NAME=$(getModpackName) +MODPACK_VERSION=$(getModpackVersion) +export VERSION MODPACK_NAME MODPACK_VERSION variants=( run.sh