mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-15 14:52:27 +00:00
Merge from master
CONFLICT (content): Merge conflict in start-configuration
This commit is contained in:
commit
51c5902db0
5 changed files with 69 additions and 2 deletions
2
.github/workflows/build-multiarch.yml
vendored
2
.github/workflows/build-multiarch.yml
vendored
|
@ -68,6 +68,8 @@ jobs:
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.prep.outputs.tags }}
|
tags: ${{ steps.prep.outputs.tags }}
|
||||||
|
# ensure latest base image is used
|
||||||
|
pull: true
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
labels: |
|
labels: |
|
||||||
|
|
12
README.md
12
README.md
|
@ -499,6 +499,18 @@ Extra variables:
|
||||||
- `PURPUR_BUILD=LATEST` : set a specific Purpur build to use
|
- `PURPUR_BUILD=LATEST` : set a specific Purpur build to use
|
||||||
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||||
|
|
||||||
|
## Running a Yatopia server
|
||||||
|
|
||||||
|
A [Yatopia](https://github.com/YatopiaMC/Yatopia) server, which is a "blazing fast Tuinity fork with best in class performance".
|
||||||
|
|
||||||
|
-e TYPE=YATOPIA
|
||||||
|
|
||||||
|
> NOTE: the `VERSION` variable is used to locate the Yatopia version to download
|
||||||
|
|
||||||
|
Extra variables:
|
||||||
|
- `RELEASE=stable` : set to `stable` or `latest`
|
||||||
|
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||||
|
|
||||||
## Running a Magma server
|
## Running a Magma server
|
||||||
|
|
||||||
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
|
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
|
||||||
|
|
|
@ -4,6 +4,7 @@ IFS=$'\n\t'
|
||||||
|
|
||||||
. ${SCRIPTS:-/}start-utils
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
|
||||||
|
: ${EULA:=}
|
||||||
: ${PROXY:=}
|
: ${PROXY:=}
|
||||||
: ${RCON_PASSWORD_FILE:=}
|
: ${RCON_PASSWORD_FILE:=}
|
||||||
|
|
||||||
|
@ -108,7 +109,11 @@ case "${TYPE^^}" in
|
||||||
exec ${SCRIPTS:-/}start-deployFTBA "$@"
|
exec ${SCRIPTS:-/}start-deployFTBA "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
CURSEFORGE|FTB)
|
FTB|CURSEFORGE)
|
||||||
|
log "**********************************************************************"
|
||||||
|
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||||
|
log " since some mods require Java 8"
|
||||||
|
log "**********************************************************************"
|
||||||
exec ${SCRIPTS:-/}start-deployCF "$@"
|
exec ${SCRIPTS:-/}start-deployCF "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -144,11 +149,15 @@ case "${TYPE^^}" in
|
||||||
exec ${SCRIPTS:-/}start-deployPurpur "$@"
|
exec ${SCRIPTS:-/}start-deployPurpur "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
YATOPIA)
|
||||||
|
exec ${SCRIPTS:-/}start-deployYatopia "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
log "Invalid type: '$TYPE'"
|
log "Invalid type: '$TYPE'"
|
||||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
||||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER"
|
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
30
start-deployYatopia
Normal file
30
start-deployYatopia
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
isDebugging && set -x
|
||||||
|
|
||||||
|
: ${VANILLA_VERSION:?}
|
||||||
|
: ${RELEASE:=stable}
|
||||||
|
: ${FORCE_REDOWNLOAD:=false}
|
||||||
|
|
||||||
|
requireEnum RELEASE stable latest
|
||||||
|
|
||||||
|
export SERVER="yatopia-${RELEASE}-${VANILLA_VERSION}.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||||
|
downloadUrl="https://api.yatopiamc.org/v2/${RELEASE}Build/download?branch=ver/${VANILLA_VERSION}"
|
||||||
|
log "Downloading Yatopia from $downloadUrl ..."
|
||||||
|
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||||
|
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Normalize on Spigot for later operations
|
||||||
|
export TYPE=SPIGOT
|
||||||
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
14
start-utils
14
start-utils
|
@ -144,6 +144,20 @@ requireVar() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
requireEnum() {
|
||||||
|
var=${1?}
|
||||||
|
shift
|
||||||
|
|
||||||
|
for allowed in $*; do
|
||||||
|
if [[ ${!var} = $allowed ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
log "ERROR: $var must be set to one of $@"
|
||||||
|
# exit 1
|
||||||
|
}
|
||||||
|
|
||||||
function writeEula() {
|
function writeEula() {
|
||||||
if ! echo "# Generated via Docker
|
if ! echo "# Generated via Docker
|
||||||
# $(date)
|
# $(date)
|
||||||
|
|
Loading…
Reference in a new issue