Skip to content

Commit 350bada

Browse files
authored
1 parent 86354f5 commit 350bada

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
services:
22
mc:
3-
# FTBA support is only available in non-Alpine images
4-
image: itzg/minecraft-server:${IMAGE_TAG:-java8-multiarch}
3+
image: itzg/minecraft-server
54
ports:
65
# expose the Minecraft server port outside of container
7-
- 25565:25565
6+
- "25565:25565"
87
environment:
98
# REQUIRED for all types
109
EULA: "TRUE"
1110
# Set server type (vs the default of vanilla)
1211
TYPE: FTBA
13-
# Use Pack ID from https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/
14-
FTB_MODPACK_ID: "31"
15-
FTB_MODPACK_VERSION_ID: ""
12+
# Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about
13+
FTB_MODPACK_ID: "119"
14+
# FTB_MODPACK_VERSION_ID: ""
1615
volumes:
1716
# use a named, managed volume for data volume
18-
- ftba:/data
17+
- data:/data
1918

2019
volumes:
2120
# declared the named volume, but use default/local storage engine
22-
ftba: {}
21+
data: {}

scripts/start-deployFTBA

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

33
: "${FTB_FORCE_REINSTALL:=false}"
4+
: "${FTB_BASE_URL:=https://api.feed-the-beast.com/v1/modpacks}"
5+
# Legacy base URL was https://api.modpacks.ch
46

57
ftbInstallMarker=".ftb-installed"
68

@@ -29,7 +31,7 @@ if ! [[ ${FTB_MODPACK_ID} =~ [0-9]+ ]]; then
2931
fi
3032

3133
if [[ ! $FTB_MODPACK_VERSION_ID ]]; then
32-
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
34+
if ! FTB_MODPACK_VERSION_ID=$(curl -fsSL "${FTB_BASE_URL}/public/modpack/${FTB_MODPACK_ID}" | jq -r '.versions | sort_by(.updated)[-1].id'); then
3335
logError "Unable to resolve latest modpack version ID for modpack ${FTB_MODPACK_ID}"
3436
exit 1
3537
fi
@@ -42,14 +44,19 @@ if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "
4244
ftbInstaller=/data/ftb-installer
4345
arm=
4446
if ! [[ -f "${ftbInstaller}" ]]; then
45-
log "Downloading FTB installer"
4647
if [ "$(uname -m)" == "aarch64" ]; then
47-
log "Downloading ARM installer"
48+
log "Downloading FTB installer for ARM"
4849
arm="/arm"
4950
else
50-
log "Downloading x86 installer"
51+
log "Downloading FTB installer for x86"
52+
fi
53+
# Example: https://api.feed-the-beast.com/v1/modpacks/public/modpack/119/12252/server/linux
54+
# https://api.feed-the-beast.com/v1/modpacks/public/modpack/119/12252/server/arm/linux
55+
# 1-1 is a placeholder modpack for just grabbing the installer
56+
if ! get -o "${ftbInstaller}" "${FTB_BASE_URL}/public/modpack/1/1/server${arm}/linux"; then
57+
logError "Failed to download FTB installer"
58+
exit 1
5159
fi
52-
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server${arm}/linux -o "${ftbInstaller}"
5360
chmod +x "${ftbInstaller}"
5461
fi
5562

0 commit comments

Comments
 (0)