Added support for FOLIA_CHANNEL (#3029)

This commit is contained in:
Geoff Bourne 2024-08-03 10:16:27 -05:00 committed by GitHub
parent 1c780ff655
commit 06190ef9d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 3 deletions

View file

@ -65,13 +65,19 @@ Extra variables:
### Folia
Enable Folia server mode by adding a `-e TYPE=FOLIA` to your command-line.
A [Folia server](https://papermc.io/software/folia) can be used by setting the environment variable `TYPE` to "FOLIA".
By default, the container will run the latest build of [Folia server](https://papermc.io/downloads), but you can also choose to run a specific build with `-e FOLIABUILD=26`.
By default, the container will run the latest experimental build of [Folia server](https://papermc.io/downloads), but you can also choose to run a specific build with `-e FOLIABUILD=26`. The release channel can be changed with the variable `FOLIA_CHANNEL`; however, only experimental builds are available at this time.
!!! example
Using `docker run`
```
docker run -d -v /path/on/host:/data \
-e TYPE=FOLIA \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
```
If you are hosting your own copy of Folia you can override the download URL with `FOLIA_DOWNLOAD_URL=<url>`.

View file

@ -1,5 +1,12 @@
#!/bin/bash
: "${FOLIA_CHANNEL:=experimental}"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
set -o pipefail
handleDebugMode
if [[ $FOLIA_DOWNLOAD_URL ]]; then
export PAPER_DOWNLOAD_URL="$FOLIA_DOWNLOAD_URL"
fi
@ -8,4 +15,7 @@ if [[ $FOLIABUILD ]]; then
export PAPERBUILD="$FOLIABUILD"
fi
PAPER_PROJECT="folia" PAPER_NAME="FoliaMC" exec "${SCRIPTS:-/}start-deployPaper" "$@"
PAPER_PROJECT="folia" \
PAPER_NAME="FoliaMC" \
PAPER_CHANNEL="${FOLIA_CHANNEL}" \
exec "${SCRIPTS:-/}start-deployPaper" "$@"