Compare commits

..

1 Commits

Author SHA1 Message Date
Geoff Bourne
30000819d8 Fix syntax error in start-deployPurpur 2024-12-06 07:52:59 -06:00
32 changed files with 73 additions and 265 deletions

View File

@@ -128,13 +128,13 @@ jobs:
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com> org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.8.0 uses: docker/setup-buildx-action@v3.7.1
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.3.0 uses: docker/setup-qemu-action@v3.2.0
- name: Build for test - name: Build for test
uses: docker/build-push-action@v6.12.0 uses: docker/build-push-action@v6.10.0
with: with:
platforms: linux/amd64 platforms: linux/amd64
tags: ${{ env.IMAGE_TO_TEST }} tags: ${{ env.IMAGE_TO_TEST }}
@@ -172,7 +172,7 @@ jobs:
password: ${{ github.token }} password: ${{ github.token }}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v6.12.0 uses: docker/build-push-action@v6.10.0
if: github.actor == github.repository_owner if: github.actor == github.repository_owner
with: with:
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}

View File

@@ -53,10 +53,10 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.8.0 uses: docker/setup-buildx-action@v3.7.1
- name: Confirm multi-arch build - name: Confirm multi-arch build
uses: docker/build-push-action@v6.12.0 uses: docker/build-push-action@v6.10.0
with: with:
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}
# ensure latest base image is used # ensure latest base image is used
@@ -66,7 +66,7 @@ jobs:
cache-from: type=gha,scope=${{ matrix.variant }} cache-from: type=gha,scope=${{ matrix.variant }}
- name: Build for test - name: Build for test
uses: docker/build-push-action@v6.12.0 uses: docker/build-push-action@v6.10.0
with: with:
# Only build single platform since loading multi-arch image into daemon fails with # Only build single platform since loading multi-arch image into daemon fails with
# "docker exporter does not currently support exporting manifest lists" # "docker exporter does not currently support exporting manifest lists"

View File

@@ -50,7 +50,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \ --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 --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.40.11 ARG MC_HELPER_VERSION=1.40.6
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} 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 # used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1 ARG MC_HELPER_REV=1
@@ -64,7 +64,7 @@ WORKDIR /data
STOPSIGNAL SIGTERM STOPSIGNAL SIGTERM
# End user MUST set EULA and change RCON_PASSWORD # End user MUST set EULA and change RCON_PASSWORD
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8 ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000
COPY --chmod=755 scripts/start* / COPY --chmod=755 scripts/start* /
COPY --chmod=755 bin/ /usr/local/bin/ COPY --chmod=755 bin/ /usr/local/bin/

View File

@@ -10,12 +10,10 @@
There you will find things like There you will find things like
- [Quick start with Docker Compose](https://docker-minecraft-server.readthedocs.io/en/latest/#using-docker-compose) - [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/) for Java Edition - 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/)
- [Setting server properties via container environment variables](https://docker-minecraft-server.readthedocs.io/en/latest/configuration/server-properties/) - [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/) - [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/) - [Using various modpack providers/platforms](https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/)
- ...and much more - ...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.

View File

@@ -24,7 +24,6 @@ apk add --no-cache -U \
tzdata \ tzdata \
rsync \ rsync \
nano \ nano \
ncurses \
sudo \ sudo \
tar \ tar \
zstd \ zstd \

View File

@@ -46,7 +46,6 @@ dnf install -y \
libwebp \ libwebp \
findutils \ findutils \
which \ which \
glibc-langpack-en \
${EXTRA_DNF_PACKAGES} ${EXTRA_DNF_PACKAGES}
# Install Git LFS # Install Git LFS

View File

@@ -1,4 +1,4 @@
FROM python:3.9 FROM python:3.8
RUN pip install --upgrade pip RUN pip install --upgrade pip

View File

@@ -139,7 +139,6 @@ The following example shows a patch-set file where various fields in the `paper.
``` ```
Supports the file formats: Supports the file formats:
- JSON - JSON
- JSON5 - JSON5
- Yaml - Yaml

View File

@@ -19,7 +19,7 @@ where, in this case, the standard server port 25565, will be exposed on your hos
!!! note !!! 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](misc/deployment/index.md#on-kubernetes) 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](#deployment-templates-and-examples) to allow for incremental reconfiguration and image upgrades.
!!! info !!! info

View File

@@ -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 `.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 [the examples](https://github.com/itzg/docker-minecraft-server/blob/master/examples/autopause/compose.yml). 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).
Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together. Auto-pause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.

View File

@@ -22,27 +22,22 @@ 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 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 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. - 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
!!! info "More about listing files" 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.
Each line in the listing file is processed as one of the references above; however, blank lines and comments that start with `#` are ignored. For example, `CURSEFORGE_FILES` can be set to "@/extras/cf-mods.txt" where the container file `/extras/cf-mods.txt` contains
Make sure to place the listing file in a mounted directory/volume or declare an appropriate mount for it. ```text
# This comment is ignored
jei:10.2.1.1005
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 # This and previous blank line are ignore
geckolib
aquaculture
naturalist
```
```text !!! tip "Docker Compose"
# This comment is ignored
jei:10.2.1.1005
# This and previous blank line are ignore
geckolib
aquaculture
naturalist
```
!!! 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 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

View File

@@ -1,8 +1,8 @@
# Auto-download from Modrinth # Auto-download from Modrinth
[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](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_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: - **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/`:
``` ```
https://modrinth.com/mod/fabric-api https://modrinth.com/mod/fabric-api
---------- ----------

View File

@@ -1,5 +1,5 @@
mkdocs-material == 9.5.50 mkdocs-material == 9.5.47
mkdocs-autorefs == 1.3.0 mkdocs-autorefs == 1.2.0
mkdocstrings == 0.27.0 mkdocstrings == 0.27.0
mkdocs-literate-nav == 0.6.1 mkdocs-literate-nav == 0.6.1
mdx-gh-links == 0.4 mdx-gh-links == 0.4

View File

@@ -1,9 +1,5 @@
# Bukkit/Spigot # 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". Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "BUKKIT" or "SPIGOT".
!!! example !!! example

View File

@@ -6,8 +6,6 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
!!! example !!! example
Using `docker run` command line
``` ```
docker run ... -e TYPE=PAPER ... docker run ... -e TYPE=PAPER ...
@@ -18,26 +16,6 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
docker run ... -e TYPE=PAPER -e PAPER_CHANNEL=experimental ... 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 !!! tip
If you see the following error, it likely means you need to set the env var `PAPER_CHANNEL` to "experimental" If you see the following error, it likely means you need to set the env var `PAPER_CHANNEL` to "experimental"

View File

@@ -1,13 +0,0 @@
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:

View File

@@ -1,34 +0,0 @@
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:

View File

@@ -1,25 +0,0 @@
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:

View File

@@ -4,7 +4,7 @@ services:
environment: environment:
EULA: true EULA: true
MOTD: | MOTD: |
A §l§cMinecraft§r server line one
line two line two
# or # or
# MOTD: "line one\nline two" # MOTD: "line one\nline two"

View File

@@ -14,8 +14,11 @@ services:
#CF_FILENAME_MATCHER: "0.2.34" #CF_FILENAME_MATCHER: "0.2.34"
CF_EXCLUDE_MODS: | CF_EXCLUDE_MODS: |
controlling controlling
craftpresence
creative-core creative-core
default-options default-options
equipment-compare
item-borders
itemphysic-lite itemphysic-lite
konkrete konkrete
oauth oauth

View File

@@ -1,19 +0,0 @@
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:

View File

@@ -1,18 +1,17 @@
services: services:
mc: mc:
image: itzg/minecraft-server:java17 image: itzg/minecraft-server
ports: ports:
- "25565:25565" - "25565:25565"
environment: environment:
EULA: "true" EULA: "true"
MODPACK_PLATFORM: AUTO_CURSEFORGE MODPACK_PLATFORM: AUTO_CURSEFORGE
# allocate from https://console.curseforge.com/ CF_API_KEY: # allocate from https://console.curseforge.com/
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: vault-hunters-1-18-2 CF_SLUG: vault-hunters-1-18-2
MOTD: "§4----- §2 Vault Hunters: 1.18.2 §4 -----§r\\n §4------ §e vaulthunters.gg §4------" 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------"
MEMORY: 6G # 4G for base server + 2G per player MEMORY: 6G # 4G for base server + 2G per player
CF_EXCLUDE_MODS: | CF_EXCLUDE_MODS: reauth
reauth
ALLOW_FLIGHT: true ALLOW_FLIGHT: true
ENABLE_COMMAND_BLOCK: true ENABLE_COMMAND_BLOCK: true
DIFFICULTY: hard DIFFICULTY: hard

View File

@@ -26,7 +26,6 @@
"clickable-advancements", "clickable-advancements",
"configured", "configured",
"controlling", "controlling",
"craftpresence",
"ctm", "ctm",
"custom-main-menu", "custom-main-menu",
"dark-mode-everywhere", "dark-mode-everywhere",
@@ -45,7 +44,6 @@
"entity-collision-fps-fix", "entity-collision-fps-fix",
"entity-texture-features-fabric", "entity-texture-features-fabric",
"entityculling", "entityculling",
"equipment-compare",
"extreme-sound-muffler", "extreme-sound-muffler",
"ezzoom", "ezzoom",
"fading-night-vision", "fading-night-vision",
@@ -63,8 +61,6 @@
"inmisaddon", "inmisaddon",
"iris-flywheel-compat", "iris-flywheel-compat",
"irisshaders", "irisshaders",
"item-borders",
"item-highlighter",
"item-obliterator", "item-obliterator",
"itemphysic-lite", "itemphysic-lite",
"itemzoom", "itemzoom",
@@ -129,27 +125,17 @@
"vanillafix", "vanillafix",
"visuality", "visuality",
"waila-harvestability", "waila-harvestability",
"wawla",
"xaeroplus",
"yungs-menu-tweaks",
"zume" "zume"
], ],
"modpacks": { "modpacks": {
"all-of-fabric-6": { "all-of-fabric-6": {
"forceIncludes": ["revelationary"] "forceIncludes": ["revelationary"]
}, },
"create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"]
},
"skyfactory-5": {
"forceIncludes": [
"colored-torches",
"dye-mob-dye",
"openstairs"
]
},
"valhelsia-5": { "valhelsia-5": {
"excludes": ["modernfix"] "excludes": ["modernfix"]
},
"create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"]
} }
} }
} }

View File

@@ -22,10 +22,7 @@
"cherishedworlds", "cherishedworlds",
"citresewn", "citresewn",
"clickadv", "clickadv",
"connectedness",
"connector", "connector",
"craftpresence",
"cwb",
"DisableCustomWorldsAdvice", "DisableCustomWorldsAdvice",
"drippyloadingscreen", "drippyloadingscreen",
"eating-animation", "eating-animation",
@@ -39,8 +36,6 @@
"fancymenu", "fancymenu",
"fast-ip-ping", "fast-ip-ping",
"FauxCustomEntityData", "FauxCustomEntityData",
"feytweaks",
"figura",
"GeckoLibIrisCompat", "GeckoLibIrisCompat",
"gpumemleakfix", "gpumemleakfix",
"Highlighter", "Highlighter",
@@ -65,11 +60,9 @@
"PickUpNotifier", "PickUpNotifier",
"PresenceFootsteps", "PresenceFootsteps",
"Prism", "Prism",
"reforgium",
"reeses_sodium_options", "reeses_sodium_options",
"ResourcePackOverrides", "ResourcePackOverrides",
"ryoamiclights", "ryoamiclights",
"screenshot_viewer",
"Searchables", "Searchables",
"seasonhud", "seasonhud",
"ShoulderSurfing", "ShoulderSurfing",
@@ -80,8 +73,7 @@
"VR-Combat", "VR-Combat",
"YeetusExperimentus", "YeetusExperimentus",
"yungsmenutweaks", "yungsmenutweaks",
"Zoomify", "Zoomify"
"zume"
], ],
"globalForceIncludes": [], "globalForceIncludes": [],
"modpacks": {} "modpacks": {}

View File

@@ -18,10 +18,10 @@ githubUrl="https://github.com/KoboDev/SupplyAndDemand/releases/download"
canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json") canyonBuildJSON=$(curl -fsSL "${canyonJob}/${CANYON_BUILD}/api/json")
buildRelPath=$( buildRelPath=$(
jq -r '.artifacts[0].relativePath' <<< "$canyonBuildJSON" jq '.artifacts[0].relativePath' <<< "$canyonBuildJSON"
) )
buildNumber=$( buildNumber=$(
jq -r '.number'<<< "$canyonBuildJSON" jq '.number'<<< "$canyonBuildJSON"
) )
baseName=$(basename "${buildRelPath}") baseName=$(basename "${buildRelPath}")
@@ -50,7 +50,7 @@ if [ ! -f "$SERVER" ]; then
fi fi
curl -fsSL -o "$SERVER" "$downloadUrl" curl -fsSL -o "$SERVER" "$downloadUrl"
if [ ! -f "$SERVER" ]; then if [ ! -f "$SERVER" ]; then
logError "Failed to download from $downloadUrl" logError "Failed to download from $downloadUrl (status=$?)"
exit 3 exit 3
fi fi
fi fi

View File

@@ -62,11 +62,8 @@ elif ! [[ ${FTB_MODPACK_VERSION_ID} =~ [0-9]+ ]]; then
exit 1 exit 1
fi fi
if isTrue "$FTB_FORCE_REINSTALL" || if isTrue "$FTB_FORCE_REINSTALL" || ! [ -f "${ftbManifest}" ] || ! [ -f "${ftbInstallMarker}" ] || [ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
! [ -f "${ftbManifest}" ] || ftbInstaller=/data/ftb-installer
! [ -f "${ftbInstallMarker}" ] ||
[ "$(cat "${ftbInstallMarker}")" != "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" ]; then
ftbInstaller=/data/ftb-installer-v2
arm= arm=
if ! [[ -f "${ftbInstaller}" ]]; then if ! [[ -f "${ftbInstaller}" ]]; then
if [ "$(uname -m)" == "aarch64" ]; then if [ "$(uname -m)" == "aarch64" ]; then

View File

@@ -17,12 +17,12 @@ export SERVER
resolveVersion resolveVersion
EXTRA_ARGS+=" -minecraftVersion $VERSION" EXTRA_ARGS+="-minecraftVersion $VERSION"
if [[ ${KETTING_VERSION:-} ]]; then if [[ ${KETTING_VERSION:-} ]]; then
EXTRA_ARGS+=" -kettingVersion $KETTING_VERSION" EXTRA_ARGS+="-kettingVersion $KETTING_VERSION"
fi fi
if [[ ${FORGE_VERSION:-} ]]; then if [[ ${FORGE_VERSION:-} ]]; then
EXTRA_ARGS+=" -forgeVersion $FORGE_VERSION" EXTRA_ARGS+="-forgeVersion $FORGE_VERSION"
fi fi
export EXTRA_ARGS export EXTRA_ARGS

View File

@@ -9,46 +9,39 @@ isDebugging && set -x
resolveVersion resolveVersion
: "${MOHIST_BUILD:=lastSuccessfulBuild}" : "${MOHIST_BUILD:=lastSuccessfulBuild}"
mohistBaseUrl="https://mohistmc.com/api/v2/projects/mohist/" mohistBaseUrl=https://ci.codemc.io/job/MohistMC/
mohistApiUrl="${mohistBaseUrl}${VERSION}/builds/" mohistJobs=${mohistBaseUrl}job/
mohistJob=${mohistJobs}Mohist-${VERSION}/
function logMohistAvailableVerisons(){ function logMohistAvailableVerisons(){
logError " check ${mohistBaseUrl} for available versions" logError " check ${mohistBaseUrl} for available versions"
logError " and set VERSION accordingly" logError " and set VERSION accordingly"
} }
if ! get --exists "${mohistApiUrl}"; then if ! get --exists "${mohistJob}"; then
logError "Mohist builds do not exist for ${VERSION}" logError "Mohist builds do not exist for ${VERSION}"
logMohistAvailableVerisons logMohistAvailableVerisons
exit 1 exit 1
fi fi
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then buildRelPath=$(
# Get the latest build number from the API get --json-path '$.artifacts[0].relativePath' "${mohistJob}${MOHIST_BUILD}/api/json"
buildNumber=$(
get --json-path '$.builds[-1].number' "${mohistApiUrl}"
)
MOHIST_BUILD="${buildNumber}"
fi
downloadUrl=$(
get --json-path "$.builds[?(@.number==${MOHIST_BUILD})].url" "${mohistApiUrl}"
) )
if [[ -z "${downloadUrl}" ]]; then baseName=$(basename "${buildRelPath}")
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}" if [[ ${baseName} != *-server.jar* ]]; then
logError "Mohist build for ${VERSION} is not a valid server jar, found ${baseName}"
logMohistAvailableVerisons logMohistAvailableVerisons
exit 1 exit 1
fi fi
SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar" export SERVER="/data/${baseName}"
if [ ! -f "${SERVER}" ]; then if [ ! -f "${SERVER}" ]; then
log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}" log "Downloading ${baseName}"
get -o "${SERVER}" "${downloadUrl}" get -o "${SERVER}" "${mohistJob}${MOHIST_BUILD}/artifact/${buildRelPath}"
fi fi
export FAMILY=HYBRID export FAMILY=HYBRID
export SERVER
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"

View File

@@ -42,18 +42,11 @@ else
applyResultsFile ${resultsFile} applyResultsFile ${resultsFile}
fi fi
defaultTopLevelConfigs="bukkit.yml spigot.yml" # Download default configs to allow for consistent patching
if versionLessThan 1.19; then for c in paper-global.yml paper-world-defaults.yml spigot.yml; do
defaultTopLevelConfigs+=" paper.yml" DOWNLOAD_DEFAULT_CONFIGS+=",${PAPER_CONFIG_DEFAULTS_REPO}/${VERSION}/$c"
else done
# Download default configs to allow for consistent patching export DOWNLOAD_DEFAULT_CONFIGS
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 # Normalize on Spigot for downstream operations
export FAMILY=SPIGOT export FAMILY=SPIGOT

View File

@@ -41,13 +41,8 @@ if [[ "$DATAPACKS" ]]; then
exit 2 exit 2
fi fi
elif [[ -d "$i" ]]; then elif [[ -d "$i" ]]; then
if [[ -f "$i/pack.mcmeta" ]]; then log "Copying datapacks from $i ..."
log "Copying datapack from $i" cp "$i"/*.zip "${out_dir}"
cp -r "$i" "${out_dir}"
else
log "Copying datapacks from $i ..."
cp "$i"/*.zip "${out_dir}"
fi
else else
logError "Invalid URL or path given in DATAPACKS: $i" logError "Invalid URL or path given in DATAPACKS: $i"
exit 2 exit 2

View File

@@ -36,15 +36,6 @@ if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS" logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
fi fi
fi fi
if [[ $DOWNLOAD_DEFAULTS ]]; then
log "Downloading default top-level configs, if needed"
if ! mc-image-helper mcopy \
--to /data \
--skip-existing --skip-up-to-date=false \
"$DOWNLOAD_DEFAULTS" 2> /dev/null; then
logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
fi
fi
if [[ ${PATCH_DEFINITIONS} ]]; then if [[ ${PATCH_DEFINITIONS} ]]; then
log "Applying patch definitions from ${PATCH_DEFINITIONS}" log "Applying patch definitions from ${PATCH_DEFINITIONS}"

View File

@@ -513,17 +513,3 @@ function ensureRemoveAllModsOff() {
REMOVE_OLD_MODS=false REMOVE_OLD_MODS=false
fi fi
} }
function buildDownloadList() {
repoUrl=${1?}
version=${2?}
shift 2
result=
for c in "${@}"; do
if [[ $result ]]; then
result+=","
fi
result+="${repoUrl}/${version}/$c"
done
echo "$result"
}