Skip to content

Commit

Permalink
oops purpur dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
DoggySazHi committed Feb 5, 2024
1 parent 72b6c84 commit a1f1475
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ignite.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ ENV\
ANSIBLE_PULL_BRANCH=master\
UPDATE_DATA_OWNER=true\
SERVER_NAME=dev\
HOME=/data
HOME=/data\
USE_IGNITE_LOADER=true

WORKDIR /opt/minecraft

Expand All @@ -26,9 +27,6 @@ RUN wget -nv -O keepup.zip https://github.com/MineInAbyss/Keepup/releases/downlo
&& chmod +x /usr/local/bin/keepup \
&& rm -rf keepup.zip keepup-${KEEPUP_VERSION}

# Download Ignite loader
RUN wget -nv -O /data/ignite.jar https://github.com/vectrix-space/ignite/releases/latest/download/ignite.jar

# Copy over scripts
COPY scripts/dev /scripts/dev
RUN chmod +x /scripts/dev/*
Expand Down
1 change: 1 addition & 0 deletions scripts/dev/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e

. /scripts/dev/ansible
. /scripts/dev/keepup
. /scripts/dev/ignite

if [ "$UPDATE_DATA_OWNER" = "true" ]; then
echo "Updating owner for /data to $UID:$GID"
Expand Down
65 changes: 65 additions & 0 deletions scripts/dev/ignite
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash
set -euo pipefail

# Pretty much all copied from docker-minecraft-server in "start-deployPurpur" since we use a custom target to Ignite

if [ "$USE_IGNITE_LOADER" = "true" ]; then
echo "Setting up Ignite loader, forcing Purpur server"

IFS=$'\n\t'

: "${PURPUR_BUILD:=LATEST}"
: "${PURPUR_DOWNLOAD_URL:=}"

# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x

resultsFile=/data/.purpur.env

if [[ $PURPUR_DOWNLOAD_URL ]]; then
if ! mc-image-helper install-purpur \
--output-directory=/data \
--results-file="$resultsFile" \
--url="$PURPUR_DOWNLOAD_URL}"; then
log "ERROR: failed to download from custom Purpur URL"
exit 1
fi
# grab SERVER and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a

else
args=(
--output-directory=/data
--results-file="$resultsFile"
--version="$VERSION"
)
if [[ $PURPUR_BUILD ]]; then
args+=(--build="$PURPUR_BUILD")
fi
if ! mc-image-helper install-purpur "${args[@]}"; then
log "ERROR: failed to download Purpur"
exit 1
fi
# grab SERVER and export it
set -a
# shellcheck disable=SC1090
source "${resultsFile}"
set +a
fi

if isTrue "$USE_IGNITE_LOADER"; then
downloadUrl="https://github.com/vectrix-space/ignite/releases/latest/download/ignite.jar"

if ! IGNITE_JAR=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
log "ERROR: failed to download Ignite loader jar from $downloadUrl"
exit 1
fi
fi

# Normalize on Spigot for later operations
export FAMILY=SPIGOT
fi

0 comments on commit a1f1475

Please sign in to comment.