From c3829aa4357d99e0cf8b0e5fc0b7eed09f4f5a05 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 18 Aug 2023 08:15:32 -0500 Subject: [PATCH] docs: clarified FORGE_VERSION usage (#2348) --- .../types-and-platforms/server-types/forge.md | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/docs/types-and-platforms/server-types/forge.md b/docs/types-and-platforms/server-types/forge.md index b54183b6..e0f03bc1 100644 --- a/docs/types-and-platforms/server-types/forge.md +++ b/docs/types-and-platforms/server-types/forge.md @@ -1,31 +1,36 @@ -Enable [Forge server](http://www.minecraftforge.net/) mode by adding a `-e TYPE=FORGE` to your command-line. +A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded, upgraded, and run by setting the environment variable `TYPE` to "FORGE". -The overall version is specified by `VERSION`, [as described in the section above](../../versions/minecraft.md) and will run the recommended Forge version by default. You can also choose to run a specific Forge version with `FORGE_VERSION`, such as `-e FORGE_VERSION=14.23.5.2854`. +!!! example -``` -docker run -d -v /path/on/host:/data \ - -e TYPE=FORGE \ - -e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 \ - -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server -``` + ``` + docker run -e TYPE=FORGE ... + ``` + + or in a compose file + ```yaml + environment: + TYPE: FORGE + ``` -To use a pre-downloaded Forge installer, place it in the attached `/data` directory and -specify the name of the installer file with `FORGE_INSTALLER`, such as: +The overall version is specified by `VERSION`, [as described in the section above](../../versions/minecraft.md) and provides the same benefits of upgrading as new versions are released. By default, the recommended version of Forge for that Minecraft version will be selected. The latest version can be selected instead by setting the environment variable `FORGE_VERSION` to "latest". You can also choose a specific Forge version by setting `FORGE_VERSION` with that version, such as "14.23.5.2854". -``` -docker run -d -v /path/on/host:/data ... \ - -e FORGE_INSTALLER=forge-1.11.2-13.20.0.2228-installer.jar ... -``` +!!! example -To download a Forge installer from a custom location, such as your own file repository, specify -the URL with `FORGE_INSTALLER_URL`, such as: + ``` + docker run -e TYPE=FORGE -e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 ... + ``` + + or in a compose file + ```yaml + environment: + TYPE: FORGE + VERSION: "1.12.2" + FORGE_VERSION: "14.23.5.2854" + ``` -``` -docker run -d -v /path/on/host:/data ... \ - -e FORGE_INSTALLER_URL=http://HOST/forge-1.11.2-13.20.0.2228-installer.jar ... -``` +To use a pre-downloaded Forge installer, place it in a location mounted into the container and specify the container path with `FORGE_INSTALLER`. To download a Forge installer from a custom location, such as your own file repository, specify the URL with `FORGE_INSTALLER_URL`. -In both of the cases above, there is no need for the `VERSION` or `FORGEVERSION` variables. +In both of the cases above, there is no need for the `VERSION` or `FORGE_VERSION` variables. !!! note