mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-28 13:15:42 +00:00
Switch FTBA to use https://api.feed-the-beast.com/v1 (#3174)
This commit is contained in:
1 parent
86354f5ec2
commit
350bada3a8
2 files changed
+19
-13
No files matched your search
@@ -1,22 +1,21 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
# FTBA support is only available in non-Alpine images
|
image: itzg/minecraft-server
|
||||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8-multiarch}
|
|
||||||
ports:
|
ports:
|
||||||
# expose the Minecraft server port outside of container
|
# expose the Minecraft server port outside of container
|
||||||
- 25565:25565
|
- "25565:25565"
|
||||||
environment:
|
environment:
|
||||||
# REQUIRED for all types
|
# REQUIRED for all types
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
# Set server type (vs the default of vanilla)
|
# Set server type (vs the default of vanilla)
|
||||||
TYPE: FTBA
|
TYPE: FTBA
|
||||||
# Use Pack ID from https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/
|
# Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about
|
||||||
FTB_MODPACK_ID: "31"
|
FTB_MODPACK_ID: "119"
|
||||||
FTB_MODPACK_VERSION_ID: ""
|
# FTB_MODPACK_VERSION_ID: ""
|
||||||
volumes:
|
volumes:
|
||||||
# use a named, managed volume for data volume
|
# use a named, managed volume for data volume
|
||||||
- ftba:/data
|
- data:/data
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# declared the named volume, but use default/local storage engine
|
# declared the named volume, but use default/local storage engine
|
||||||
ftba: {}
|
data: {}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
: "${FTB_FORCE_REINSTALL:=false}"
|
: "${FTB_FORCE_REINSTALL:=false}"
|
||||||
|
: "${FTB_BASE_URL:=https://api.feed-the-beast.com/v1/modpacks}"
|
||||||
|
# Legacy base URL was https://api.modpacks.ch
|
||||||
|
|
||||||
ftbInstallMarker=".ftb-installed"
|
ftbInstallMarker=".ftb-installed"
|
||||||
|
|
||||||
@@ -29,7 +31,7 @@ if ! [[ ${FTB_MODPACK_ID} =~ [0-9]+ ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! $FTB_MODPACK_VERSION_ID ]]; then
|
if [[ ! $FTB_MODPACK_VERSION_ID ]]; then
|
||||||
if ! FTB_MODPACK_VERSION_ID=$(curl -fsSL https://api.modpacks.ch/public/modpack/${FTB_MODPACK_ID} | jq -r '.versions | sort_by(.updated)[-1].id'); then
|
if ! FTB_MODPACK_VERSION_ID=$(curl -fsSL "${FTB_BASE_URL}/public/modpack/${FTB_MODPACK_ID}" | jq -r '.versions | sort_by(.updated)[-1].id'); then
|
||||||
logError "Unable to resolve latest modpack version ID for modpack ${FTB_MODPACK_ID}"
|
logError "Unable to resolve latest modpack version ID for modpack ${FTB_MODPACK_ID}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -42,14 +44,19 @@ if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "
|
|||||||
ftbInstaller=/data/ftb-installer
|
ftbInstaller=/data/ftb-installer
|
||||||
arm=
|
arm=
|
||||||
if ! [[ -f "${ftbInstaller}" ]]; then
|
if ! [[ -f "${ftbInstaller}" ]]; then
|
||||||
log "Downloading FTB installer"
|
|
||||||
if [ "$(uname -m)" == "aarch64" ]; then
|
if [ "$(uname -m)" == "aarch64" ]; then
|
||||||
log "Downloading ARM installer"
|
log "Downloading FTB installer for ARM"
|
||||||
arm="/arm"
|
arm="/arm"
|
||||||
else
|
else
|
||||||
log "Downloading x86 installer"
|
log "Downloading FTB installer for x86"
|
||||||
|
fi
|
||||||
|
# Example: https://api.feed-the-beast.com/v1/modpacks/public/modpack/119/12252/server/linux
|
||||||
|
# https://api.feed-the-beast.com/v1/modpacks/public/modpack/119/12252/server/arm/linux
|
||||||
|
# 1-1 is a placeholder modpack for just grabbing the installer
|
||||||
|
if ! get -o "${ftbInstaller}" "${FTB_BASE_URL}/public/modpack/1/1/server${arm}/linux"; then
|
||||||
|
logError "Failed to download FTB installer"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server${arm}/linux -o "${ftbInstaller}"
|
|
||||||
chmod +x "${ftbInstaller}"
|
chmod +x "${ftbInstaller}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user