mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
154 Commits
2024.6.1
...
itzg-patch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
855b664e47 | ||
|
|
0e3f75879d | ||
|
|
b595c107bb | ||
|
|
3613a30709 | ||
|
|
da1b052516 | ||
|
|
abb3af07ba | ||
|
|
4f1a09b2a9 | ||
|
|
4e63990bd7 | ||
|
|
883d64159f | ||
|
|
d35b78c14e | ||
|
|
d420c523a3 | ||
|
|
1e28390d1b | ||
|
|
f79ef8f3a7 | ||
|
|
a485f84797 | ||
|
|
51ba6a2c71 | ||
|
|
e5b7a5829f | ||
|
|
6a994acc52 | ||
|
|
f46298c6b8 | ||
|
|
a72fb19ec6 | ||
|
|
4914ffbe40 | ||
|
|
03f9037668 | ||
|
|
621bafb4f2 | ||
|
|
9a20ab7b48 | ||
|
|
6514ed85a0 | ||
|
|
6391be5251 | ||
|
|
2d1a35dba8 | ||
|
|
236ed74295 | ||
|
|
05cbbfc9e3 | ||
|
|
678dda5d4a | ||
|
|
c3e96f6ac6 | ||
|
|
1f6288efd8 | ||
|
|
787a31a5f1 | ||
|
|
66a6df4029 | ||
|
|
de19794a5f | ||
|
|
0582a8ab97 | ||
|
|
94def951b6 | ||
|
|
755f1c5352 | ||
|
|
4804c4bb67 | ||
|
|
58302f9490 | ||
|
|
c6dbc88ea9 | ||
|
|
a31440476c | ||
|
|
350bada3a8 | ||
|
|
86354f5ec2 | ||
|
|
f1d0736689 | ||
|
|
e2015afdb4 | ||
|
|
4555cf433e | ||
|
|
e090b0aef5 | ||
|
|
a03d02e59e | ||
|
|
21ad4146aa | ||
|
|
6fd275cdc6 | ||
|
|
954bb887d3 | ||
|
|
ec8e689132 | ||
|
|
039b90839b | ||
|
|
bfc75cad21 | ||
|
|
f178b99459 | ||
|
|
2680e02b34 | ||
|
|
14f96d11e5 | ||
|
|
b41e63cec5 | ||
|
|
1b5c3bd8b9 | ||
|
|
2412f6a740 | ||
|
|
d33d1e7f69 | ||
|
|
868bcb7272 | ||
|
|
f872eb55cc | ||
|
|
e69ee85f8e | ||
|
|
bef7b4719f | ||
|
|
a356c6810e | ||
|
|
f7c1e9d2c1 | ||
|
|
ae69de8ca0 | ||
|
|
a9140fb84a | ||
|
|
07708209a6 | ||
|
|
fd20fc9654 | ||
|
|
4085d28773 | ||
|
|
7dbeac99d3 | ||
|
|
e4773e47cb | ||
|
|
da4f7d0dd8 | ||
|
|
afbdfea0bb | ||
|
|
f5da624789 | ||
|
|
fdc1f446af | ||
|
|
1b8b694036 | ||
|
|
7974baca7e | ||
|
|
d4af9b1ae5 | ||
|
|
34187adca3 | ||
|
|
d0a3ee3b64 | ||
|
|
6683c91b74 | ||
|
|
a0e274a7b7 | ||
|
|
5d8a152db2 | ||
|
|
df8f8f1716 | ||
|
|
295996b033 | ||
|
|
5ac7b1d108 | ||
|
|
f420b92d05 | ||
|
|
96019b02ee | ||
|
|
c271ad99e0 | ||
|
|
222b522bc1 | ||
|
|
dd3c7a4b77 | ||
|
|
5340121d37 | ||
|
|
9546dd322d | ||
|
|
739cd5a320 | ||
|
|
09b716dd6b | ||
|
|
a7ecd92244 | ||
|
|
8685cc05c7 | ||
|
|
235141fcf3 | ||
|
|
cea839aa67 | ||
|
|
6d9c6d64e2 | ||
|
|
5d8b99c454 | ||
|
|
5113afccb5 | ||
|
|
0a7b1ed817 | ||
|
|
4fe1c2c7b4 | ||
|
|
8c0c27aef9 | ||
|
|
e9d7668cd8 | ||
|
|
06190ef9d0 | ||
|
|
1c780ff655 | ||
|
|
866f9c9d45 | ||
|
|
4da0e93c0f | ||
|
|
5415879cd2 | ||
|
|
28737a99bc | ||
|
|
f4634c3fd9 | ||
|
|
46ee2331bf | ||
|
|
edffc58589 | ||
|
|
be846dd369 | ||
|
|
de1d7f422c | ||
|
|
b393b22136 | ||
|
|
d7c6a7d2b6 | ||
|
|
0ff8e68f01 | ||
|
|
a71c5384b4 | ||
|
|
379cef3c7e | ||
|
|
163a268770 | ||
|
|
f84ae66af3 | ||
|
|
58face9c1b | ||
|
|
b8e6eea265 | ||
|
|
78b55df635 | ||
|
|
0f9941373b | ||
|
|
6ac313ae71 | ||
|
|
bc0a87cc53 | ||
|
|
5baf398af3 | ||
|
|
8dac5d1428 | ||
|
|
4232a981e8 | ||
|
|
b89c698676 | ||
|
|
8a5b5bbe70 | ||
|
|
11d8d917f2 | ||
|
|
2023f5aa31 | ||
|
|
bcd8db1306 | ||
|
|
62ce504da3 | ||
|
|
c87145a5e4 | ||
|
|
c4f69bf577 | ||
|
|
67b790dfed | ||
|
|
a55d575375 | ||
|
|
70cc1298c2 | ||
|
|
b9a61c8852 | ||
|
|
75496d6e0b | ||
|
|
50caaf98ef | ||
|
|
14a8f903ae | ||
|
|
c70f9c3fff | ||
|
|
a933e92460 | ||
|
|
4c42a3e46c |
26
.github/workflows/build-multiarch.yml
vendored
26
.github/workflows/build-multiarch.yml
vendored
@@ -11,6 +11,7 @@ on:
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -30,7 +31,6 @@ jobs:
|
||||
- java8-graalvm-ce
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
- java8-alpine
|
||||
- java11
|
||||
include:
|
||||
# JAVA 21:
|
||||
@@ -60,10 +60,6 @@ jobs:
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:17-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-jdk
|
||||
baseImage: eclipse-temurin:17-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
@@ -78,10 +74,6 @@ jobs:
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-alpine
|
||||
baseImage: openjdk:8-jre-alpine3.9
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-graalvm-ce
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:java8
|
||||
platforms: linux/amd64
|
||||
@@ -101,14 +93,14 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5.5.1
|
||||
uses: docker/metadata-action@v5.6.1
|
||||
with:
|
||||
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
|
||||
# then the use of ${{ github.repository_owner }} will need to be replaced.
|
||||
@@ -136,13 +128,13 @@ jobs:
|
||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.3.0
|
||||
uses: docker/setup-buildx-action@v3.8.0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.0.0
|
||||
uses: docker/setup-qemu-action@v3.3.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v5.4.0
|
||||
uses: docker/build-push-action@v6.12.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
@@ -165,14 +157,14 @@ jobs:
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3.2.0
|
||||
uses: docker/login-action@v3.3.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3.2.0
|
||||
uses: docker/login-action@v3.3.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -180,7 +172,7 @@ jobs:
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5.4.0
|
||||
uses: docker/build-push-action@v6.12.0
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
|
||||
2
.github/workflows/discord.yml
vendored
2
.github/workflows/discord.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
- name: on-publish
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
uses: SethCohen/github-releases-to-discord@v1.15.0
|
||||
uses: SethCohen/github-releases-to-discord@v1.16.2
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: on-success
|
||||
|
||||
9
.github/workflows/verify-pr.yml
vendored
9
.github/workflows/verify-pr.yml
vendored
@@ -8,6 +8,7 @@ on:
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
- "docker-compose*.yml"
|
||||
- "mkdocs.yml"
|
||||
|
||||
@@ -46,16 +47,16 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.3.0
|
||||
uses: docker/setup-buildx-action@v3.8.0
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v5.4.0
|
||||
uses: docker/build-push-action@v6.12.0
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
# ensure latest base image is used
|
||||
@@ -65,7 +66,7 @@ jobs:
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v5.4.0
|
||||
uses: docker/build-push-action@v6.12.0
|
||||
with:
|
||||
# Only build single platform since loading multi-arch image into daemon fails with
|
||||
# "docker exporter does not currently support exporting manifest lists"
|
||||
|
||||
25
Dockerfile
25
Dockerfile
@@ -1,5 +1,3 @@
|
||||
# syntax = docker/dockerfile:1.3
|
||||
|
||||
ARG BASE_IMAGE=eclipse-temurin:21-jre
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
@@ -9,9 +7,14 @@ ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
# The following three arg/env vars get used by the platform specific "install-packages" script
|
||||
ARG EXTRA_DEB_PACKAGES=""
|
||||
ARG EXTRA_DNF_PACKAGES=""
|
||||
ARG EXTRA_ALPINE_PACKAGES=""
|
||||
ARG FORCE_INSTALL_PACKAGES=1
|
||||
RUN --mount=target=/build,source=build \
|
||||
TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages
|
||||
TARGET=${TARGETARCH}${TARGETVARIANT} \
|
||||
/build/run.sh install-packages
|
||||
|
||||
RUN --mount=target=/build,source=build \
|
||||
/build/run.sh setup-user
|
||||
@@ -23,31 +26,31 @@ EXPOSE 25565
|
||||
ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
ARG EASY_ADD_VERSION=0.8.6
|
||||
ARG EASY_ADD_VERSION=0.8.8
|
||||
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
ARG RESTIFY_VERSION=1.7.3
|
||||
ARG RESTIFY_VERSION=1.7.5
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG RCON_CLI_VERSION=1.6.7
|
||||
ARG RCON_CLI_VERSION=1.6.9
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_MONITOR_VERSION=0.12.12
|
||||
ARG MC_MONITOR_VERSION=0.15.0
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.12.2
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.12.3
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.39.0
|
||||
ARG MC_HELPER_VERSION=1.40.11
|
||||
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||
# used for cache busting local copy of mc-image-helper
|
||||
ARG MC_HELPER_REV=1
|
||||
@@ -61,7 +64,7 @@ WORKDIR /data
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
# End user MUST set EULA and change RCON_PASSWORD
|
||||
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000
|
||||
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8
|
||||
|
||||
COPY --chmod=755 scripts/start* /
|
||||
COPY --chmod=755 bin/ /usr/local/bin/
|
||||
@@ -74,4 +77,4 @@ RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPa
|
||||
RUN dos2unix /start* /auto/*
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m --interval=5s --retries=24 CMD mc-health
|
||||
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
|
||||
There you will find things like
|
||||
- [Quick start with Docker Compose](https://docker-minecraft-server.readthedocs.io/en/latest/#using-docker-compose)
|
||||
- Running [different versions of Minecraft](https://docker-minecraft-server.readthedocs.io/en/latest/versions/minecraft/) and using [various server types](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
|
||||
- Running [different versions of Minecraft](https://docker-minecraft-server.readthedocs.io/en/latest/versions/minecraft/) and using [various server types](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/) for Java Edition
|
||||
- [Setting server properties via container environment variables](https://docker-minecraft-server.readthedocs.io/en/latest/configuration/server-properties/)
|
||||
- [Managing mods and plugins with automated downloads and cleanup](https://docker-minecraft-server.readthedocs.io/en/latest/mods-and-plugins/)
|
||||
- [Using various modpack providers/platforms](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
|
||||
- ...and much more
|
||||
|
||||
There are also many examples located in [the examples directory](examples) of this repo.
|
||||
There are also many examples located in [the examples directory](examples) of this repo.
|
||||
|
||||
This image only supports Java edition natively; however, if looking for a server that is compatible with Bedrock edition, then use [itzg/minecraft-bedrock-server](https://github.com/itzg/docker-minecraft-bedrock-server) or [refer to this section](https://docker-minecraft-server.readthedocs.io/en/latest/misc/examples/#bedrock-compatible-server) to add Bedrock compatibility to a Java edition server.
|
||||
|
||||
@@ -3,26 +3,22 @@
|
||||
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
|
||||
|
||||
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then
|
||||
echo "ERROR: console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
|
||||
error "Console pipe needs to be enabled by setting CREATE_CONSOLE_IN_PIPE to true"
|
||||
fi
|
||||
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "ERROR: pass console commands as arguments"
|
||||
error "Pass console commands as arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
|
||||
echo "ERROR: named pipe ${CONSOLE_IN_NAMED_PIPE} is missing"
|
||||
error "Named pipe ${CONSOLE_IN_NAMED_PIPE} is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
if [[ $(getDistro) == alpine ]]; then
|
||||
exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
else
|
||||
exec gosu minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
fi
|
||||
if [ "$(id -u)" = 0 -a $UID != 0 ]; then
|
||||
exec $(getSudoFromDistro) minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE}'"
|
||||
else
|
||||
echo "$@" >"${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
|
||||
echo "$@" >"${CONSOLE_IN_NAMED_PIPE}"
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "WARNING: mcstatus is deprecated; calling mc-monitor instead"
|
||||
warning "mcstatus is deprecated; calling mc-monitor instead"
|
||||
|
||||
##### mcstatus shim for mc-monitor
|
||||
# handles translating calls to
|
||||
@@ -11,8 +11,8 @@ addr="$1"
|
||||
|
||||
IFS=':'
|
||||
read -a parts <<< "${addr}"
|
||||
args=(--host ${parts[0]})
|
||||
if [[ ${#parts[*]} -gt 1 ]]; then
|
||||
exec mc-monitor status --host ${parts[0]} --port ${parts[1]}
|
||||
else
|
||||
exec mc-monitor status --host ${parts[0]}
|
||||
args+=(--port ${parts[1]})
|
||||
fi
|
||||
exec mc-monitor ${args[@]}
|
||||
@@ -44,7 +44,7 @@ do
|
||||
if [[ "$RCON_CMDS_STARTUP" ]]; then
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_STARTUP"
|
||||
done <<< "$(echo -e "$RCON_CMDS_STARTUP")"
|
||||
fi
|
||||
if
|
||||
[[ -z "$RCON_CMDS_ON_CONNECT" ]] &&
|
||||
@@ -66,7 +66,7 @@ do
|
||||
logRcon "First Clients has Connected, running first connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_FIRST_CONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_FIRST_CONNECT")"
|
||||
fi
|
||||
|
||||
# When a client joins
|
||||
@@ -74,13 +74,13 @@ do
|
||||
logRcon "Clients have Connected, running connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_CONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_ON_CONNECT")"
|
||||
# When a client leaves
|
||||
elif (( CURR_CLIENTCONNECTIONS < CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_DISCONNECT" ]]; then
|
||||
logRcon "Clients have Disconnected, running disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_DISCONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_ON_DISCONNECT")"
|
||||
fi
|
||||
|
||||
# Last client connection
|
||||
@@ -89,7 +89,7 @@ do
|
||||
logRcon "ALL Clients have Disconnected, running last disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_LAST_DISCONNECT"
|
||||
done <<< "$(echo -e "$RCON_CMDS_LAST_DISCONNECT")"
|
||||
fi
|
||||
CLIENTCONNECTIONS=$CURR_CLIENTCONNECTIONS
|
||||
;;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Install necessary packages
|
||||
# shellcheck disable=SC2086
|
||||
apk add --no-cache -U \
|
||||
openssl \
|
||||
imagemagick \
|
||||
@@ -14,26 +16,33 @@ apk add --no-cache -U \
|
||||
procps \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils \
|
||||
curl \
|
||||
iputils \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
ncurses \
|
||||
sudo \
|
||||
tar \
|
||||
zstd \
|
||||
nfs-utils \
|
||||
libpcap \
|
||||
libwebp \
|
||||
libcap
|
||||
libcap \
|
||||
${EXTRA_ALPINE_PACKAGES}
|
||||
|
||||
# Patched knockd
|
||||
# Download and install patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-alpine-amd64.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
# Set Git credentials globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
@@ -1,12 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname -m) == "aarch64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-arm64
|
||||
chmod +x /bin/gosu
|
||||
elif [[ $(uname -m) == "x86_64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64
|
||||
chmod +x /bin/gosu
|
||||
else
|
||||
echo "Not supported!"
|
||||
exit 1
|
||||
fi
|
||||
set -euo pipefail
|
||||
|
||||
GOSU_VERSION="1.16"
|
||||
GOSU_BASE_URL="https://github.com/tianon/gosu/releases/download/$GOSU_VERSION"
|
||||
|
||||
case $(uname -m) in
|
||||
"aarch64")
|
||||
GOSU_ARCH="gosu-arm64"
|
||||
;;
|
||||
"x86_64")
|
||||
GOSU_ARCH="gosu-amd64"
|
||||
;;
|
||||
*)
|
||||
echo "Architecture not supported!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -sL -o /bin/gosu "${GOSU_BASE_URL}/${GOSU_ARCH}"
|
||||
chmod +x /bin/gosu
|
||||
|
||||
@@ -4,20 +4,26 @@ export TARGET
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Install and configure dnf
|
||||
microdnf install dnf -y
|
||||
|
||||
dnf install 'dnf-command(config-manager)' -y
|
||||
dnf config-manager --set-enabled ol8_codeready_builder
|
||||
tee /etc/yum.repos.d/ol8-epel.repo<<EOF
|
||||
|
||||
# Add EPEL repository
|
||||
tee /etc/yum.repos.d/ol8-epel.repo <<EOF
|
||||
[ol8_developer_EPEL]
|
||||
name= Oracle Linux \$releasever EPEL (\$basearch)
|
||||
name=Oracle Linux \$releasever EPEL (\$basearch)
|
||||
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
EOF
|
||||
|
||||
# Update system
|
||||
dnf update -y
|
||||
|
||||
# Install necessary packages
|
||||
# shellcheck disable=SC2086
|
||||
dnf install -y \
|
||||
ImageMagick \
|
||||
file \
|
||||
@@ -26,7 +32,6 @@ dnf install -y \
|
||||
iputils \
|
||||
curl \
|
||||
git \
|
||||
git-lfs \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql \
|
||||
@@ -40,20 +45,30 @@ dnf install -y \
|
||||
libpcap \
|
||||
libwebp \
|
||||
findutils \
|
||||
which
|
||||
which \
|
||||
glibc-langpack-en \
|
||||
${EXTRA_DNF_PACKAGES}
|
||||
|
||||
# Install Git LFS
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
|
||||
dnf update -y
|
||||
dnf install -y \
|
||||
git-lfs
|
||||
dnf install -y git-lfs
|
||||
|
||||
# Clean up DNF when done
|
||||
dnf clean all
|
||||
|
||||
# Install gosu (assuming the script /build/ol/install-gosu.sh exists and is executable)
|
||||
bash /build/ol/install-gosu.sh
|
||||
|
||||
# Patched knockd
|
||||
# Download and install patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
# Set git credentials globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
|
||||
@@ -4,8 +4,9 @@ export TARGET
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Update and install packages
|
||||
apt-get update
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
@@ -27,21 +28,26 @@ apt-get install -y \
|
||||
lbzip2 \
|
||||
nfs-common \
|
||||
libpcap0.8 \
|
||||
webp
|
||||
${EXTRA_DEB_PACKAGES}
|
||||
|
||||
# Install Git LFS
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
git-lfs
|
||||
apt-get install -y git-lfs
|
||||
|
||||
# Clean up APT when done
|
||||
apt-get clean
|
||||
|
||||
# Patched knockd
|
||||
# Download and install patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
find /usr/lib -name 'libpcap.so.0.8' -execdir cp '{}' libpcap.so.1 \;
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
# Set git credentials globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
if id ubuntu > /dev/null 2>&1; then
|
||||
deluser ubuntu
|
||||
fi
|
||||
|
||||
addgroup --gid 1000 minecraft
|
||||
adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM python:3.8
|
||||
FROM python:3.9
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
|
||||
@@ -138,7 +138,8 @@ The following example shows a patch-set file where various fields in the `paper.
|
||||
}
|
||||
```
|
||||
|
||||
Supports the file formats:
|
||||
Supports the file formats:
|
||||
|
||||
- JSON
|
||||
- JSON5
|
||||
- Yaml
|
||||
|
||||
@@ -128,7 +128,7 @@ When either is set, [whitelisting of connecting users](https://minecraft.wiki/w/
|
||||
|
||||
To change the behavior when the whitelist file already exists, set the variable `EXISTING_WHITELIST_FILE` to one of the following options:
|
||||
|
||||
`SKIP` (default)
|
||||
`SKIP`
|
||||
: Skip processing of the whitelist file when one is already present. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
@@ -137,7 +137,7 @@ To change the behavior when the whitelist file already exists, set the variable
|
||||
`MERGE`
|
||||
: Merge the list of users from `WHITELIST` into the existing file. `WHITELIST_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
`SYNC_FILE_MERGE_LIST` (default)
|
||||
: When `WHITELIST_FILE` is provided it will overwrite an existing whitelist file. Also, if `WHITELIST` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
@@ -171,7 +171,7 @@ Similar to the whitelist, users can be provisioned as operators (aka administrat
|
||||
|
||||
To change the behavior when the ops file already exists, set the variable `EXISTING_OPS_FILE` to one of the following options:
|
||||
|
||||
`SKIP` (default)
|
||||
`SKIP`
|
||||
: Skip processing of the ops file when one is already present. This is the same as setting the legacy variable `OVERRIDE_OPS` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
@@ -180,7 +180,7 @@ To change the behavior when the ops file already exists, set the variable `EXIST
|
||||
`MERGE`
|
||||
: Merge the list of users from `OPS` into the existing file. `OPS_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
`SYNC_FILE_MERGE_LIST` (default)
|
||||
: When `OPS_FILE` is provided it will overwrite an existing ops file. Also, if `OPS` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
@@ -495,4 +495,11 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| SIMULATION_DISTANCE | simulation-distance |
|
||||
| SYNC_CHUNK_WRITES | sync-chunk-writes |
|
||||
| USE_NATIVE_TRANSPORT | use-native-transport |
|
||||
|
||||
| HIDE_ONLINE_PLAYERS | hide-online-players |
|
||||
| RESOURCE_PACK_ID | resource-pack-id |
|
||||
| RESOURCE_PACK_PROMPT | resource-pack-prompt |
|
||||
| MAX_CHAINED_NEIGHBOR_UPDATES | max-chained-neighbor-updates |
|
||||
| LOG_IPS | log-ips |
|
||||
| REGION_FILE_COMPRESSION | region-file-compression |
|
||||
| BUG_REPORT_LINK | bug-report-link |
|
||||
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
|
||||
@@ -19,7 +19,7 @@ where, in this case, the standard server port 25565, will be exposed on your hos
|
||||
|
||||
!!! note
|
||||
|
||||
If you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#using-docker-compose) or [Kubernetes](#deployment-templates-and-examples) to allow for incremental reconfiguration and image upgrades.
|
||||
If you plan on running a server for a longer amount of time it is highly recommended using a management layer such as [Docker Compose](#using-docker-compose) or [Kubernetes](misc/deployment/index.md#on-kubernetes) to allow for incremental reconfiguration and image upgrades.
|
||||
|
||||
!!! info
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ A file called `.paused` is created in `/data` directory when the server is pause
|
||||
|
||||
A `.skip-pause` file can be created in the `/data` directory to make the server skip autopausing, for as long as the file is present. The autopause timer will also be reset.
|
||||
|
||||
A starting, example compose file has been provided in [examples/docker-compose-autopause.yml](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-autopause.yml).
|
||||
A starting, example compose file has been provided in [the examples](https://github.com/itzg/docker-minecraft-server/blob/master/examples/autopause/compose.yml).
|
||||
|
||||
Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
An option to stop the server after a specified time has been added for niche applications (e.g. billing saving on AWS Fargate). The function is incompatible with the Autopause functionality, as they basically cancel out each other.
|
||||
|
||||
!!! note
|
||||
!!! note
|
||||
|
||||
the docker container variables have to be set accordingly (restart policy set to "no") and that the container has to be manually restarted.
|
||||
|
||||
@@ -25,3 +25,6 @@ The following environment variables define the behavior of auto-stopping:
|
||||
describes period of the daemonized state machine, that handles the stopping of the server
|
||||
|
||||
> To troubleshoot, add `DEBUG_AUTOSTOP=true` to see additional output
|
||||
|
||||
## Proxy Support
|
||||
If you make use of PROXY Protocol, i.e. through something like HAProxy or Fly.io, you will need to enable it in your variety of server's configuration, and then set the `USES_PROXY_PROTOCOL` envar to `true`. This lets Autostop monitor the server, where it otherwise wouldn't
|
||||
|
||||
@@ -26,3 +26,11 @@ or just a plain build
|
||||
```shell
|
||||
docker build -t IMG_PREFIX/minecraft-server .
|
||||
```
|
||||
|
||||
## Installing extra packages
|
||||
|
||||
The following build args can be set to install additional packages for the respective base image distro:
|
||||
|
||||
- `EXTRA_DEB_PACKAGES`
|
||||
- `EXTRA_DNF_PACKAGES`
|
||||
- `EXTRA_ALPINE_PACKAGES`
|
||||
|
||||
@@ -26,6 +26,54 @@ services:
|
||||
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/geyser/docker-compose.yml)
|
||||
|
||||
## Lazymc - Put your Minecraft server to rest when idle
|
||||
|
||||
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
- data:/server:ro
|
||||
# you need to supply the docker socket, so that the container can run docker command
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
# lazymc-docker-proxy acts as a proxy, so there is
|
||||
# no need to expose the server port on the Minecraft container
|
||||
- "25565:25565"
|
||||
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
- lazymc.group=mc
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
# so set restart to no, or else the container will start again...
|
||||
restart: no
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data:
|
||||
```
|
||||
[Source](https://github.com/joesturge/lazymc-docker-proxy/blob/master/docker-compose.yaml)
|
||||
|
||||
## Lazytainer - Stop Minecraft container based on traffic
|
||||
Monitors network traffic to the Minecraft containers. If there is traffic, the container runs, otherwise the container is stopped/paused.
|
||||
|
||||
|
||||
@@ -3,3 +3,5 @@ To troubleshoot the container initialization, such as when server files are pre-
|
||||
To troubleshoot just the command-line used to start the Minecraft server, set the environment variable `DEBUG_EXEC` to `true`.
|
||||
|
||||
To troubleshoot any issues with memory allocation reported by the JVM, set the environment variable `DEBUG_MEMORY` to `true`.
|
||||
|
||||
If you are experiencing any issues with the "Changing ownership of /data" step, that can be disabled by setting `SKIP_CHOWN_DATA` to `true`.
|
||||
|
||||
@@ -22,22 +22,27 @@ The following formats are supported in the list of project-file references:
|
||||
- Project ID, such as `238222`. _The newest applicable file will be automatically selected._
|
||||
- Project slug or ID, `:`, and a file ID, such as `jei:4593548` or `238222:4593548`
|
||||
- Project slug or ID, `@`, and a partial filename, such as `jei@10.2.1.1005`. This option is useful to refer to a version of the mod/plugin rather than looking up the file ID.
|
||||
- An `@` followed by the **container path** to a listing file
|
||||
|
||||
An `@` followed by the container path to a listing file can also be provided as a project-file reference. Each line is processed as a reference where blank lines and comments that start with `#` are ignored.
|
||||
!!! info "More about listing files"
|
||||
|
||||
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt" where the container file `/extras/cf-mods.txt` contains
|
||||
Each line in the listing file is processed as one of the references above; however, blank lines and comments that start with `#` are ignored.
|
||||
|
||||
Make sure to place the listing file in a mounted directory/volume or declare an appropriate mount for it.
|
||||
|
||||
For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt", assuming "/extras" has been added to `volumes` section, where the container file `/extras/cf-mods.txt` contains
|
||||
|
||||
```text
|
||||
# This comment is ignored
|
||||
jei:10.2.1.1005
|
||||
|
||||
# This and previous blank line are ignore
|
||||
geckolib
|
||||
aquaculture
|
||||
naturalist
|
||||
```
|
||||
|
||||
```text
|
||||
# This comment is ignored
|
||||
jei:10.2.1.1005
|
||||
|
||||
# This and previous blank line are ignore
|
||||
geckolib
|
||||
aquaculture
|
||||
naturalist
|
||||
```
|
||||
|
||||
!!! tip "Docker Compose"
|
||||
!!! tip "Multi-line values in Docker Compose"
|
||||
|
||||
Making use of the space delimited option, compose file declarations can be organized nicely with a [multi-line string](https://yaml-multiline.info/), such as
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Working with mods and plugins
|
||||
|
||||
## Mod platforms
|
||||
## Modpack platforms
|
||||
|
||||
By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported mod platforms](../types-and-platforms/index.md).
|
||||
By far the easiest way to work with mod and plugins, especially large numbers of them, is to utilize modpacks with [one of the supported modpack platforms](../types-and-platforms/index.md).
|
||||
|
||||
The following are some supported mod platforms:
|
||||
The following are some supported modpack platforms:
|
||||
|
||||
- [Modrinth](../types-and-platforms/mod-platforms/modrinth-modpacks.md)
|
||||
- [CurseForge](../types-and-platforms/mod-platforms/auto-curseforge.md)
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
# Auto-download from Modrinth
|
||||
|
||||
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric and Forge mods](https://modrinth.com/mods). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
|
||||
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric, Forge, etc mods](https://modrinth.com/mods) and [Paper, etc plugins](https://modrinth.com/plugins), and [datapacks](https://modrinth.com/datapacks). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
|
||||
|
||||
- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The slug is the part of the page URL that follows `/mod/`:
|
||||
- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example:
|
||||
```
|
||||
https://modrinth.com/mod/fabric-api
|
||||
----------
|
||||
|
|
||||
+-- project slug
|
||||
```
|
||||
Also, a specific version/type can be declared using colon symbol and version id/type after the project slug. The version id can be found in the 'Metadata' section. Valid version types are `release`, `beta`, `alpha`.
|
||||
|
||||
!!! example
|
||||
Also, a specific version (or release type) can be declared adding a colon and then the version id, version number/name, or release type after the project slug. The version ID or number can be found in the 'Metadata' section. Valid release types are `release`, `beta`, `alpha`.
|
||||
|
||||
To select a datapack from a Modrinth project, prefix the entry with "datapack:". When running a vanilla server, this is optional since only datapacks will be available for vanilla servers to select.
|
||||
|
||||
| Description | Example |
|
||||
|---------------------------------|-----------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:PbVeub96` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Description | Example projects entry |
|
||||
|---------------------------------|----------------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:PbVeub96` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Latest version of datapack | `datapack:terralith` |
|
||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||
|
||||
## Extra options
|
||||
|
||||
@@ -26,5 +28,5 @@
|
||||
: Can be set to `none` (the default), `required`, or `optional` to download required and/or optional dependencies.
|
||||
|
||||
`MODRINTH_ALLOWED_VERSION_TYPE`
|
||||
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`.
|
||||
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. Setting to `beta` will pick up both release and beta versions. Setting to `alpha` will pick up release, beta, and alpha versions.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
mkdocs-material == 9.5.27
|
||||
mkdocs-autorefs == 1.0.1
|
||||
mkdocstrings == 0.25.1
|
||||
mkdocs-material == 9.5.50
|
||||
mkdocs-autorefs == 1.3.0
|
||||
mkdocstrings == 0.27.0
|
||||
mkdocs-literate-nav == 0.6.1
|
||||
mdx-gh-links == 0.4
|
||||
mkdocs-click == 0.8.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Server Types and Mod Platforms
|
||||
# Server Types and Modpack Platforms
|
||||
|
||||
Server types can be selected by setting the `TYPE` environment variable to one of the types described in these sections.
|
||||
|
||||
@@ -6,7 +6,7 @@ The default server type is [the official software provided by Mojang](https://ww
|
||||
|
||||
**From the sections to the left...**
|
||||
|
||||
The **mod platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The mod platforms are selected by setting `MOD_PLATFORM`; however, for ease of use and compatibility, the selection can be set in `TYPE`.
|
||||
The **modpack platforms** take a modpack identifier, file, etc and use that to select and download the appropriate version of a mod loader, such as Forge or Fabric, downloading declared mods/plugins, and apply any additional files. The modpack platforms are selected by setting `MODPACK_PLATFORM`; however, for ease of use and backward compatibility, the selection can be set in `TYPE` or `MOD_PLATFORM`.
|
||||
|
||||
The individual **server types** allow for selecting the mod loader / server type and specific versions of those.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Auto CurseForge
|
||||
|
||||
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.
|
||||
To manage a CurseForge modpack automatically with upgrade support, pinned or latest version tracking, set `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "AUTO_CURSEFORGE". The appropriate mod loader (Forge / Fabric) version will be automatically installed as declared by the modpack. This mode will also take care of cleaning up unused files installed by previous versions of the modpack, but world data is never auto-removed.
|
||||
|
||||
## API Key
|
||||
|
||||
@@ -116,7 +116,7 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_MODPACK_MANIFEST: /manifests/manifest.json
|
||||
@@ -164,6 +164,11 @@ Quite often there are mods that need to be excluded, such as ones that did not p
|
||||
|
||||
Mods can be excluded by passing a comma or space delimited list of **project** slugs or IDs via `CF_EXCLUDE_MODS`. Similarly, there are some mods that are incorrectly tagged as client only. For those, pass the **project** slugs or IDs via `CF_FORCE_INCLUDE_MODS`. These lists will be combined with the content of the exclude/include file, if given.
|
||||
|
||||
!!! note
|
||||
`CF_FORCE_INCLUDE_MODS` will not download additional mods.
|
||||
|
||||
For additional mods, refer to [the `CURSEFORGE_FILES` variable](../../mods-and-plugins/curseforge-files.md).
|
||||
|
||||
A mod's project ID can be obtained from the right hand side of the project page:
|
||||

|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
This mod platform type is deprecated. Please use [AUTO_CURSEFORGE](auto-curseforge.md) for new deployments.
|
||||
|
||||
Enable this server mode by setting `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.
|
||||
Enable this server mode by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "CURSEFORGE" along with the following specific variables.
|
||||
|
||||
You need to specify a modpack to run, using the `CF_SERVER_MOD` environment
|
||||
variable. A CurseForge server modpack is available together with its respective
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
!!! note
|
||||
Requires one of the Ubuntu with Hotspot images listed in [the Java versions section](../../versions/java.md).
|
||||
|
||||
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MOD_PLATFORM` or `TYPE` to "FTBA"
|
||||
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "FTBA"
|
||||
|
||||
!!! note
|
||||
The "A" at the end of "FTBA" is important. The value "FTB" used to be an alias for "CURSEFORGE".
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Modrinth Modpacks
|
||||
|
||||
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
|
||||
[Modrinth Modpacks](https://modrinth.com/modpacks) can automatically be installed along with the required mod loader (Forge or Fabric) by setting `MODPACK_PLATFORM`, `MOD_PLATFORM` or `TYPE` to "MODRINTH". Upgrading (and downgrading) takes care of cleaning up old files and upgrading (and downgrading) the mod loader.
|
||||
|
||||
## Modpack project
|
||||
|
||||
@@ -73,6 +73,10 @@ To force include client mods, set `MODRINTH_FORCE_INCLUDE_FILES` to a comma or n
|
||||
yet-another-config-lib
|
||||
```
|
||||
|
||||
## Default exclude/includes
|
||||
|
||||
The image comes with a default set of exclude/includes, maintained [in the repo files area](https://github.com/itzg/docker-minecraft-server/blob/master/files/modrinth-exclude-include.json) and uses the same [JSON schema](https://github.com/itzg/mc-image-helper?tab=readme-ov-file#excludeinclude-file-schema) as Auto CurseForge. Those defaults can be disabled by setting the env var `MODRINTH_DEFAULT_EXCLUDE_INCLUDES` to an empty string.
|
||||
|
||||
## Excluding Overrides Files
|
||||
|
||||
Modrinth mrpack/zip files may include an `overrides` subdirectory that contains config files, world data, and extra mod files. All of those files will be extracted into the `/data` path of the container. If any of those files, such as incompatible mods, need to be excluded from extraction, then the `MODRINTH_OVERRIDES_EXCLUSIONS` variable can be set with a comma or newline delimited list of ant-style paths ([see below](#ant-style-paths)) to exclude, relative to the overrides (or `/data`) directory.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Bukkit/Spigot
|
||||
|
||||
!!! failure "GetBukkit site no longer supports automated downloads"
|
||||
|
||||
The downloads provider <https://getbukkit.org> seems to no longer support automated downloads. As such, it is highly recommended to switch to [Paper](paper.md) instead since it is actively maintained and fully compatible with Bukkit/Spigot plugins.
|
||||
|
||||
Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "BUKKIT" or "SPIGOT".
|
||||
|
||||
!!! example
|
||||
|
||||
@@ -32,7 +32,7 @@ A [Ketting](https://github.com/kettingpowered/Ketting-1-20-x) server, which is a
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.1" or later.
|
||||
|
||||
`FORGE_VERSION` and `KETTING_VERSION` may be specified; however, they will be defaulted by the [Ketting launcher](https://github.com/kettingpowered/kettinglauncher) otherwise.
|
||||
Available Ketting Versions may be found at [https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions](https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions).
|
||||
Available Ketting Versions may be found at [https://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge](https://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge).
|
||||
The Version structure is `MinecraftVersion-ForgeVersion-KettingVersion` (e.g. `1.20.1-47.2.20-0.1.4` is for Minecraft `1.20.1`, Forge `47.2.20` and Ketting `0.1.4`).
|
||||
|
||||
### Mohist
|
||||
|
||||
@@ -6,6 +6,8 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
|
||||
|
||||
!!! example
|
||||
|
||||
Using `docker run` command line
|
||||
|
||||
```
|
||||
docker run ... -e TYPE=PAPER ...
|
||||
|
||||
@@ -15,6 +17,34 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
|
||||
|
||||
docker run ... -e TYPE=PAPER -e PAPER_CHANNEL=experimental ...
|
||||
```
|
||||
|
||||
Using a compose file:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: PAPER
|
||||
```
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: PAPER
|
||||
VERSION: 1.20.6
|
||||
PAPER_BUILD: 140
|
||||
```
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: PAPER
|
||||
PAPER_CHANNEL: experimental
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
If you see the following error, it likely means you need to set the env var `PAPER_CHANNEL` to "experimental"
|
||||
|
||||
```
|
||||
No build found for version 1.21 with channel 'default'
|
||||
```
|
||||
|
||||
If you are hosting your own copy of Paper you can override the download URL with `PAPER_DOWNLOAD_URL=<url>`.
|
||||
|
||||
@@ -57,13 +87,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>`.
|
||||
|
||||
|
||||
@@ -563,35 +563,35 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_CONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_DISCONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_LAST_DISCONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands to execute when the server starts.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_CONNECT</code></td>
|
||||
<td>RCON commands to execute whenever a client connects to the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_FIRST_CONNECT</code></td>
|
||||
<td>RCON commands to execute on the first client connection to the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_DISCONNECT</code></td>
|
||||
<td>RCON commands to execute whenever a client disconnects from the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_LAST_DISCONNECT</code></td>
|
||||
<td>RCON commands to execute when the last client disconnects from the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ where `<tag>` refers to the first column of this table:
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 (1) |
|
||||
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 |
|
||||
| java8-alpine | 8 | Alpine | Hotspot | amd64 (1) |
|
||||
| java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 |
|
||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 |
|
||||
@@ -133,5 +132,6 @@ The following image tags have been deprecated and are no longer receiving update
|
||||
- java17-openj9
|
||||
- java20-graalvm, java20, java20-alpine
|
||||
- java8-multiarch is still built and pushed, but please move to java8 instead
|
||||
- java8-alpine
|
||||
|
||||
[^1]: Based on the [Oracle GraalMV images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images), which as of JDK 17, are now under the [GraalVM Free License](https://blogs.oracle.com/java/post/graalvm-free-license) incorporating what used to be known as the GraalVM Enterprise.
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# from .env
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-of-fabric-7
|
||||
@@ -16,21 +16,6 @@ services:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
# Manually download the following and put into the 'downloads' directory next to this compose file
|
||||
#
|
||||
# Mod Filename Download page
|
||||
# =========================== ========================================= ====================================================================================
|
||||
# Fish of Thieves [Fabric 1.20.1] Fish of Thieves v3.0.3 https://www.curseforge.com/minecraft/mc-mods/fish-of-thieves/files/4958329
|
||||
# Only Hammers [FORGE/FABRIC] OnlyHammers-1.20.1-0.6-Fabric https://www.curseforge.com/minecraft/mc-mods/only-hammers-forge-fabric/files/4832068
|
||||
# Sprinklerz sprinklerz-0.5_fabric.jar https://www.curseforge.com/minecraft/mc-mods/sprinklerz/files/4835664
|
||||
# Frog Legs (Fabric/Forge) FrogLegs-v2.0.0-1.20.1-Fabric.jar https://www.curseforge.com/minecraft/mc-mods/froglegs/files/4917818
|
||||
# TrimsEffects [FABRIC] TrimsEffects - MC 1.20.X - 1.1.0 https://www.curseforge.com/minecraft/mc-mods/trimseffects/files/4954156
|
||||
# Display Case Display Case-fabric-1.20-1.0.8.jar https://www.curseforge.com/minecraft/mc-mods/displaycase/files/4921333
|
||||
# Structory: Towers Structory Towers 1.20.4 v1.0.6 https://www.curseforge.com/minecraft/mc-mods/structory-towers/files/4937875
|
||||
# Packet Fixer Packet Fixer Fabric 1.2.1 https://www.curseforge.com/minecraft/mc-mods/packet-fixer/files/4884316
|
||||
# Perfect Plushies Perfect Plushies 1.9.0 [Fabric] https://www.curseforge.com/minecraft/mc-mods/perfect-plushies/files/4985767
|
||||
# Structory Structory 1.20.2 v1.3.4 https://www.curseforge.com/minecraft/mc-mods/structory/files/4937872
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
|
||||
25
examples/atm10/docker-compose.yml
Normal file
25
examples/atm10/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: all-the-mods-10
|
||||
# Optional: select a specific version/file
|
||||
# CF_FILENAME_MATCHER: "1.17"
|
||||
MEMORY: 4G
|
||||
CF_OVERRIDES_EXCLUSIONS: |
|
||||
shaderpacks/**
|
||||
volumes:
|
||||
# Use managed volume by default, but can change to a relative path like
|
||||
# ./data:/data
|
||||
# to use a host directory
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
@@ -1,19 +1,18 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:java17
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
||||
CF_FILENAME_MATCHER: "1.0.6"
|
||||
# CF_FILENAME_MATCHER: "1.1.0"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ../downloads:/downloads
|
||||
# Since Docker's default volume driver creates volumes owned by root, this
|
||||
# init container will change ownership to match final UID of mc service, above
|
||||
init-filebrowser:
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-9
|
||||
@@ -14,7 +14,6 @@ services:
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_MODPACK_MANIFEST: /manifests/manifest.json
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/minecraft-eternal/files/4102634
|
||||
@@ -43,7 +43,6 @@ services:
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -3,15 +3,14 @@ services:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: better-mc-fabric-bmc1
|
||||
CF_FILENAME_MATCHER: v18.5
|
||||
# CF_FILENAME_MATCHER: v18.5
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc:/data
|
||||
- ../downloads:/downloads
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
|
||||
@@ -1,30 +1,20 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java17
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: MODRINTH
|
||||
MEMORY: 4G
|
||||
MODRINTH_MODPACK: better-mc-forge-bmc4
|
||||
MODRINTH_VERSION: v26
|
||||
MODPACK_PLATFORM: MODRINTH
|
||||
MODRINTH_MODPACK: https://modrinth.com/modpack/better-mc-forge-bmc4/version/v32.5
|
||||
MODRINTH_EXCLUDE_FILES: |
|
||||
citresewn
|
||||
oculus
|
||||
yungsmenutweaks
|
||||
notenoughanimations
|
||||
ryoamiclights
|
||||
euphoriapatcher
|
||||
entity_model_features
|
||||
entity_texture_features
|
||||
3dskinlayers
|
||||
connector
|
||||
XaeroPlus
|
||||
XaerosWorldMap
|
||||
MODRINTH_OVERRIDES_EXCLUSIONS: |
|
||||
mods/NekosEnchantedBooks-*.jar
|
||||
mods/citresewn-*.jar
|
||||
volumes:
|
||||
- data:/data
|
||||
**/datapacks/BE_default_endgen_fix*
|
||||
MODRINTH_FORCE_SYNCHRONIZE: true
|
||||
MEMORY: 4G
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
# declare /data volume mapping as desired
|
||||
# volumes:
|
||||
# - ./data:/data
|
||||
13
examples/canyon/compose.yml
Normal file
13
examples/canyon/compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: canyon
|
||||
VERSION: b1.7.3
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
34
examples/craftoria/docker-compose.yml
Normal file
34
examples/craftoria/docker-compose.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: true
|
||||
ALLOW_FLIGHT: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: craftoria
|
||||
MEMORY: 8G
|
||||
CF_EXCLUDE_MODS: |
|
||||
737481
|
||||
363363
|
||||
394468
|
||||
986380
|
||||
844662
|
||||
568563
|
||||
915902
|
||||
690971
|
||||
455508
|
||||
1089803
|
||||
511319
|
||||
volumes:
|
||||
# Use managed volume by default, but can change to a relative path like
|
||||
# ./data:/data
|
||||
# to use a host directory
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
@@ -13,8 +13,11 @@ services:
|
||||
- ./data:/data
|
||||
|
||||
ngrok:
|
||||
image: shkoliar/ngrok:latest
|
||||
ports:
|
||||
- 4551:4551
|
||||
image: ngrok/ngrok:latest
|
||||
command:
|
||||
- "tcp"
|
||||
- "mc:25565"
|
||||
environment:
|
||||
- PARAMS=tcp -region=us -authtoken=YourAuthTokenHere mc:25565
|
||||
NGROK_AUTHTOKEN: <YourAuthTokenHere>
|
||||
ports:
|
||||
- 4551:4551
|
||||
21
examples/ftb-evolution/compose.yaml
Normal file
21
examples/ftb-evolution/compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: AUTO_CURSEFORGE
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/ftb-evolution
|
||||
# This modpack includes an override client-side only mod that will prevent the server from starting.
|
||||
# For more information on override exclusions see:
|
||||
# https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#excluding-overrides-files
|
||||
CF_OVERRIDES_EXCLUSIONS: mods/rgp_client*.jar
|
||||
MEMORY: 6G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
@@ -1,22 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
# FTBA support is only available in non-Alpine images
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8-multiarch}
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- 25565:25565
|
||||
- "25565:25565"
|
||||
environment:
|
||||
# REQUIRED for all types
|
||||
EULA: "TRUE"
|
||||
# Set server type (vs the default of vanilla)
|
||||
TYPE: FTBA
|
||||
# Use Pack ID from https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/
|
||||
FTB_MODPACK_ID: "31"
|
||||
FTB_MODPACK_VERSION_ID: ""
|
||||
# Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about
|
||||
FTB_MODPACK_ID: "119"
|
||||
# FTB_MODPACK_VERSION_ID: ""
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- ftba:/data
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
# declared the named volume, but use default/local storage engine
|
||||
ftba: {}
|
||||
data: {}
|
||||
25
examples/gtnh/docker-compose.yaml
Normal file
25
examples/gtnh/docker-compose.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
services:
|
||||
mc:
|
||||
# make sure this java version matches with pack java version
|
||||
image: itzg/minecraft-server:java21
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: CUSTOM
|
||||
GENERIC_PACKS: GT_New_Horizons_2.7.2_Server_Java_17-21
|
||||
GENERIC_PACKS_SUFFIX: .zip
|
||||
GENERIC_PACKS_PREFIX: https://downloads.gtnewhorizons.com/ServerPacks/
|
||||
# if this isn't true, then the container tries to download the modpack every run
|
||||
SKIP_GENERIC_PACK_UPDATE_CHECK: "true"
|
||||
MEMORY: 6G
|
||||
# Make sure that this matches what is in your pack's startserver bash file
|
||||
JVM_OPTS: -Dfml.readTimeout=180 @java9args.txt
|
||||
CUSTOM_JAR_EXEC: -jar lwjgl3ify-forgePatches.jar nogui
|
||||
volumes:
|
||||
# attach a managed volume, change to a relative or absolute host directory if needed
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
40
examples/lazymc/docker_compose.yml
Normal file
40
examples/lazymc/docker_compose.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
- data:/server:ro
|
||||
# you need to supply the docker socket, so that the container can run docker command
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
# lazymc-docker-proxy acts as a proxy, so there is
|
||||
# no need to expose the server port on the Minecraft container
|
||||
- "25565:25565"
|
||||
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
- lazymc.group=mc
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
# so set restart to no, or else the container will start again...
|
||||
restart: no
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data:
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
MOD_PLATFORM: MODRINTH
|
||||
MODPACK_PLATFORM: MODRINTH
|
||||
MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric/version/1.3.2
|
||||
# or for auto-upgrading to latest
|
||||
# MODRINTH_MODPACK: https://modrinth.com/modpack/cobblemon-fabric
|
||||
|
||||
@@ -3,13 +3,15 @@ services:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: MODRINTH
|
||||
MODPACK_PLATFORM: MODRINTH
|
||||
# Download the mrpack file from https://modrinth.com/modpack/cobblemon-fabric/version/1.4.1 and place in
|
||||
# modpacks directory next to this compose file.
|
||||
MODRINTH_MODPACK: /modpacks/Cobblemon Modpack [Fabric] 1.4.1.mrpack
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
mc-data: {}
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MOTD: |
|
||||
line one
|
||||
A §l§cMinecraft§r server
|
||||
line two
|
||||
# or
|
||||
# MOTD: "line one\nline two"
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# CF_API_KEY=... must be set in .env file or as environment variable
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: one-block-modded
|
||||
|
||||
60
examples/optimized-paper-config/README.md
Normal file
60
examples/optimized-paper-config/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# A Form to Load New Config Files to Paper MC
|
||||
|
||||
In this example, we illustrate how to efficiently load and manage different configuration files to optimize a Paper Minecraft server. To implement this, it is necessary to create a dedicated repository where the configuration files can be stored and later retrieved. The repository should adhere to a specific structure to facilitate seamless integration with your Docker setup. Notably, the configurations must be organized into a folder named after the version of Minecraft you are using.
|
||||
|
||||
For reference, I have provided this [repository](https://github.com/Alpha018/paper-config-optimized), which contains optimized configuration files for the latest version of Minecraft. You can use this repository by linking directly to the configuration files in your Docker file, as demonstrated in the example below.
|
||||
|
||||
## Usage
|
||||
|
||||
You can directly use the optimized configuration files from this repository by accessing them through the GitHub raw URLs. Simply replace the env var like the docker compose with any other repo with different configurations.
|
||||
|
||||
To use the raw files, you can download or link to them using the following pattern:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/[your-username]/[your-repository]/main/[file-path]"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
```
|
||||
|
||||
Feel free to explore and use the configurations in this repo to enhance your Minecraft server's performance.
|
||||
|
||||
## Contribution
|
||||
|
||||
If you'd like to improve or suggest changes to these configurations, feel free to submit a pull request in this [repository](https://github.com/Alpha018/paper-config-optimized). We welcome contributions from the community!
|
||||
|
||||
17
examples/optimized-paper-config/docker-compose.yml
Normal file
17
examples/optimized-paper-config/docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_API_KEY: # allocate from https://console.curseforge.com/
|
||||
CF_SLUG: the-pixelmon-modpack
|
||||
CF_FILENAME_MATCHER: "9.1.2"
|
||||
|
||||
18
examples/prominence2/docker-compose.yml
Normal file
18
examples/prominence2/docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/prominence-2-rpg
|
||||
CF_FILENAME_MATCHER: "2.8.7"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
@@ -6,45 +6,25 @@ services:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/ and set in .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/roguelike-adventures-and-dungeons-2
|
||||
# Optional: select a specific version/file
|
||||
#CF_FILENAME_MATCHER: "0.2.34"
|
||||
CF_EXCLUDE_MODS: |
|
||||
auudio-forge
|
||||
betterf3
|
||||
better-third-person
|
||||
clickable-advancements
|
||||
controlling
|
||||
craftpresence
|
||||
creative-core
|
||||
default-options
|
||||
drippy-loading-screen
|
||||
embeddium
|
||||
embeddium-extension
|
||||
embeddium-extras
|
||||
equipment-compare
|
||||
ezzoom
|
||||
fading-night-vision
|
||||
fancymenu
|
||||
item-borders
|
||||
itemphysic-lite
|
||||
just-enough-resources-jer
|
||||
konkrete
|
||||
legendary-tooltips
|
||||
mouse-tweaks
|
||||
oauth
|
||||
oculus
|
||||
sound-filters
|
||||
textrues-embeddium-options
|
||||
toast-control
|
||||
CF_FORCE_SYNCHRONIZE: "true"
|
||||
MEMORY: 4G
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
- ./downloads:/downloads
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# Set CF_API_KEY=... in a .env file next to this compose file and don't source control that file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: rlcraft
|
||||
|
||||
21
examples/simple-voice-chat/fabric-compose.yaml
Normal file
21
examples/simple-voice-chat/fabric-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "FABRIC"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
21
examples/simple-voice-chat/neoforge-compose.yaml
Normal file
21
examples/simple-voice-chat/neoforge-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "NEOFORGE"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
21
examples/simple-voice-chat/paper-compose.yaml
Normal file
21
examples/simple-voice-chat/paper-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "PAPER"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
19
examples/skyfactory5/compose.yml
Normal file
19
examples/skyfactory5/compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
# https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/6044634
|
||||
CF_SLUG: skyfactory-5
|
||||
CF_FILENAME_MATCHER: 5.0.2
|
||||
# Loads from .env file
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
MEMORY: 4G
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_API_KEY: # allocate from https://console.curseforge.com/
|
||||
CF_FORCE_SYNCHRONIZE: "true"
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/valhelsia-5/files/4429560
|
||||
|
||||
@@ -1,26 +1,23 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:java17
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_API_KEY: # allocate from https://console.curseforge.com/
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# allocate from https://console.curseforge.com/
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: vault-hunters-1-18-2
|
||||
CF_FILENAME_MATCHER: "Update-10.0.0"
|
||||
MOTD: "§4----- §2 Vault Hunters: 1.18.2u10.0.0 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
|
||||
MOTD: "§4----- §2 Vault Hunters: 1.18.2 §4 -----§r\\n §4------ §e vaulthunters.gg §4------"
|
||||
MEMORY: 6G # 4G for base server + 2G per player
|
||||
CF_EXCLUDE_MODS: reauth
|
||||
CF_EXCLUDE_MODS: |
|
||||
reauth
|
||||
ALLOW_FLIGHT: true
|
||||
ENABLE_COMMAND_BLOCK: true
|
||||
DIFFICULTY: hard
|
||||
volumes:
|
||||
# Need to place non-distributable mods in ./downloads/mods
|
||||
# As of Update-10.0.0
|
||||
# - Neon Craft 2 v2.2: https://www.curseforge.com/minecraft/mc-mods/neon-craft-2-mod/files/3726051
|
||||
- ./downloads:/downloads
|
||||
- mc-data:/data
|
||||
|
||||
volumes:
|
||||
mc-data: {}
|
||||
mc-data: {}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
current_uptime() {
|
||||
awk '{print $1}' /proc/uptime | cut -d . -f 1
|
||||
}
|
||||
@@ -16,14 +18,20 @@ rcon_client_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]]
|
||||
}
|
||||
|
||||
use_proxy() {
|
||||
if isTrue "$USES_PROXY_PROTOCOL"; then
|
||||
echo "--use-proxy"
|
||||
fi
|
||||
}
|
||||
|
||||
mc_server_listening() {
|
||||
mc-monitor status --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --timeout 10s >& /dev/null
|
||||
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --timeout 10s >&/dev/null
|
||||
}
|
||||
|
||||
java_clients_connections() {
|
||||
local connections
|
||||
if java_running ; then
|
||||
if ! connections=$(mc-monitor status --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --show-player-count); then
|
||||
if java_running; then
|
||||
if ! connections=$(mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" --show-player-count); then
|
||||
# consider it a non-zero player count if the ping fails
|
||||
# otherwise a laggy server with players connected could get paused
|
||||
connections=1
|
||||
|
||||
@@ -1,73 +1,155 @@
|
||||
{
|
||||
"globalExcludes": [
|
||||
|
||||
"advancement-plaques",
|
||||
"ambience-music-mod",
|
||||
"ambientsounds",
|
||||
"appleskin",
|
||||
"armor-chroma",
|
||||
"armor-toughness-bar",
|
||||
"audio-extension-for-fancymenu-forge",
|
||||
"auudio-forge",
|
||||
"beehivetooltips",
|
||||
"better-advancements",
|
||||
"better-foliage",
|
||||
"better-placement",
|
||||
"better-sprinting",
|
||||
"better-third-person",
|
||||
"better-tips-nbt-tag",
|
||||
"betterf3",
|
||||
"betterfps",
|
||||
"biomeinfo",
|
||||
"block-drops-jei-addon",
|
||||
"blur-forge",
|
||||
"cartography",
|
||||
"cherished-worlds",
|
||||
"chunk-animator",
|
||||
"clickable-advancements",
|
||||
"configured",
|
||||
"controlling",
|
||||
"craftpresence",
|
||||
"ctm",
|
||||
"custom-main-menu",
|
||||
"dark-mode-everywhere",
|
||||
"defensive-measures",
|
||||
"ding",
|
||||
"drippy-loading-screen",
|
||||
"dynamic-surroundings",
|
||||
"dynamiclights-reforged",
|
||||
"easiervillagertrading",
|
||||
"effective-forge",
|
||||
"embeddium",
|
||||
"embeddium-extension",
|
||||
"embeddium-extras",
|
||||
"enchantment-descriptions",
|
||||
"enhancedvisuals",
|
||||
"entity-collision-fps-fix",
|
||||
"entity-texture-features-fabric",
|
||||
"entityculling",
|
||||
"equipment-compare",
|
||||
"extreme-sound-muffler",
|
||||
"ezzoom",
|
||||
"fading-night-vision",
|
||||
"falling-leaves-forge",
|
||||
"fancymenu",
|
||||
"faster-ladder-climbing",
|
||||
"foamfix-optimization-mod",
|
||||
"fps-reducer",
|
||||
"free-cam",
|
||||
"ftb-backups-2",
|
||||
"fullscreen-windowed-borderless-for-minecraft",
|
||||
"hwyla",
|
||||
"iceberg",
|
||||
"ignitioncoil",
|
||||
"inmisaddon",
|
||||
"irisshaders",
|
||||
"iris-flywheel-compat",
|
||||
"irisshaders",
|
||||
"item-borders",
|
||||
"item-highlighter",
|
||||
"item-obliterator",
|
||||
"itemphysic-lite",
|
||||
"itemzoom",
|
||||
"just-enough-harvestcraft",
|
||||
"just-enough-mekanism-multiblocks",
|
||||
"just-enough-resources-jer",
|
||||
"just-zoom",
|
||||
"konkrete",
|
||||
"legendary-tooltips",
|
||||
"lighty",
|
||||
"loot-capacitor-tooltips",
|
||||
"lootbeams",
|
||||
"magnesium-extras",
|
||||
"menumobs",
|
||||
"minecraft-rich-presence",
|
||||
"model-gap-fix",
|
||||
"more-overlays",
|
||||
"mouse-tweaks",
|
||||
"neat",
|
||||
"nekos-enchanted-books",
|
||||
"no-nv-flash",
|
||||
"no-recipe-book",
|
||||
"not-enough-animations",
|
||||
"oculus",
|
||||
"oldjavawarning",
|
||||
"overloaded-armor-bar",
|
||||
"packmenu",
|
||||
"packmodemenu",
|
||||
"reauth",
|
||||
"reblured",
|
||||
"reeses-sodium-options",
|
||||
"reforgium",
|
||||
"resource-reloader",
|
||||
"rubidium",
|
||||
"rubidium-extra",
|
||||
"ryoamiclights",
|
||||
"schematica",
|
||||
"seamless-loading-screen",
|
||||
"seamless-loading-screen-forge",
|
||||
"searchables",
|
||||
"shulkerboxviewer",
|
||||
"skin-layers-3d",
|
||||
"smart-hud",
|
||||
"smooth-font",
|
||||
"smoothwater",
|
||||
"sodium",
|
||||
"sodium-extra",
|
||||
"sodium-options-api",
|
||||
"sodium-rubidium-occlusion-culling-fix",
|
||||
"sound-filters",
|
||||
"sound-physics-remastered",
|
||||
"stellar-sky",
|
||||
"swingthroughgrass",
|
||||
"textrues-embeddium-options",
|
||||
"textrues-rubidium-options",
|
||||
"thaumic-jei",
|
||||
"tips",
|
||||
"toast-control",
|
||||
"torohealth-damage-indicators",
|
||||
"true-darkness",
|
||||
"ungrab-mouse-mod",
|
||||
"vanillafix",
|
||||
"visuality",
|
||||
"waila-harvestability",
|
||||
"wawla",
|
||||
"xaeroplus",
|
||||
"yungs-menu-tweaks",
|
||||
"zume"
|
||||
],
|
||||
"modpacks": {
|
||||
"all-of-fabric-6": {
|
||||
"forceIncludes": ["revelationary"]
|
||||
},
|
||||
"create-arcane-engineering": {
|
||||
"forceIncludes": ["just-enough-resources-jer"]
|
||||
},
|
||||
"skyfactory-5": {
|
||||
"forceIncludes": [
|
||||
"revelationary"
|
||||
"colored-torches",
|
||||
"dye-mob-dye",
|
||||
"openstairs"
|
||||
]
|
||||
},
|
||||
"valhelsia-5": {
|
||||
"excludes": [
|
||||
"modernfix"
|
||||
]
|
||||
},
|
||||
"create-arcane-engineering": {
|
||||
"forceIncludes": [
|
||||
"just-enough-resources-jer"
|
||||
]
|
||||
"excludes": ["modernfix"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
88
files/modrinth-exclude-include.json
Normal file
88
files/modrinth-exclude-include.json
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"globalExcludes": [
|
||||
"3dskinlayers",
|
||||
"ae2-emi-crafting",
|
||||
"AmbientSounds",
|
||||
"amecs",
|
||||
"Animation_Overhaul",
|
||||
"appleskin",
|
||||
"auudio",
|
||||
"axolotlbuckets",
|
||||
"BadOptimizations",
|
||||
"BetterAdvancements",
|
||||
"betterbeds",
|
||||
"BetterThirdPerson",
|
||||
"BHMenu",
|
||||
"blur",
|
||||
"Boat-Item-View",
|
||||
"bobby",
|
||||
"cat_jam",
|
||||
"chat_heads",
|
||||
"chatanimation",
|
||||
"cherishedworlds",
|
||||
"citresewn",
|
||||
"clickadv",
|
||||
"connectedness",
|
||||
"connector",
|
||||
"craftpresence",
|
||||
"cwb",
|
||||
"DisableCustomWorldsAdvice",
|
||||
"drippyloadingscreen",
|
||||
"eating-animation",
|
||||
"emiffect",
|
||||
"emitrades",
|
||||
"entity_model_features",
|
||||
"entity_texture_features",
|
||||
"entityculling",
|
||||
"euphoriapatcher",
|
||||
"fallingleaves",
|
||||
"fancymenu",
|
||||
"fast-ip-ping",
|
||||
"FauxCustomEntityData",
|
||||
"feytweaks",
|
||||
"figura",
|
||||
"GeckoLibIrisCompat",
|
||||
"gpumemleakfix",
|
||||
"Highlighter",
|
||||
"ImmediatelyFast",
|
||||
"indium",
|
||||
"iris",
|
||||
"iris-flywheel",
|
||||
"ItemBorders",
|
||||
"ItemLocks",
|
||||
"justzoom",
|
||||
"language-reload",
|
||||
"lazy-language-loader",
|
||||
"LegendaryTooltips",
|
||||
"loadmyresources",
|
||||
"lootbeams",
|
||||
"MindfulDarkness",
|
||||
"MouseTweaks",
|
||||
"nicer-skies",
|
||||
"notenoughanimations",
|
||||
"oculus",
|
||||
"OverflowingBars",
|
||||
"PickUpNotifier",
|
||||
"PresenceFootsteps",
|
||||
"Prism",
|
||||
"reforgium",
|
||||
"reeses_sodium_options",
|
||||
"ResourcePackOverrides",
|
||||
"ryoamiclights",
|
||||
"screenshot_viewer",
|
||||
"Searchables",
|
||||
"seasonhud",
|
||||
"ShoulderSurfing",
|
||||
"skinlayers3d",
|
||||
"sodium",
|
||||
"sorted_enchantments",
|
||||
"visuality",
|
||||
"VR-Combat",
|
||||
"YeetusExperimentus",
|
||||
"yungsmenutweaks",
|
||||
"Zoomify",
|
||||
"zume"
|
||||
],
|
||||
"globalForceIncludes": [],
|
||||
"modpacks": {}
|
||||
}
|
||||
@@ -1,58 +1,66 @@
|
||||
{
|
||||
"motd": {"env": "MOTD"},
|
||||
"gamemode": {"env": "MODE"},
|
||||
"difficulty": {"env": "DIFFICULTY"},
|
||||
"white-list": {"env": "WHITELIST_PROP"},
|
||||
"enforce-whitelist": {"env": "ENFORCE_WHITELIST"},
|
||||
"level-type": {"env": "LEVEL_TYPE"},
|
||||
"server-name": {"env": "SERVER_NAME"},
|
||||
"server-ip": {"env": "SERVER_IP"},
|
||||
"server-port": {"env": "SERVER_PORT"},
|
||||
"allow-flight": {"env": "ALLOW_FLIGHT"},
|
||||
"allow-nether": {"env": "ALLOW_NETHER"},
|
||||
"bug-report-link": {"env": "BUG_REPORT_LINK"},
|
||||
"announce-player-achievements": {"env": "ANNOUNCE_PLAYER_ACHIEVEMENTS"},
|
||||
"broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"},
|
||||
"broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"},
|
||||
"difficulty": {"env": "DIFFICULTY"},
|
||||
"enable-command-block": {"env": "ENABLE_COMMAND_BLOCK"},
|
||||
"enable-jmx-monitoring": {"env": "ENABLE_JMX"},
|
||||
"enable-query": {"env": "ENABLE_QUERY"},
|
||||
"enable-rcon": {"env": "ENABLE_RCON"},
|
||||
"enable-status": {"env": "ENABLE_STATUS"},
|
||||
"enforce-secure-profile": {"env": "ENFORCE_SECURE_PROFILE"},
|
||||
"enforce-whitelist": {"env": "ENFORCE_WHITELIST"},
|
||||
"entity-broadcast-range-percentage": {"env": "ENTITY_BROADCAST_RANGE_PERCENTAGE"},
|
||||
"force-gamemode": {"env": "FORCE_GAMEMODE"},
|
||||
"function-permission-level": {"env": "FUNCTION_PERMISSION_LEVEL"},
|
||||
"gamemode": {"env": "MODE"},
|
||||
"generate-structures": {"env": "GENERATE_STRUCTURES"},
|
||||
"generator-settings": {"env": "GENERATOR_SETTINGS"},
|
||||
"hardcore": {"env": "HARDCORE"},
|
||||
"hide-online-players": {"env": "HIDE_ONLINE_PLAYERS"},
|
||||
"initial-disabled-packs": {"env": "INITIAL_DISABLED_PACKS"},
|
||||
"initial-enabled-packs": {"env": "INITIAL_ENABLED_PACKS"},
|
||||
"level-name": {"env": "LEVEL"},
|
||||
"level-seed": {"env": "SEED"},
|
||||
"level-type": {"env": "LEVEL_TYPE"},
|
||||
"log-ips": {"env": "LOG_IPS"},
|
||||
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
|
||||
"max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"},
|
||||
"max-players": {"env": "MAX_PLAYERS"},
|
||||
"max-tick-time": {"env": "MAX_TICK_TIME"},
|
||||
"max-world-size": {"env": "MAX_WORLD_SIZE"},
|
||||
"motd": {"env": "MOTD"},
|
||||
"network-compression-threshold": {"env": "NETWORK_COMPRESSION_THRESHOLD"},
|
||||
"online-mode": {"env": "ONLINE_MODE"},
|
||||
"op-permission-level": {"env": "OP_PERMISSION_LEVEL"},
|
||||
"pause-when-empty-seconds": {"env": "PAUSE_WHEN_EMPTY_SECONDS"},
|
||||
"player-idle-timeout": {"env": "PLAYER_IDLE_TIMEOUT"},
|
||||
"prevent-proxy-connections": {"env": "PREVENT_PROXY_CONNECTIONS"},
|
||||
"previews-chat": {"env": "PREVIEWS_CHAT"},
|
||||
"pvp": {"env": "PVP"},
|
||||
"query.port": {"env": "QUERY_PORT"},
|
||||
"rcon.password": {"env": "RCON_PASSWORD"},
|
||||
"rcon.port": {"env": "RCON_PORT"},
|
||||
"region-file-compression": {"env": "REGION_FILE_COMPRESSION"},
|
||||
"resource-pack": {"env": "RESOURCE_PACK"},
|
||||
"resource-pack-id": {"env": "RESOURCE_PACK_ID"},
|
||||
"resource-pack-prompt": {"env": "RESOURCE_PACK_PROMPT"},
|
||||
"resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"},
|
||||
"require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"},
|
||||
"server-ip": {"env": "SERVER_IP"},
|
||||
"server-name": {"env": "SERVER_NAME"},
|
||||
"server-port": {"env": "SERVER_PORT"},
|
||||
"simulation-distance": {"env": "SIMULATION_DISTANCE"},
|
||||
"snooper-enabled": {"env": "SNOOPER_ENABLED"},
|
||||
"spawn-animals": {"env": "SPAWN_ANIMALS"},
|
||||
"spawn-monsters": {"env": "SPAWN_MONSTERS"},
|
||||
"spawn-npcs": {"env": "SPAWN_NPCS"},
|
||||
"spawn-protection": {"env": "SPAWN_PROTECTION"},
|
||||
"generate-structures": {"env": "GENERATE_STRUCTURES"},
|
||||
"view-distance": {"env": "VIEW_DISTANCE"},
|
||||
"hardcore": {"env": "HARDCORE"},
|
||||
"snooper-enabled": {"env": "SNOOPER_ENABLED"},
|
||||
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
|
||||
"force-gamemode": {"env": "FORCE_GAMEMODE"},
|
||||
"max-tick-time": {"env": "MAX_TICK_TIME"},
|
||||
"enable-query": {"env": "ENABLE_QUERY"},
|
||||
"query.port": {"env": "QUERY_PORT"},
|
||||
"enable-rcon": {"env": "ENABLE_RCON"},
|
||||
"rcon.password": {"env": "RCON_PASSWORD"},
|
||||
"rcon.port": {"env": "RCON_PORT"},
|
||||
"max-players": {"env": "MAX_PLAYERS"},
|
||||
"max-world-size": {"env": "MAX_WORLD_SIZE"},
|
||||
"level-name": {"env": "LEVEL"},
|
||||
"level-seed": {"env": "SEED"},
|
||||
"pvp": {"env": "PVP"},
|
||||
"generator-settings": {"env": "GENERATOR_SETTINGS"},
|
||||
"online-mode": {"env": "ONLINE_MODE"},
|
||||
"allow-flight": {"env": "ALLOW_FLIGHT"},
|
||||
"resource-pack": {"env": "RESOURCE_PACK"},
|
||||
"resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"},
|
||||
"require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"},
|
||||
"player-idle-timeout": {"env": "PLAYER_IDLE_TIMEOUT"},
|
||||
"broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"},
|
||||
"broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"},
|
||||
"enable-jmx-monitoring": {"env": "ENABLE_JMX"},
|
||||
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
|
||||
"enable-status": {"env": "ENABLE_STATUS"},
|
||||
"entity-broadcast-range-percentage": {"env": "ENTITY_BROADCAST_RANGE_PERCENTAGE"},
|
||||
"function-permission-level": {"env": "FUNCTION_PERMISSION_LEVEL"},
|
||||
"network-compression-threshold": {"env": "NETWORK_COMPRESSION_THRESHOLD"},
|
||||
"op-permission-level": {"env": "OP_PERMISSION_LEVEL"},
|
||||
"prevent-proxy-connections": {"env": "PREVENT_PROXY_CONNECTIONS"},
|
||||
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
|
||||
"simulation-distance": {"env": "SIMULATION_DISTANCE"},
|
||||
"previews-chat": {"env": "PREVIEWS_CHAT"},
|
||||
"enforce-secure-profile": {"env": "ENFORCE_SECURE_PROFILE"},
|
||||
"initial-enabled-packs": {"env": "INITIAL_ENABLED_PACKS"},
|
||||
"initial-disabled-packs": {"env": "INITIAL_DISABLED_PACKS"}
|
||||
"view-distance": {"env": "VIEW_DISTANCE"},
|
||||
"white-list": {"env": "WHITELIST_PROP"}
|
||||
}
|
||||
@@ -13,10 +13,24 @@ configMapGenerator:
|
||||
- name: mc
|
||||
envs:
|
||||
- mc.env
|
||||
patches:
|
||||
# Example of using a patch to set external service name for mc-router to pick up
|
||||
- path: set-external-servername.yml
|
||||
```
|
||||
|
||||
### mc.env
|
||||
```
|
||||
EULA=true
|
||||
TYPE=FORGE
|
||||
```
|
||||
|
||||
###
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mc
|
||||
annotations:
|
||||
mc-router.itzg.me/externalServerName: forge.example.com
|
||||
```
|
||||
@@ -6,6 +6,7 @@
|
||||
# The Dockerfile ENVs take precedence here, but defaulting for testing consistency
|
||||
: "${UID:=1000}"
|
||||
: "${GID:=1000}"
|
||||
: "${SKIP_CHOWN_DATA:=false}"
|
||||
|
||||
umask "${UMASK:=0002}"
|
||||
|
||||
@@ -38,7 +39,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $(stat -c "%u" /data) != "$UID" ]]; then
|
||||
if isTrue "${SKIP_CHOWN_DATA}" || [[ $(stat -c "%u" /data) != "$UID" ]]; then
|
||||
log "Changing ownership of /data to $UID ..."
|
||||
chown -R ${runAsUser}:${runAsGroup} /data
|
||||
fi
|
||||
@@ -47,12 +48,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
|
||||
echo 'hosts: files dns' > /etc/nsswitch.conf
|
||||
fi
|
||||
|
||||
distro=$(getDistro)
|
||||
if [[ $distro == alpine ]]; then
|
||||
exec su-exec ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
|
||||
else
|
||||
exec gosu ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
|
||||
fi
|
||||
exec $(getSudoFromDistro) ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
|
||||
else
|
||||
exec "${SCRIPTS:-/}start-configuration" "$@"
|
||||
fi
|
||||
|
||||
@@ -26,60 +26,40 @@ isDebugging && set -x
|
||||
|
||||
cp /auto/knockd-config.cfg /tmp/knockd-config.cfg
|
||||
|
||||
# update server port to listen to
|
||||
regseq="^\s*sequence\s*=\s*$SERVER_PORT\s*$"
|
||||
linenum=$(grep -nm1 sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
|
||||
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
|
||||
sed -i "${linenum}s/sequence.*/sequence = $SERVER_PORT/" /tmp/knockd-config.cfg
|
||||
log "Updated server port in knockd config"
|
||||
fi
|
||||
# update rcon port to listen to
|
||||
regseq="^\s*sequence\s*=\s*$RCON_PORT\s*$"
|
||||
linenum=$(grep -nm2 sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
|
||||
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
|
||||
sed -i "${linenum}s/sequence.*/sequence = $RCON_PORT/" /tmp/knockd-config.cfg
|
||||
log "Updated rcon port in knockd config"
|
||||
fi
|
||||
function updatePort() {
|
||||
regseq="^\s*sequence\s*=\s*$1\s*$"
|
||||
linenum=$(grep -nm${2} sequence /tmp/knockd-config.cfg | cut -d : -f 1 | tail -n1)
|
||||
if ! [[ $(awk "NR==$linenum" /tmp/knockd-config.cfg) =~ $regseq ]]; then
|
||||
sed -i "${linenum}s/sequence.*/sequence = $1/" /tmp/knockd-config.cfg
|
||||
log "Updated $3 port in knockd config"
|
||||
fi
|
||||
}
|
||||
|
||||
# update server port to listen to
|
||||
updatePort $SERVER_PORT 1 "server"
|
||||
|
||||
# update rcon port to listen to
|
||||
updatePort $RCON_PORT 2 "rcon"
|
||||
|
||||
isNumericElseSetToDefault "AUTOPAUSE_PERIOD" 10
|
||||
checkIfNotZeroElseSetToDefault "AUTOPAUSE_PERIOD" 10
|
||||
isNumericElseSetToDefault "AUTOPAUSE_TIMEOUT_KN" 120
|
||||
isNumericElseSetToDefault "AUTOPAUSE_TIMEOUT_EST" 3600
|
||||
isNumericElseSetToDefault "AUTOPAUSE_TIMEOUT_INIT" 600
|
||||
|
||||
if ! [[ $AUTOPAUSE_PERIOD =~ ^[0-9]+$ ]]; then
|
||||
AUTOPAUSE_PERIOD=10
|
||||
export AUTOPAUSE_PERIOD
|
||||
log "Warning: AUTOPAUSE_PERIOD is not numeric, set to 10 (seconds)"
|
||||
fi
|
||||
if [ "$AUTOPAUSE_PERIOD" -eq "0" ] ; then
|
||||
AUTOPAUSE_PERIOD=10
|
||||
export AUTOPAUSE_PERIOD
|
||||
log "Warning: AUTOPAUSE_PERIOD must not be 0, set to 10 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOPAUSE_TIMEOUT_KN =~ ^[0-9]+$ ]] ; then
|
||||
AUTOPAUSE_TIMEOUT_KN=120
|
||||
export AUTOPAUSE_TIMEOUT_KN
|
||||
log "Warning: AUTOPAUSE_TIMEOUT_KN is not numeric, set to 120 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOPAUSE_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
|
||||
AUTOPAUSE_TIMEOUT_EST=3600
|
||||
export AUTOPAUSE_TIMEOUT_EST
|
||||
log "Warning: AUTOPAUSE_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOPAUSE_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
|
||||
AUTOPAUSE_TIMEOUT_INIT=600
|
||||
export AUTOPAUSE_TIMEOUT_INIT
|
||||
log "Warning: AUTOPAUSE_TIMEOUT_INIT is not numeric, set to 600 (seconds)"
|
||||
fi
|
||||
if [[ "$AUTOPAUSE_KNOCK_INTERFACE" == "lo" ]] ; then
|
||||
log "Warning: AUTOPAUSE_KNOCK_INTERFACE is set to the local loopback interface."
|
||||
log " This is not advisable, as incoming connections are likely not picked up there."
|
||||
log " Continuing with this setting."
|
||||
logWarning "AUTOPAUSE_KNOCK_INTERFACE is set to the local loopback interface."
|
||||
logWarning " This is not advisable, as incoming connections are likely not picked up there."
|
||||
logWarning " Continuing with this setting."
|
||||
fi
|
||||
|
||||
if [[ -n "$MAX_TICK_TIME" && "$MAX_TICK_TIME" != "-1" ]] ; then
|
||||
log "Warning: MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
|
||||
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
|
||||
elif [[ -z "$MAX_TICK_TIME" ]] ; then
|
||||
MAX_TICK_TIME=-1
|
||||
if versionLessThan 1.8.1; then
|
||||
# 10 years
|
||||
MAX_TICK_TIME=315360000000
|
||||
else
|
||||
MAX_TICK_TIME=-1
|
||||
fi
|
||||
export MAX_TICK_TIME
|
||||
fi
|
||||
|
||||
@@ -20,25 +20,9 @@ log "Autostop functionality enabled"
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
if ! [[ $AUTOSTOP_PERIOD =~ ^[0-9]+$ ]]; then
|
||||
AUTOSTOP_PERIOD=10
|
||||
export AUTOSTOP_PERIOD
|
||||
log "Warning: AUTOSTOP_PERIOD is not numeric, set to 10 (seconds)"
|
||||
fi
|
||||
if [ "$AUTOSTOP_PERIOD" -eq "0" ] ; then
|
||||
AUTOSTOP_PERIOD=10
|
||||
export AUTOSTOP_PERIOD
|
||||
log "Warning: AUTOSTOP_PERIOD must not be 0, set to 10 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOSTOP_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
|
||||
AUTOSTOP_TIMEOUT_EST=3600
|
||||
export AUTOSTOP_TIMEOUT_EST
|
||||
log "Warning: AUTOSTOP_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOSTOP_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
|
||||
AUTOSTOP_TIMEOUT_INIT=1800
|
||||
export AUTOSTOP_TIMEOUT_INIT
|
||||
log "Warning: AUTOSTOP_TIMEOUT_INIT is not numeric, set to 1800 (seconds)"
|
||||
fi
|
||||
isNumericElseSetToDefault "AUTOSTOP_PERIOD" 10
|
||||
checkIfNotZeroElseSetToDefault "AUTOSTOP_PERIOD" 10
|
||||
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_EST" 3600
|
||||
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_INIT" 1800
|
||||
|
||||
/auto/autostop-daemon.sh &
|
||||
|
||||
@@ -36,10 +36,10 @@ log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
if [ ! -e /data/eula.txt ]; then
|
||||
if ! isTrue "$EULA"; then
|
||||
log ""
|
||||
log "Please accept the Minecraft EULA at"
|
||||
log " https://account.mojang.com/documents/minecraft_eula"
|
||||
log "by adding the following immediately after 'docker run':"
|
||||
log " -e EULA=TRUE"
|
||||
logError "Please accept the Minecraft EULA at"
|
||||
logError " https://account.mojang.com/documents/minecraft_eula"
|
||||
logError "by adding the following immediately after 'docker run':"
|
||||
logError " -e EULA=TRUE"
|
||||
log ""
|
||||
exit 1
|
||||
fi
|
||||
@@ -63,10 +63,10 @@ if isTrue "${ENABLE_RCON:-true}"; then
|
||||
if [[ -v RCON_PASSWORD_FILE ]]; then
|
||||
if [ ! -e "${RCON_PASSWORD_FILE}" ]; then
|
||||
log ""
|
||||
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
|
||||
log "Please ensure your configuration."
|
||||
log "If you are using Docker Secrets feature, please check this for further information: "
|
||||
log " https://docs.docker.com/engine/swarm/secrets"
|
||||
logError "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
|
||||
logError "Please ensure your configuration."
|
||||
logError "If you are using Docker Secrets feature, please check this for further information: "
|
||||
logError " https://docs.docker.com/engine/swarm/secrets"
|
||||
log ""
|
||||
exit 1
|
||||
else
|
||||
@@ -91,12 +91,12 @@ fi
|
||||
# Auto-pause/stop
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
log "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
|
||||
logError "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
log "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
|
||||
logError "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -112,9 +112,9 @@ function fixJavaPath() {
|
||||
# Some Docker management UIs grab all the image declared variables and present them for configuration.
|
||||
# When upgrading images across Java versions, that creates a mismatch in PATH's expected by base image.
|
||||
if ! which java > /dev/null; then
|
||||
log "ERROR: your Docker provider has an annoying flaw where it"
|
||||
log " tries to set PATH even though the container establishes"
|
||||
log " a very specific value."
|
||||
logError " Your Docker provider has an annoying flaw where it"
|
||||
logError " tries to set PATH even though the container establishes"
|
||||
logError " a very specific value."
|
||||
sleep 2
|
||||
# now find where java might be
|
||||
for d in /opt/java/openjdk/bin /usr/bin; do
|
||||
@@ -129,7 +129,7 @@ function fixJavaPath() {
|
||||
|
||||
|
||||
if ! fixJavaPath; then
|
||||
log "ERROR: could not locate path that contains java"
|
||||
logError "could not locate path that contains java"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -158,15 +158,20 @@ then
|
||||
"${SCRIPTS:-/}start-rconcmds"
|
||||
fi
|
||||
|
||||
: "${MOD_PLATFORM:=}"
|
||||
: "${MODPACK_PLATFORM:=${MOD_PLATFORM:-}}"
|
||||
|
||||
if [[ $MODPACK_PLATFORM && $TYPE && $TYPE != VANILLA ]]; then
|
||||
logWarning "Avoid setting TYPE and MODPACK_PLATFORM"
|
||||
fi
|
||||
|
||||
case "${TYPE^^}" in
|
||||
AUTO_CURSEFORGE|MODRINTH|CURSEFORGE|FTB|FTBA)
|
||||
MOD_PLATFORM="$TYPE"
|
||||
MODPACK_PLATFORM="$TYPE"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $MOD_PLATFORM ]]; then
|
||||
case "${MOD_PLATFORM^^}" in
|
||||
if [[ $MODPACK_PLATFORM ]]; then
|
||||
case "${MODPACK_PLATFORM^^}" in
|
||||
FTB|CURSEFORGE)
|
||||
exec "${SCRIPTS:-/}start-deployCF" "$@"
|
||||
;;
|
||||
@@ -184,7 +189,7 @@ if [[ $MOD_PLATFORM ]]; then
|
||||
;;
|
||||
|
||||
*)
|
||||
log "ERROR; Invalid MOD_PLATFORM: '$MOD_PLATFORM'"
|
||||
logError "Invalid MODPACK_PLATFORM: '$MODPACK_PLATFORM'"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -219,7 +224,7 @@ case "${TYPE^^}" in
|
||||
QUILT)
|
||||
exec "${SCRIPTS:-/}start-deployQuilt" "$@"
|
||||
;;
|
||||
|
||||
|
||||
VANILLA)
|
||||
exec "${SCRIPTS:-/}start-deployVanilla" "$@"
|
||||
;;
|
||||
@@ -273,11 +278,11 @@ case "${TYPE^^}" in
|
||||
;;
|
||||
|
||||
*)
|
||||
log "ERROR: Invalid TYPE: '$TYPE'"
|
||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
|
||||
log " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
|
||||
log " CANYON, LIMBO, CRUCIBLE"
|
||||
logError "Invalid TYPE: '$TYPE'"
|
||||
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
|
||||
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
|
||||
logError " CANYON, LIMBO, CRUCIBLE"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
esac
|
||||
@@ -12,7 +12,7 @@ set -eu
|
||||
: "${CF_FORCE_SYNCHRONIZE:=false}"
|
||||
: "${CF_FORCE_REINSTALL_MODLOADER:=false}"
|
||||
: "${CF_IGNORE_MISSING_FILES:=}"
|
||||
: "${CF_EXCLUDE_INCLUDE_FILE=https://raw.githubusercontent.com/itzg/docker-minecraft-server/master/files/cf-exclude-include.json}"
|
||||
: "${CF_EXCLUDE_INCLUDE_FILE=/image/cf-exclude-include.json}"
|
||||
: "${CF_EXCLUDE_MODS:=}"
|
||||
: "${CF_FORCE_INCLUDE_MODS:=}"
|
||||
: "${CF_SET_LEVEL_FROM:=}" # --set-level-from
|
||||
@@ -20,69 +20,48 @@ set -eu
|
||||
: "${CF_OVERRIDES_EXCLUSIONS:=}" # --overrides-exclusions
|
||||
: "${CF_DOWNLOADS_REPO=$([ -d /downloads ] && echo '/downloads' || echo '')}"
|
||||
: "${CF_MODPACK_MANIFEST:=}"
|
||||
: "${CF_API_CACHE_DEFAULT_TTL:=}" # as ISO-8601 duration, such as P2D or PT12H
|
||||
|
||||
resultsFile=/data/.install-curseforge.env
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
ensureRemoveAllModsOff "MOD_PLATFORM=AUTO_CURSEFORGE"
|
||||
ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE"
|
||||
|
||||
args=(
|
||||
--results-file="$resultsFile"
|
||||
)
|
||||
if [[ $CF_PAGE_URL ]]; then
|
||||
args+=(--modpack-page-url="$CF_PAGE_URL")
|
||||
fi
|
||||
if [[ $CF_FILE_ID ]]; then
|
||||
args+=(--file-id="$CF_FILE_ID")
|
||||
fi
|
||||
if [[ $CF_SLUG ]]; then
|
||||
args+=(--slug="$CF_SLUG")
|
||||
fi
|
||||
if [[ $CF_MODPACK_MANIFEST ]]; then
|
||||
args+=(--modpack-manifest="$CF_MODPACK_MANIFEST")
|
||||
fi
|
||||
if [[ $CF_FILENAME_MATCHER ]]; then
|
||||
args+=(--filename-matcher="$CF_FILENAME_MATCHER")
|
||||
fi
|
||||
if [[ ${CF_SET_LEVEL_FROM} ]]; then
|
||||
args+=(--set-level-from="$CF_SET_LEVEL_FROM")
|
||||
fi
|
||||
if [[ ${CF_OVERRIDES_EXCLUSIONS} ]]; then
|
||||
args+=(--overrides-exclusions="$CF_OVERRIDES_EXCLUSIONS")
|
||||
fi
|
||||
if [[ ${CF_IGNORE_MISSING_FILES} ]]; then
|
||||
args+=(--ignore-missing-files="$CF_IGNORE_MISSING_FILES")
|
||||
fi
|
||||
args+=(
|
||||
--force-synchronize="$CF_FORCE_SYNCHRONIZE"
|
||||
--force-reinstall-modloader="$CF_FORCE_REINSTALL_MODLOADER"
|
||||
--overrides-skip-existing="$CF_OVERRIDES_SKIP_EXISTING"
|
||||
)
|
||||
setArg() {
|
||||
arg="${1?}"
|
||||
var="${2?}"
|
||||
|
||||
if [[ $CF_EXCLUDE_MODS ]]; then
|
||||
args+=( --exclude-mods="$CF_EXCLUDE_MODS" )
|
||||
fi
|
||||
if [[ $CF_FORCE_INCLUDE_MODS ]]; then
|
||||
args+=( --force-include-mods="$CF_FORCE_INCLUDE_MODS" )
|
||||
fi
|
||||
if [[ $CF_EXCLUDE_INCLUDE_FILE ]]; then
|
||||
args+=( --exclude-include-file="$CF_EXCLUDE_INCLUDE_FILE" )
|
||||
fi
|
||||
if [[ $CF_DOWNLOADS_REPO ]]; then
|
||||
args+=( --downloads-repo="$CF_DOWNLOADS_REPO" )
|
||||
fi
|
||||
if [[ ${!var} ]]; then
|
||||
args+=("${arg}=${!var}")
|
||||
fi
|
||||
}
|
||||
setArg --modpack-page-url CF_PAGE_URL
|
||||
setArg --file-id CF_FILE_ID
|
||||
setArg --slug CF_SLUG
|
||||
setArg --modpack-manifest CF_MODPACK_MANIFEST
|
||||
setArg --filename-matcher CF_FILENAME_MATCHER
|
||||
setArg --set-level-from CF_SET_LEVEL_FROM
|
||||
setArg --overrides-exclusions CF_OVERRIDES_EXCLUSIONS
|
||||
setArg --ignore-missing-files CF_IGNORE_MISSING_FILES
|
||||
setArg --api-cache-default-ttl CF_API_CACHE_DEFAULT_TTL
|
||||
setArg --exclude-mods CF_EXCLUDE_MODS
|
||||
setArg --force-include-mods CF_FORCE_INCLUDE_MODS
|
||||
setArg --exclude-include-file CF_EXCLUDE_INCLUDE_FILE
|
||||
setArg --downloads-repo CF_DOWNLOADS_REPO
|
||||
|
||||
if ! mc-image-helper install-curseforge "${args[@]}"; then
|
||||
log "ERROR failed to auto-install CurseForge modpack"
|
||||
logError "Failed to auto-install CurseForge modpack"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# grab SERVER, TYPE, VERSION and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "${resultsFile}"
|
||||
set +a
|
||||
applyResultsFile ${resultsFile}
|
||||
resolveFamily
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
|
||||
@@ -6,47 +6,56 @@ isDebugging && set -x
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
spigotBuildLog="/data/spigot_build.log"
|
||||
|
||||
function handleFailedSpigotBuild {
|
||||
logError "Failed to build Spigot"
|
||||
cat ${spigotBuildLog}
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
function buildSpigotFromSource {
|
||||
local tempDir="/data/temp"
|
||||
|
||||
if [[ ${TYPE^^} = *BUKKIT ]] && ! versionLessThan "1.14"; then
|
||||
log "ERR craftbukkit build is only supported for versions less than 1.14"
|
||||
logError "Craftbukkit build is only supported for versions less than 1.14"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Building Spigot $VANILLA_VERSION from source, might take a while, get some coffee"
|
||||
rm -rf /data/temp
|
||||
mkdir /data/temp
|
||||
cd /data/temp
|
||||
rm -rf ${tempDir}
|
||||
mkdir ${tempDir}
|
||||
cd ${tempDir}
|
||||
|
||||
jvmOpts="-Xms${INIT_MEMORY:-$MEMORY} -Xmx${MAX_MEMORY:-$MEMORY}"
|
||||
|
||||
logn ''
|
||||
curl -sSL -o /data/temp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||
java $jvmOpts -jar /data/temp/BuildTools.jar --rev "$VERSION" 2>&1 |tee /data/spigot_build.log| while read l; do echo -n .; done; log "done"
|
||||
curl -sSL -o ${tempDir}/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||
java $jvmOpts -jar ${tempDir}/BuildTools.jar --rev "$VERSION" 2>&1 |tee ${spigotBuildLog}| while read l; do echo -n .; done; log "done"
|
||||
|
||||
case ${TYPE^^} in
|
||||
SPIGOT)
|
||||
if ! mv spigot-*.jar "/data/${SERVER}"; then
|
||||
log "ERR failed to build Spigot"
|
||||
cat /data/spigot_build.log
|
||||
exit 1
|
||||
handleFailedSpigotBuild
|
||||
fi
|
||||
;;
|
||||
*BUKKIT)
|
||||
if ! mv craftbukkit-*.jar "/data/${SERVER}"; then
|
||||
log "ERR failed to build Spigot"
|
||||
cat /data/spigot_build.log
|
||||
exit 1
|
||||
handleFailedSpigotBuild
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
log "Cleaning up"
|
||||
rm -rf /data/temp
|
||||
rm -rf ${tempDir}
|
||||
cd /data
|
||||
}
|
||||
|
||||
function downloadSpigot {
|
||||
local match
|
||||
local getBukkitBaseUrl="https://getbukkit.org/download/"
|
||||
local getBukkitSpigotUrl="${getBukkitBaseUrl}spigot"
|
||||
case "$TYPE" in
|
||||
*BUKKIT|*bukkit)
|
||||
match="CraftBukkit"
|
||||
@@ -61,18 +70,21 @@ function downloadSpigot {
|
||||
esac
|
||||
|
||||
if [[ ${VERSION^^} = LATEST ]]; then
|
||||
if ! VERSION=$(restify https://getbukkit.org/download/spigot --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]'); then
|
||||
log "ERROR: failed to retrieve latest version from https://getbukkit.org/download/spigot -- site might be down"
|
||||
if ! VERSION=$(restify ${getBukkitSpigotUrl} --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]'); then
|
||||
logError "Failed to retrieve latest version from ${getBukkitSpigotUrl} -- site might be down"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z $downloadUrl ]]; then
|
||||
downloadBaseUrl="https://"
|
||||
downloadSuffixUrl=".getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
|
||||
if versionLessThan 1.16.5 || { [[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VERSION} = "1.16.5" ]] ; }; then
|
||||
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
|
||||
downloadBaseUrl+="cdn"
|
||||
else
|
||||
downloadUrl="https://download.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
|
||||
downloadBaseUrl+="download"
|
||||
fi
|
||||
downloadUrl="${downloadBaseUrl}${downloadSuffixUrl}"
|
||||
fi
|
||||
|
||||
setServerVar
|
||||
@@ -94,7 +106,7 @@ function downloadSpigot {
|
||||
cat <<EOF
|
||||
|
||||
ERROR: failed to download from $downloadUrl
|
||||
Visit https://getbukkit.org/download/${getbukkitFlavor} to lookup the
|
||||
Visit ${getBukkitBaseUrl}${getbukkitFlavor} to lookup the
|
||||
exact version or see if download site is unavailable.
|
||||
Click into the version entry to find the **exact** version.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ loadForgeVars() {
|
||||
isDebugging && set -x
|
||||
|
||||
if [[ ${VERSION^^} == LATEST ]]; then
|
||||
log "WARNING for the old TYPE=CURSEFORGE mechanism it is best to set VERSION to a specific value"
|
||||
logWarning "For the old TYPE=CURSEFORGE mechanism it is best to set VERSION to a specific value"
|
||||
fi
|
||||
resolveVersion
|
||||
|
||||
@@ -39,7 +39,7 @@ FTB_SERVER_MOD=${FTB_SERVER_MOD:-$CF_SERVER_MOD}
|
||||
|
||||
log "Looking for Feed-The-Beast / CurseForge server modpack."
|
||||
if [[ ! $FTB_SERVER_MOD ]]; then
|
||||
log "ERROR: CF_SERVER_MOD or FTB_SERVER_MOD is required to be set"
|
||||
logError "CF_SERVER_MOD or FTB_SERVER_MOD is required to be set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -48,7 +48,7 @@ downloadModpack() {
|
||||
if isURL "${srv_modpack}"; then
|
||||
log "Downloading modpack from ${srv_modpack}..."
|
||||
if ! srv_modpack=$(get -o /data --output-filename --skip-existing "${srv_modpack}"); then
|
||||
log "ERROR: failed to download modpack"
|
||||
logError "Failed to download modpack"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -61,12 +61,12 @@ downloadModpack() {
|
||||
srv_modpack=/data/${srv_modpack}
|
||||
fi
|
||||
if [[ ! -f "${srv_modpack}" ]]; then
|
||||
log "FTB server modpack ${srv_modpack} not found."
|
||||
logError "FTB server modpack: ${srv_modpack} not found."
|
||||
exit 2
|
||||
fi
|
||||
if [[ ! "${srv_modpack: -4}" == ".zip" ]]; then
|
||||
log "FTB server modpack ${srv_modpack} is not a zip archive."
|
||||
log "Please set FTB_SERVER_MOD to a file with a .zip extension."
|
||||
logError "FTB server modpack: ${srv_modpack} is not a zip archive."
|
||||
logError "Please set FTB_SERVER_MOD to a file with a .zip extension."
|
||||
exit 2
|
||||
fi
|
||||
FTB_SERVER_MOD=${srv_modpack}
|
||||
@@ -104,7 +104,7 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
|
||||
if [[ $forgeInstallerUrl ]]; then
|
||||
forgeInstallerJar="${FTB_BASE_DIR}/forge-installer.jar"
|
||||
if ! curl -fsSL -o "$forgeInstallerJar" "$forgeInstallerUrl" ; then
|
||||
log "ERROR failed to download Forge installer from $forgeInstallerUrl"
|
||||
logError "Failed to download Forge installer from $forgeInstallerUrl"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
@@ -113,9 +113,9 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
|
||||
fi
|
||||
|
||||
if [[ -z "${forgeInstallerJar}" ]]; then
|
||||
log "ERROR Unable to find forge installer in modpack"
|
||||
log " or download using modpack config."
|
||||
log " Make sure you downloaded the server files."
|
||||
logError "Unable to find forge installer in modpack"
|
||||
logError " or download using modpack config."
|
||||
logError " Make sure you downloaded the server files."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
@@ -129,7 +129,7 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
|
||||
|
||||
SERVER=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
|
||||
log "ERROR unable to locate installed forge server jar"
|
||||
logError "Unable to locate installed forge server jar"
|
||||
isDebugging && find "${FTB_BASE_DIR}" -name "forge*.jar"
|
||||
exit 2
|
||||
fi
|
||||
@@ -213,7 +213,7 @@ EOF
|
||||
startScript="${FTB_BASE_DIR}/ServerStart.sh"
|
||||
chmod +x "$startScript"
|
||||
else
|
||||
log "ERROR: Modpack missing start script and unable to find Forge jar to generate one"
|
||||
logError "Modpack missing start script and unable to find Forge jar to generate one"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
@@ -244,7 +244,7 @@ legacyJavaFixerPath="${FTB_DIR}/mods/legacyjavafixer.jar"
|
||||
if isTrue "${FTB_LEGACYJAVAFIXER}" && [ ! -e "${legacyJavaFixerPath}" ]; then
|
||||
log "Installing legacy java fixer to ${legacyJavaFixerPath}"
|
||||
if ! get -o "${legacyJavaFixerPath}" ${legacyJavaFixerUrl}; then
|
||||
log "ERROR failed to download legacy java fixer from ${legacyJavaFixerUrl}"
|
||||
logError "Failed to download legacy java fixer from ${legacyJavaFixerUrl}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -9,20 +9,19 @@ isDebugging && set -x
|
||||
: "${CANYON_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
if [ "${VERSION}" != "b1.7.3" ]; then
|
||||
log "ERROR: Canyon server type only supports VERSION=b1.7.3"
|
||||
logError "Canyon server type only supports VERSION=b1.7.3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
canyonJob="https://jenkins.glass-launcher.net/job/Canyon"
|
||||
canyonJob="https://canyonmodded.p0rtal.gay/job/Canyonmodded"
|
||||
githubUrl="https://github.com/KoboDev/SupplyAndDemand/releases/download"
|
||||
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
|
||||
|
||||
buildRelPath=$(
|
||||
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
|
||||
jq -r '.artifacts[0].relativePath'
|
||||
)
|
||||
jq -r '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
|
||||
)
|
||||
buildNumber=$(
|
||||
curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json" |
|
||||
jq -r '.number'
|
||||
jq -r '.number'<<< "$canyonBuildJSON"
|
||||
)
|
||||
baseName=$(basename "${buildRelPath}")
|
||||
|
||||
@@ -51,7 +50,7 @@ if [ ! -f "$SERVER" ]; then
|
||||
fi
|
||||
curl -fsSL -o "$SERVER" "$downloadUrl"
|
||||
if [ ! -f "$SERVER" ]; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
logError "Failed to download from $downloadUrl"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -11,7 +11,7 @@ latestAsset=$(
|
||||
)
|
||||
|
||||
if [[ -z "${latestAsset}" ]]; then
|
||||
log "ERROR: latest release of Catserver is missing universal.jar asset"
|
||||
logError "Latest release of Catserver is missing universal.jar asset"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -18,18 +18,18 @@ fi
|
||||
|
||||
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VERSION}-.*\.jar/)].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible"
|
||||
logError "Failed to access ${CRUCIBLE_RELEASE} release of Crucible"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl = null ]]; then
|
||||
log "ERROR: failed to locate Crucible jar for $VERSION from ${CRUCIBLE_RELEASE}"
|
||||
logError "Failed to locate Crucible jar for $VERSION from ${CRUCIBLE_RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible from $downloadUrl"
|
||||
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Crucible jar from $downloadUrl"
|
||||
logError "Crucible jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -37,18 +37,18 @@ librariesDir=/data/libraries
|
||||
if [ ! -d "$librariesDir" ]; then
|
||||
if ! librariesUrl=$(get --json-path "$.assets[?(@.name == 'libraries.zip')].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
|
||||
logError "Failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible libraries"
|
||||
if ! get -o /tmp/libraries.zip "$librariesUrl"; then
|
||||
log "ERROR: failed to download Crucible libraries from $librariesUrl"
|
||||
logError "Failed to download Crucible libraries from $librariesUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! unzip /tmp/libraries.zip -d "$librariesDir"; then
|
||||
log "ERROR: failed to unzip Crucible libraries"
|
||||
logError "Failed to unzip Crucible libraries"
|
||||
exit 1
|
||||
fi
|
||||
rm /tmp/libraries.zip
|
||||
|
||||
@@ -41,4 +41,4 @@ fi
|
||||
# Allow for overriding Family on custom for testing.
|
||||
export FAMILY="${FAMILY:-HYBRID}"
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${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"
|
||||
|
||||
@@ -9,72 +11,105 @@ ftbInstallMarker=".ftb-installed"
|
||||
isDebugging && set -x
|
||||
set -e
|
||||
|
||||
#
|
||||
#{
|
||||
# "id": 119,
|
||||
# "name": "FTB Presents Direwolf20 1.20",
|
||||
# "versionName": "1.16.0",
|
||||
# "versionId": 12252,
|
||||
# "modPackTargets": {
|
||||
# "modLoader": {
|
||||
# "name": "neoforge",
|
||||
# "version": "47.1.84"
|
||||
# },
|
||||
# "javaVersion": "17.0.7+7",
|
||||
# "mcVersion": "1.20.1"
|
||||
# },
|
||||
|
||||
ftbManifest=.manifest.json
|
||||
function getModLoaderName() {
|
||||
jq -r ".modPackTargets.modLoader.name" ${ftbManifest}
|
||||
}
|
||||
function getModLoaderVersion() {
|
||||
jq -r ".modPackTargets.modLoader.version" ${ftbManifest}
|
||||
}
|
||||
function getMinecraftVersion() {
|
||||
jq -r ".modPackTargets.mcVersion" ${ftbManifest}
|
||||
}
|
||||
|
||||
if [[ $(getDistro) = alpine ]]; then
|
||||
log "ERROR: the FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead."
|
||||
logError "The FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [[ -v FTB_MODPACK_ID ]]; then
|
||||
log "ERROR FTB_MODPACK_ID is required with TYPE=FTB"
|
||||
logError "FTB_MODPACK_ID is required with TYPE=FTB"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! [[ ${FTB_MODPACK_ID} =~ [0-9]+ ]]; then
|
||||
log "ERROR FTB_MODPACK_ID needs to be numeric"
|
||||
logError "FTB_MODPACK_ID needs to be numeric"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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
|
||||
log "ERROR unable to resolve latest modpack version ID for modpack ${FTB_MODPACK_ID}"
|
||||
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}"
|
||||
exit 1
|
||||
fi
|
||||
elif ! [[ ${FTB_MODPACK_VERSION_ID} =~ [0-9]+ ]]; then
|
||||
log "ERROR FTB_MODPACK_VERSION_ID needs to be numeric"
|
||||
logError "FTB_MODPACK_VERSION_ID needs to be numeric"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
|
||||
ftbInstaller=/data/ftb-installer
|
||||
if isTrue "$FTB_FORCE_REINSTALL" ||
|
||||
! [ -f "${ftbManifest}" ] ||
|
||||
! [ -f "${ftbInstallMarker}" ] ||
|
||||
[ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
|
||||
ftbInstaller=/data/ftb-installer-v2
|
||||
arm=
|
||||
if ! [[ -f "${ftbInstaller}" ]]; then
|
||||
log "Downloading FTB installer"
|
||||
if [ "$(uname -m)" == "aarch64" ]; then
|
||||
log "Downloading ARM installer"
|
||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/arm/linux -o "${ftbInstaller}"
|
||||
log "Downloading FTB installer for ARM"
|
||||
arm="/arm"
|
||||
else
|
||||
log "Downloading x86 installer"
|
||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
|
||||
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
|
||||
chmod +x "${ftbInstaller}"
|
||||
fi
|
||||
|
||||
log "Installing modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID}"
|
||||
log "This could take a while..."
|
||||
${ftbInstaller} "${FTB_MODPACK_ID}" "${FTB_MODPACK_VERSION_ID}" --noscript --auto > ftb-installer.log
|
||||
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force | tee ftb-installer.log
|
||||
rm -f forge*installer.jar
|
||||
|
||||
echo "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" > ${ftbInstallMarker}
|
||||
|
||||
writeEula
|
||||
|
||||
# some modpacks result in --w----r-- permissions
|
||||
chmod a+r version.json
|
||||
else
|
||||
log "FTB modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID} is ready to go"
|
||||
fi
|
||||
|
||||
forgeVersion=$(jq -r '.targets|unique[] | select(.name == "forge") | .version' version.json)
|
||||
fabricVersion=$(jq -r '.targets|unique[] | select(.name == "fabric") | .version' version.json)
|
||||
mcVersion=$(jq -r '.targets|unique[] | select(.name == "minecraft") | .version' version.json)
|
||||
modLoader="$(getModLoaderName)"
|
||||
modLoaderVersion="$(getModLoaderVersion)"
|
||||
mcVersion=$(getMinecraftVersion)
|
||||
VERSION="$mcVersion"
|
||||
export VERSION
|
||||
|
||||
variants=(
|
||||
"forge-${mcVersion}-${forgeVersion}.jar"
|
||||
"forge-${mcVersion}-${forgeVersion}-universal.jar"
|
||||
"forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar"
|
||||
"fabric-${mcVersion}-${fabricVersion}-server-launch.jar"
|
||||
run.sh
|
||||
"${modLoader}-${mcVersion}-${modLoaderVersion}-universal.jar"
|
||||
"${modLoader}-${mcVersion}-${modLoaderVersion}-${mcVersion}-universal.jar"
|
||||
"${modLoader}-${mcVersion}-${modLoaderVersion}-server-launch.jar"
|
||||
"${modLoader}-${mcVersion}-${modLoaderVersion}.jar"
|
||||
)
|
||||
for f in "${variants[@]}"; do
|
||||
if [ -f $f ]; then
|
||||
@@ -83,11 +118,37 @@ for f in "${variants[@]}"; do
|
||||
fi
|
||||
done
|
||||
if ! [ -v SERVER ]; then
|
||||
log "ERROR unable to locate the installed FTB server jar"
|
||||
log " Tried looking for ${variants[*]}"
|
||||
logError "Unable to locate the installed FTB server jar"
|
||||
logError " Tried looking for ${variants[*]}"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
export FAMILY=FORGE
|
||||
# Remap the TYPE and FAMILY based on discovered server jar
|
||||
if [[ $SERVER = run.sh ]]; then
|
||||
if grep -q neoforge "$SERVER"; then
|
||||
export FAMILY=FORGE
|
||||
export TYPE=NEOFORGE
|
||||
elif grep -q forge "$SERVER"; then
|
||||
export FAMILY=FORGE
|
||||
export TYPE=FORGE
|
||||
elif grep -q fabric run.s; then
|
||||
export FAMILY=FABRIC
|
||||
export TYPE=FABRIC
|
||||
else
|
||||
logError "Unrecognized loader type in $SERVER"
|
||||
cat "$SERVER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
elif [[ $SERVER = forge* ]]; then
|
||||
export FAMILY=FORGE
|
||||
export TYPE=FORGE
|
||||
elif [[ $SERVER = fabric* ]]; then
|
||||
export FAMILY=FABRIC
|
||||
export TYPE=FABRIC
|
||||
else
|
||||
logError "Unrecognized loader type from $SERVER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
|
||||
@@ -16,40 +16,35 @@ isDebugging && set -x
|
||||
|
||||
# Custom fabric jar
|
||||
if [[ $FABRIC_LAUNCHER ]]; then
|
||||
if ! mc-image-helper install-fabric-loader \
|
||||
if ! mc-image-helper install-fabric-loader \
|
||||
--results-file=${resultsFile} \
|
||||
--from-local-file="$FABRIC_LAUNCHER"; then
|
||||
log "ERROR failed to use provided Fabric launcher"
|
||||
logError "Failed to use provided Fabric launcher"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Custom fabric jar url
|
||||
elif [[ $FABRIC_LAUNCHER_URL ]]; then
|
||||
if ! mc-image-helper install-fabric-loader \
|
||||
if ! mc-image-helper install-fabric-loader \
|
||||
--results-file=${resultsFile} \
|
||||
--from-url="$FABRIC_LAUNCHER_URL"; then
|
||||
log "ERROR failed to install Fabric launcher from $FABRIC_LAUNCHER_URL"
|
||||
logError "Failed to installFabric launcher from $FABRIC_LAUNCHER_URL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Official fabric launcher
|
||||
else
|
||||
if ! mc-image-helper install-fabric-loader \
|
||||
if ! mc-image-helper install-fabric-loader \
|
||||
--results-file=${resultsFile} \
|
||||
--minecraft-version="${VERSION}" \
|
||||
--installer-version="${FABRIC_LAUNCHER_VERSION}" \
|
||||
--loader-version="${FABRIC_LOADER_VERSION}"; then
|
||||
log "ERROR failed to install Fabric launcher given $VERSION, $FABRIC_LAUNCHER_VERSION, $FABRIC_LOADER_VERSION"
|
||||
logError "Failed to installFabric launcher given $VERSION, $FABRIC_LAUNCHER_VERSION, $FABRIC_LOADER_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# grab SERVER, etc and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "${resultsFile}"
|
||||
set +a
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FABRIC
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
|
||||
@@ -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" "$@"
|
||||
|
||||
@@ -6,36 +6,29 @@
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
isDebugging && set -x
|
||||
resultsFile=/data/.run-forge.env
|
||||
|
||||
function mc-image-helper-forge() {
|
||||
mc-image-helper install-forge \
|
||||
--output-directory=/data \
|
||||
--results-file="${resultsFile}" \
|
||||
--minecraft-version="${VERSION}" \
|
||||
--force-reinstall="${FORGE_FORCE_REINSTALL}" "$@"
|
||||
}
|
||||
|
||||
if [[ ${FORGE_INSTALLER} ]]; then
|
||||
if ! mc-image-helper install-forge \
|
||||
--output-directory=/data \
|
||||
--results-file=/data/.run-forge.env \
|
||||
--minecraft-version="${VERSION}" \
|
||||
--forge-installer="${FORGE_INSTALLER}" \
|
||||
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
|
||||
log "ERROR failed to install Forge given installer ${FORGE_INSTALLER}"
|
||||
if ! mc-image-helper-forge --forge-installer="${FORGE_INSTALLER}" ; then
|
||||
logError "Failed to installForge given installer ${FORGE_INSTALLER}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
if ! mc-image-helper install-forge \
|
||||
--output-directory=/data \
|
||||
--results-file=/data/.run-forge.env \
|
||||
--minecraft-version="${VERSION}" \
|
||||
--forge-version="${FORGE_VERSION}" \
|
||||
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
|
||||
log "ERROR failed to install Forge"
|
||||
if ! mc-image-helper-forge --forge-version="${FORGE_VERSION}"; then
|
||||
logError "Failed to install Forge"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# grab SERVER and export it
|
||||
set -a
|
||||
source /data/.run-forge.env
|
||||
set +a
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FORGE
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
--name-pattern="kettinglauncher-.+?(?<!-sources)\.jar" \
|
||||
kettingpowered/kettinglauncher
|
||||
); then
|
||||
log "ERROR: failed to download Ketting launcher"
|
||||
logError "Failed to download Ketting launcher"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -17,12 +17,12 @@ export SERVER
|
||||
|
||||
resolveVersion
|
||||
|
||||
EXTRA_ARGS+="-minecraftVersion $VERSION"
|
||||
EXTRA_ARGS+=" -minecraftVersion $VERSION"
|
||||
if [[ ${KETTING_VERSION:-} ]]; then
|
||||
EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
|
||||
EXTRA_ARGS+=" -kettingVersion $KETTING_VERSION"
|
||||
fi
|
||||
if [[ ${FORGE_VERSION:-} ]]; then
|
||||
EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
|
||||
EXTRA_ARGS+=" -forgeVersion $FORGE_VERSION"
|
||||
fi
|
||||
export EXTRA_ARGS
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ baseUrl="https://ci.loohpjames.com/job/Limbo/${LIMBO_BUILD}"
|
||||
buildInfoUrl="${baseUrl}/api/json"
|
||||
buildJson=$(curl -fsSL "${buildInfoUrl}")
|
||||
if [ $? != 0 ]; then
|
||||
log "ERROR failed to get build info from ${buildInfoUrl} (status=$?)"
|
||||
logError "Failed to get build info from ${buildInfoUrl} (status=$?)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -30,8 +30,14 @@ if [[ ${LIMBO_BUILD} = lastStableBuild ]]; then
|
||||
LIMBO_BUILD=$(jq -r '.number' <<<${buildJson})
|
||||
log "Resolved latest Limbo build to ${LIMBO_BUILD}"
|
||||
fi
|
||||
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
|
||||
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
||||
|
||||
getRelativePath() {
|
||||
local pattern=$1
|
||||
jq -r --arg pattern "$pattern" '.artifacts[] | select(.fileName|test($pattern)) | .relativePath' <<<${buildJson}
|
||||
}
|
||||
|
||||
artifactPath=$(getRelativePath "^Limbo-")
|
||||
defaultSchemaPath=$(getRelativePath ".*\\.schem")
|
||||
|
||||
export SERVER="limbo-${LIMBO_BUILD}.jar"
|
||||
|
||||
@@ -39,7 +45,7 @@ if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
||||
log "Downloading Limbo from $downloadUrl ..."
|
||||
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
logError "Failed to download from $downloadUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
@@ -48,7 +54,7 @@ fi
|
||||
if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
|
||||
log "Downloading default schem file"
|
||||
if ! curl -o "${LIMBO_SCHEMA_FILENAME}" -fsSL "${baseUrl}/artifact/${defaultSchemaPath}"; then
|
||||
log "ERROR: failed to download schema file $baseUrl (status=$?)"
|
||||
logError "Failed to download schema file $baseUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -9,17 +9,17 @@ isDebugging && set -x
|
||||
resolveVersion
|
||||
|
||||
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VERSION}/latest/${MAGMA_VERSION}"); then
|
||||
log "ERROR failed to locate latest Magma download for ${VERSION}. Is that version supported?"
|
||||
logError "Failed to locate latest Magma download for ${VERSION}. Is that version supported?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl == null ]]; then
|
||||
log "ERROR Magma does not seem to be available for $VERSION"
|
||||
logError "Magma does not seem to be available for $VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Magma server jar from $downloadUrl"
|
||||
logError "Failed to download Magma server jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ isDebugging && set -x
|
||||
resolveVersion
|
||||
|
||||
if [ -z $MAGMA_MAINTAINED_TAG ]; then
|
||||
log "ERROR the variable MAGMA_MAINTAINED_TAG is not specified"
|
||||
logError "The variable MAGMA_MAINTAINED_TAG is not specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -20,7 +20,7 @@ if [[ ${VERSION} = "1.12.2" ]]; then
|
||||
fileName="Magma-${VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
|
||||
else
|
||||
if [ -z $FORGE_VERSION ]; then
|
||||
log "ERROR the variable FORGE_VERSION is not specified"
|
||||
logError "The variable FORGE_VERSION is not specified"
|
||||
exit 1
|
||||
fi
|
||||
fileName="magma-${VERSION}-${FORGE_VERSION}-${MAGMA_MAINTAINED_TAG}-server.jar"
|
||||
@@ -28,7 +28,7 @@ fi
|
||||
downloadUrl="https://github.com/magmamaintained/Magma-${VERSION}/releases/download/${MAGMA_MAINTAINED_TAG}/${fileName}"
|
||||
|
||||
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Magma Maintained server jar from $downloadUrl"
|
||||
logError "Failed to download Magma Maintained server jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -9,19 +9,20 @@ resultsFile=/data/.install-modrinth.env
|
||||
: "${MODRINTH_MODPACK:=${MODRINTH_PROJECT:-}}"
|
||||
: "${MODRINTH_LOADER:=}"
|
||||
: "${MODRINTH_VERSION:=${MODRINTH_VERSION_ID:-}}"
|
||||
: "${MODRINTH_IGNORE_MISSING_FILES:=}"
|
||||
: "${MODRINTH_EXCLUDE_FILES:=}"
|
||||
: "${MODRINTH_FORCE_INCLUDE_FILES:=}"
|
||||
: "${MODRINTH_OVERRIDES_EXCLUSIONS:=}"
|
||||
: "${MODRINTH_IGNORE_MISSING_FILES=}"
|
||||
: "${MODRINTH_EXCLUDE_FILES=}"
|
||||
: "${MODRINTH_FORCE_INCLUDE_FILES=}"
|
||||
: "${MODRINTH_OVERRIDES_EXCLUSIONS=}"
|
||||
: "${MODRINTH_DEFAULT_EXCLUDE_INCLUDES=/image/modrinth-exclude-include.json}"
|
||||
|
||||
if [[ ! $MODRINTH_MODPACK ]]; then
|
||||
log "ERROR: MODRINTH_MODPACK must be set when using TYPE/MOD_PLATFORM of MODRINTH"
|
||||
logError "MODRINTH_MODPACK must be set when using TYPE/MODPACK_PLATFORM/MOD_PLATFORM of MODRINTH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
ensureRemoveAllModsOff "MOD_PLATFORM=MODRINTH"
|
||||
ensureRemoveAllModsOff "MODPACK_PLATFORM=MODRINTH"
|
||||
|
||||
args=(
|
||||
--results-file="$resultsFile"
|
||||
@@ -60,17 +61,14 @@ setArg --default-version-type MODRINTH_DEFAULT_VERSION_TYPE
|
||||
setArg --exclude-files MODRINTH_EXCLUDE_FILES
|
||||
setArg --force-include-files MODRINTH_FORCE_INCLUDE_FILES
|
||||
setArg --overrides-exclusions MODRINTH_OVERRIDES_EXCLUSIONS
|
||||
setArg --default-exclude-includes MODRINTH_DEFAULT_EXCLUDE_INCLUDES
|
||||
|
||||
if ! mc-image-helper install-modrinth-modpack "${args[@]}"; then
|
||||
log "ERROR failed to install Modrinth modpack"
|
||||
logError "Failed to installModrinth modpack"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# grab SERVER, TYPE, VERSION and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "${resultsFile}"
|
||||
set +a
|
||||
applyResultsFile ${resultsFile}
|
||||
resolveFamily
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
|
||||
@@ -9,35 +9,46 @@ isDebugging && set -x
|
||||
resolveVersion
|
||||
: "${MOHIST_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
mohistJobs=https://ci.codemc.io/job/MohistMC/job/
|
||||
mohistJob=${mohistJobs}Mohist-${VERSION}/
|
||||
mohistBaseUrl="https://mohistmc.com/api/v2/projects/mohist/"
|
||||
mohistApiUrl="${mohistBaseUrl}${VERSION}/builds/"
|
||||
|
||||
if ! get --exists "${mohistJob}"; then
|
||||
log "ERROR: mohist builds do not exist for ${VERSION}"
|
||||
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
|
||||
log " and set VERSION accordingly"
|
||||
function logMohistAvailableVerisons(){
|
||||
logError " check ${mohistBaseUrl} for available versions"
|
||||
logError " and set VERSION accordingly"
|
||||
}
|
||||
|
||||
if ! get --exists "${mohistApiUrl}"; then
|
||||
logError "Mohist builds do not exist for ${VERSION}"
|
||||
logMohistAvailableVerisons
|
||||
exit 1
|
||||
fi
|
||||
|
||||
buildRelPath=$(
|
||||
get --json-path '$.artifacts[0].relativePath' "${mohistJob}${MOHIST_BUILD}/api/json"
|
||||
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
|
||||
# Get the latest build number from the API
|
||||
buildNumber=$(
|
||||
get --json-path '$.builds[-1].number' "${mohistApiUrl}"
|
||||
)
|
||||
MOHIST_BUILD="${buildNumber}"
|
||||
fi
|
||||
|
||||
downloadUrl=$(
|
||||
get --json-path "$.builds[?(@.number==${MOHIST_BUILD})].url" "${mohistApiUrl}"
|
||||
)
|
||||
|
||||
baseName=$(basename "${buildRelPath}")
|
||||
if [[ ${baseName} != *-server.jar* ]]; then
|
||||
log "ERROR: mohist build for ${VERSION} is not a valid server jar, found ${baseName}"
|
||||
log " check https://ci.codemc.io/job/MohistMC/ for available versions"
|
||||
log " and set VERSION accordingly"
|
||||
if [[ -z "${downloadUrl}" ]]; then
|
||||
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
|
||||
logMohistAvailableVerisons
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER="/data/${baseName}"
|
||||
SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar"
|
||||
|
||||
if [ ! -f "${SERVER}" ]; then
|
||||
log "Downloading ${baseName}"
|
||||
get -o "${SERVER}" "${mohistJob}${MOHIST_BUILD}/artifact/${buildRelPath}"
|
||||
log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}"
|
||||
get -o "${SERVER}" "${downloadUrl}"
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
export SERVER
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
|
||||
@@ -15,15 +15,11 @@ if ! mc-image-helper install-neoforge \
|
||||
--minecraft-version="${VERSION}" \
|
||||
--neoforge-version="${NEOFORGE_VERSION}" \
|
||||
--force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
|
||||
log "ERROR failed to install Forge"
|
||||
logError "Failed to install NeoForge"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# grab SERVER and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source ${resultsFile}
|
||||
set +a
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FORGE
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ handleDebugMode
|
||||
: "${PAPER_CHANNEL:=default}"
|
||||
: "${PAPER_DOWNLOAD_URL:=}"
|
||||
: "${PAPER_CUSTOM_JAR:=}"
|
||||
: "${PAPER_CONFIG_DEFAULTS_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}"
|
||||
: "${PAPER_CONFIG_DEFAULTS_REPO:=${PAPER_CONFIG_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}}"
|
||||
|
||||
resultsFile=/data/.paper.env
|
||||
if [[ $PAPER_CUSTOM_JAR ]]; then
|
||||
@@ -20,15 +20,10 @@ elif [[ $PAPER_DOWNLOAD_URL ]]; then
|
||||
--output-directory=/data \
|
||||
--results-file="$resultsFile" \
|
||||
--url="$PAPER_DOWNLOAD_URL"; then
|
||||
log "ERROR: failed to download from custom PaperMC URL"
|
||||
logError "Failed to download from custom PaperMC URL"
|
||||
exit 1
|
||||
fi
|
||||
# grab SERVER and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "${resultsFile}"
|
||||
set +a
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
else
|
||||
args=(
|
||||
--output-directory=/data
|
||||
@@ -41,17 +36,25 @@ else
|
||||
args+=(--build="$PAPER_BUILD")
|
||||
fi
|
||||
if ! mc-image-helper install-paper "${args[@]}"; then
|
||||
log "ERROR: failed to download $PAPER_PROJECT"
|
||||
logError "Failed to download $PAPER_PROJECT"
|
||||
exit 1
|
||||
fi
|
||||
# grab SERVER and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "${resultsFile}"
|
||||
set +a
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
fi
|
||||
|
||||
defaultTopLevelConfigs="bukkit.yml spigot.yml"
|
||||
if versionLessThan 1.19; then
|
||||
defaultTopLevelConfigs+=" paper.yml"
|
||||
else
|
||||
# Download default configs to allow for consistent patching
|
||||
DOWNLOAD_DEFAULT_CONFIGS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" paper-global.yml paper-world-defaults.yml)
|
||||
export DOWNLOAD_DEFAULT_CONFIGS
|
||||
fi
|
||||
|
||||
# Download top-level configs to allow for consistent patching
|
||||
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PAPER_CONFIG_DEFAULTS_REPO" "$VERSION" $defaultTopLevelConfigs)
|
||||
export DOWNLOAD_DEFAULTS
|
||||
|
||||
# Normalize on Spigot for downstream operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ isDebugging && set -x
|
||||
IFS=$'\n\t'
|
||||
|
||||
if versionLessThan 1.17; then
|
||||
log "ERROR: Pufferfish server type only supports versions 1.17, 1.18 or 1.19, use PUFFERFISH_BUILD to select the the correct build 47 => 1.18.1, 50 => 1.18.2 etc"
|
||||
logError "Pufferfish server type only supports versions 1.17, 1.18 or 1.19, use PUFFERFISH_BUILD to select the the correct build 47 => 1.18.1, 50 => 1.18.2 etc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -35,7 +35,7 @@ done
|
||||
if [[ ! -f "$SERVER" ]] || isTrue "${FORCE_REDOWNLOAD:-false}"; then
|
||||
log "Downloading Pufferfish from $PUFFERFISH_BUILD_DOWNLOAD_URL ..."
|
||||
if ! get -o "$SERVER" "$PUFFERFISH_BUILD_DOWNLOAD_URL"; then
|
||||
log "ERROR: failed to download from $PUFFERFISH_BUILD_DOWNLOAD_URL (status=$?)"
|
||||
logError "Failed to download from $PUFFERFISH_BUILD_DOWNLOAD_URL (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -15,16 +15,10 @@ 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"
|
||||
--url="${PURPUR_DOWNLOAD_URL}"; then
|
||||
logError "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
|
||||
@@ -35,16 +29,13 @@ else
|
||||
args+=(--build="$PURPUR_BUILD")
|
||||
fi
|
||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||
log "ERROR: failed to download Purpur"
|
||||
logError "Failed to download Purpur"
|
||||
exit 1
|
||||
fi
|
||||
# grab SERVER and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "${resultsFile}"
|
||||
set +a
|
||||
fi
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
|
||||
@@ -12,10 +12,18 @@ set -eu
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
function mc-image-helper-quilt(){
|
||||
mc-image-helper install-quilt \
|
||||
--loader-version="$QUILT_LOADER_VERSION" \
|
||||
--minecraft-version="$VERSION" \
|
||||
--output-directory=/data \
|
||||
--results-file="$resultsFile" "$@"
|
||||
}
|
||||
|
||||
resultsFile=/data/.quilt.env
|
||||
|
||||
if [[ $QUILT_LAUNCHER ]]; then
|
||||
log "WARNING: use of QUILT_LAUNCHER is a deprecated feature."
|
||||
logWarning "Use of QUILT_LAUNCHER is a deprecated feature."
|
||||
SERVER="$QUILT_LAUNCHER"
|
||||
export SERVER
|
||||
resolveVersion
|
||||
@@ -24,38 +32,24 @@ if [[ $QUILT_LAUNCHER ]]; then
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
|
||||
elif [[ $QUILT_LAUNCHER_URL ]]; then
|
||||
log "ERROR: QUILT_LAUNCHER_URL is not longer supported. Pre-download and use QUILT_LAUNCHER."
|
||||
logError "QUILT_LAUNCHER_URL is not longer supported. Pre-download and use QUILT_LAUNCHER."
|
||||
exit 2
|
||||
|
||||
elif [[ $QUILT_INSTALLER_URL ]]; then
|
||||
if ! mc-image-helper install-quilt \
|
||||
--loader-version="$QUILT_LOADER_VERSION" \
|
||||
--minecraft-version="$VERSION" \
|
||||
--output-directory=/data \
|
||||
--results-file="$resultsFile" \
|
||||
--installer-url="$QUILT_INSTALLER_URL"; then
|
||||
log "ERROR: failed to install Quilt given custom installer URL $QUILT_INSTALLER_URL"
|
||||
if ! mc-image-helper-quilt --installer-url="$QUILT_INSTALLER_URL"; then
|
||||
logError "Failed to installQuilt given custom installer URL $QUILT_INSTALLER_URL"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
else
|
||||
if ! mc-image-helper install-quilt \
|
||||
--loader-version="$QUILT_LOADER_VERSION" \
|
||||
--minecraft-version="$VERSION" \
|
||||
--output-directory=/data \
|
||||
--results-file="$resultsFile" \
|
||||
--installer-version="$QUILT_INSTALLER_VERSION"; then
|
||||
log "ERROR: failed to install Quilt given installer version $QUILT_INSTALLER_VERSION"
|
||||
if ! mc-image-helper-quilt --installer-version="$QUILT_INSTALLER_VERSION"; then
|
||||
logError "Failed to installQuilt given installer version $QUILT_INSTALLER_VERSION"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# grab SERVER, VERSION and export it
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "${resultsFile}"
|
||||
set +a
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FABRIC
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
|
||||
@@ -24,11 +24,7 @@ esac
|
||||
# If not SPONGEVERSION selected, detect last version on selected branch
|
||||
if [ -z $SPONGEVERSION ]; then
|
||||
log "Choosing Version for Sponge"
|
||||
if [ "$SPONGEBRANCH" == "stable" ]; then
|
||||
SPONGEVERSION=$(curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r '.buildTypes.stable.latest.version')
|
||||
else
|
||||
SPONGEVERSION=$(curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r '.buildTypes.bleeding.latest.version')
|
||||
fi
|
||||
SPONGEVERSION=$(curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r --arg SPONGEBRANCH "$SPONGEBRANCH" '.buildTypes.$SPONGEBRANCH.latest.version')
|
||||
fi
|
||||
|
||||
VERSION="$SPONGEVERSION"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user