Compare commits

..

4 Commits

Author SHA1 Message Date
Geoff Bourne 8d6442d772 Fabric downloads are better now 2025-05-12 09:14:45 -05:00
Geoff Bourne 9073b22e84 Lower FETCH_CONNECTION_POOL_MAX_IDLE_TIMEOUT 2025-05-12 08:02:12 -05:00
Geoff Bourne 7bbabbac82 Include CF_PAGE_URL in atm10 example 2025-05-12 07:32:26 -05:00
Geoff Bourne 6b308c628f cf: when "no matching files found" include retrieved filenames in error 2025-05-11 21:06:46 -05:00
49 changed files with 152 additions and 626 deletions
+11 -23
View File
@@ -79,26 +79,18 @@ jobs:
baseImage: eclipse-temurin:8u312-b07-jre-focal baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8
mcHelperVersion: 1.42.1
- variant: java8-graalvm-ce - variant: java8-graalvm-ce
baseImage: ghcr.io/graalvm/graalvm-ce:java8 baseImage: ghcr.io/graalvm/graalvm-ce:java8
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8
mcHelperVersion: 1.42.1
- variant: java8-jdk - variant: java8-jdk
baseImage: eclipse-temurin:8u312-b07-jdk-focal baseImage: eclipse-temurin:8u312-b07-jdk-focal
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8
mcHelperVersion: 1.42.1
- variant: java8-openj9 - variant: java8-openj9
baseImage: ibm-semeru-runtimes:open-8u312-b07-jre baseImage: ibm-semeru-runtimes:open-8u312-b07-jre
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8
mcHelperVersion: 1.42.1
env: env:
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}" IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }} HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
@@ -121,18 +113,16 @@ jobs:
${{ github.repository_owner }}/minecraft-server ${{ github.repository_owner }}/minecraft-server
ghcr.io/${{ github.repository_owner }}/minecraft-server ghcr.io/${{ github.repository_owner }}/minecraft-server
tags: | tags: |
# Apply the variant as a moving tag for most recent commit per variant # For the "main" variant, it gets the tag as-is, without suffix
type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == github.event.repository.default_branch }} type=ref,event=tag,enable=${{ matrix.variant == env.MAIN_VARIANT }}
# For the "main" variant, it gets the tag as-is # and each variant (including main one) gets the tag with the variant suffix, such as 2023.1.1-java17
type=pep440,pattern={{version}},enable=${{ matrix.variant == env.MAIN_VARIANT }} type=ref,event=tag,suffix=-${{ matrix.variant }}
# ...and all variants (including main one) get the tag with the variant suffix, such as 2023.1.1-java17
type=pep440,pattern={{version}},suffix=-${{ matrix.variant }}
# latest tag gets a moving 'stable' image tag applied to the main variant
type=pep440,pattern=stable,enable=${{ matrix.variant == env.MAIN_VARIANT }}
# ...and qualified stable for all variants
type=pep440,pattern=stable,suffix=-${{ matrix.variant }}
# for building test/* branch images # for building test/* branch images
type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != github.event.repository.default_branch }} type=ref,event=branch,suffix=-${{ matrix.variant }},enable=${{ github.ref_name != github.event.repository.default_branch }}
# latest repo tag gets a moving 'stable' image tag applied to the main variant
type=raw,value=stable,enable=${{ github.ref_type == 'tag' && matrix.variant == env.MAIN_VARIANT }}
# apply the variant as a moving tag for most recent commit per variant
type=raw,value=${{ matrix.variant }},enable=${{ github.ref_name == github.event.repository.default_branch }}
# for backward compatibility with users referencing java8-multiarch, this will set an extra label on java8 # for backward compatibility with users referencing java8-multiarch, this will set an extra label on java8
type=raw,value=java8-multiarch,enable=${{ matrix.variant == 'java8' && github.ref_name == github.event.repository.default_branch }} type=raw,value=java8-multiarch,enable=${{ matrix.variant == 'java8' && github.ref_name == github.event.repository.default_branch }}
# NOTE this identifies which variant will be published as "latest", which isn't # NOTE this identifies which variant will be published as "latest", which isn't
@@ -143,13 +133,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.11.1 uses: docker/setup-buildx-action@v3.10.0
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v3.6.0 uses: docker/setup-qemu-action@v3.6.0
- name: Build for test - name: Build for test
uses: docker/build-push-action@v6.18.0 uses: docker/build-push-action@v6.16.0
with: with:
platforms: linux/amd64 platforms: linux/amd64
tags: ${{ env.IMAGE_TO_TEST }} tags: ${{ env.IMAGE_TO_TEST }}
@@ -160,7 +150,6 @@ jobs:
push: false push: false
build-args: | build-args: |
BASE_IMAGE=${{ matrix.baseImage }} BASE_IMAGE=${{ matrix.baseImage }}
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
cache-from: type=gha,scope=${{ matrix.variant }} cache-from: type=gha,scope=${{ matrix.variant }}
# no cache-to to avoid cross-cache update from next build step # no cache-to to avoid cross-cache update from next build step
@@ -188,7 +177,7 @@ jobs:
password: ${{ github.token }} password: ${{ github.token }}
- name: Build and push - name: Build and push
uses: docker/build-push-action@v6.18.0 uses: docker/build-push-action@v6.16.0
if: github.actor == github.repository_owner if: github.actor == github.repository_owner
with: with:
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}
@@ -215,6 +204,5 @@ jobs:
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
cache-from: type=gha,scope=${{ matrix.variant }} cache-from: type=gha,scope=${{ matrix.variant }}
cache-to: type=gha,mode=max,scope=${{ matrix.variant }} cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
steps: steps:
- name: on-publish - name: on-publish
if: github.event_name == 'release' && github.event.action == 'published' if: github.event_name == 'release' && github.event.action == 'published'
uses: SethCohen/github-releases-to-discord@v1.19.0 uses: SethCohen/github-releases-to-discord@v1.16.2
with: with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }} webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
- name: on-success - name: on-success
+3 -7
View File
@@ -42,8 +42,6 @@ jobs:
baseImage: eclipse-temurin:8u312-b07-jre-focal baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8
mcHelperVersion: 1.42.1
env: env:
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }} IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@@ -55,21 +53,20 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Setup Docker Buildx - name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.11.1 uses: docker/setup-buildx-action@v3.10.0
- name: Confirm multi-arch build - name: Confirm multi-arch build
uses: docker/build-push-action@v6.18.0 uses: docker/build-push-action@v6.16.0
with: with:
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}
# ensure latest base image is used # ensure latest base image is used
pull: true pull: true
build-args: | build-args: |
BASE_IMAGE=${{ matrix.baseImage }} BASE_IMAGE=${{ matrix.baseImage }}
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
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.18.0 uses: docker/build-push-action@v6.16.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"
@@ -82,7 +79,6 @@ jobs:
push: false push: false
build-args: | build-args: |
BASE_IMAGE=${{ matrix.baseImage }} BASE_IMAGE=${{ matrix.baseImage }}
${{ matrix.mcHelperVersion && format('MC_HELPER_VERSION={0}', matrix.mcHelperVersion) }}
cache-from: type=gha,scope=${{ matrix.variant }} cache-from: type=gha,scope=${{ matrix.variant }}
- name: Run tests - name: Run tests
+8 -6
View File
@@ -19,36 +19,38 @@ RUN --mount=target=/build,source=build \
RUN --mount=target=/build,source=build \ RUN --mount=target=/build,source=build \
/build/run.sh setup-user /build/run.sh setup-user
COPY --chmod=644 files/sudoers* /etc/sudoers.d
EXPOSE 25565 EXPOSE 25565
ARG APPS_REV=1 ARG APPS_REV=1
ARG GITHUB_BASEURL=https://github.com ARG GITHUB_BASEURL=https://github.com
ARG EASY_ADD_VERSION=0.8.11 ARG EASY_ADD_VERSION=0.8.10
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add 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 RUN chmod +x /usr/bin/easy-add
ARG RESTIFY_VERSION=1.7.10 ARG RESTIFY_VERSION=1.7.9
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \ --var version=${RESTIFY_VERSION} --var app=restify --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 RCON_CLI_VERSION=1.7.1 ARG RCON_CLI_VERSION=1.7.0
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \ --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 --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_MONITOR_VERSION=0.15.6 ARG MC_MONITOR_VERSION=0.15.5
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \ --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 --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_SERVER_RUNNER_VERSION=1.13.1 ARG MC_SERVER_RUNNER_VERSION=1.12.6
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ 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.45.0 ARG MC_HELPER_VERSION=1.41.10
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
+2 -3
View File
@@ -17,9 +17,8 @@ if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
exit 1 exit 1
fi fi
if [[ "$(id -u)" = 0 ]] && [[ $UID != 0 ]]; then if [ "$(id -u)" = 0 -a $UID != 0 ]; then
error "Exec needs to be run with user ID $UID" exec $(getSudoFromDistro) minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE}'"
exit 2
else else
echo "$@" >"${CONSOLE_IN_NAMED_PIPE}" echo "$@" >"${CONSOLE_IN_NAMED_PIPE}"
fi fi
+4 -6
View File
@@ -4,18 +4,16 @@ export TARGET
set -euo pipefail set -euo pipefail
os_major_version=$(awk -F'[= ."]+' '/^VERSION_ID=/{ print $2 }' /etc/os-release)
# Install and configure dnf # Install and configure dnf
microdnf install dnf -y microdnf install dnf -y
dnf install 'dnf-command(config-manager)' -y dnf install 'dnf-command(config-manager)' -y
dnf config-manager --set-enabled ol${os_major_version}_codeready_builder dnf config-manager --set-enabled ol8_codeready_builder
# Add EPEL repository # Add EPEL repository
tee /etc/yum.repos.d/ol${os_major_version}-epel.repo <<EOF tee /etc/yum.repos.d/ol8-epel.repo <<EOF
[ol${os_major_version}_developer_EPEL] [ol8_developer_EPEL]
name=Oracle Linux \$releasever EPEL (\$basearch) name=Oracle Linux \$releasever EPEL (\$basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL${os_major_version}/developer/EPEL/\$basearch/ baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1 gpgcheck=1
enabled=1 enabled=1
+1 -1
View File
@@ -24,7 +24,7 @@ _The `-i` is not needed in this case._
If rcon is disabled you can send commands by passing them as arguments to the packaged `mc-send-to-console` script after setting the env var `CREATE_CONSOLE_IN_PIPE` to "true". For example, a player can be op'ed in the container `mc` with: If rcon is disabled you can send commands by passing them as arguments to the packaged `mc-send-to-console` script after setting the env var `CREATE_CONSOLE_IN_PIPE` to "true". For example, a player can be op'ed in the container `mc` with:
```shell ```shell
docker exec --user 1000 mc mc-send-to-console op player docker exec mc mc-send-to-console op player
| | | |
+- container name +- Minecraft commands start here +- container name +- Minecraft commands start here
``` ```
+6 -16
View File
@@ -8,10 +8,10 @@ By default, the image declares an initial and maximum Java memory-heap limit of
- `INIT_MEMORY`: independently sets the initial heap size - `INIT_MEMORY`: independently sets the initial heap size
- `MAX_MEMORY`: independently sets the max heap size - `MAX_MEMORY`: independently sets the max heap size
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`. The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
!!! example "Using docker run" !!! example "Using docker run"
``` ```
-e MEMORY=2G -e MEMORY=2G
``` ```
@@ -23,7 +23,7 @@ The values of all three are passed directly to the JVM and support format/units
``` ```
!!! example "Using compose file" !!! example "Using compose file"
``` ```
environment: environment:
MEMORY: 2G MEMORY: 2G
@@ -48,7 +48,7 @@ To let the JVM calculate the heap size from the container declared memory limit,
deploy: deploy:
resources: resources:
limits: limits:
memory: 4G memory: 4G
``` ```
!!! important !!! important
@@ -68,7 +68,7 @@ docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
```yaml ```yaml
environment: environment:
- EULA=true - EULA=true
- JVM_OPTS=-someJVMOption someJVMOptionValue - JVM_OPTS=-someJVMOption someJVMOptionValue
``` ```
Using object syntax is recommended and more intuitive: Using object syntax is recommended and more intuitive:
@@ -112,7 +112,7 @@ If needing to map to a different port, then also set the environment variable `J
!!! example !!! example
With a compose file: With a compose file:
```yaml ```yaml
environment: environment:
ENABLE_JMX: true ENABLE_JMX: true
@@ -131,13 +131,3 @@ The set of flags documented there can be added using
-e USE_AIKAR_FLAGS=true -e USE_AIKAR_FLAGS=true
When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adjusted according to the article. When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adjusted according to the article.
## Enable MeowIce's Flags
[MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above
The set of flags documented there can be added using
-e USE_MEOWICE_FLAGS=true
There is an optional `USE_MEOWICE_GRAALVM_FLAGS` variable to enable GraalVM specific optimizations, defaults to `TRUE` if USE_MEOWICE_GRAALVM_FLAGS is `TRUE`
+7 -2
View File
@@ -24,9 +24,14 @@ docker run -d -v /path/on/host:/data \
## Running as alternate user/group ID ## Running as alternate user/group ID
By default, the container will switch to and run the Minecraft server as user ID 1000 and group ID 1000; however, that can be changed by setting the environment variables `UID` and `GID`. By default, the container will switch to user ID 1000 and group ID 1000;
however, you can override those values by setting `UID` and/or `GID` as environmental entries, during the `docker run` command.
The startup will also skip user switching if the `--user`/`-u` argument is passed to `docker run` or `user` is set on the compose service. -e UID=1234
-e GID=1234
The container will also skip user switching if the `--user`/`-u` argument
is passed to `docker run`.
## Extra Arguments ## Extra Arguments
+1 -1
View File
@@ -396,7 +396,7 @@ be configured by setting `LEVEL_TYPE` to [an expected type listed here](https://
For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation. For some of the level types, `GENERATOR_SETTINGS` can be used to further customize the world generation.
To configure the `GENERATOR_SETTINGS` you need to add the appropriate `GeneratorOptions` JSON configuration. In the case of a superflat world, you may omit the `flat_world_options`. To configure the `GENERATOR_SEETINGS` you need to add the appropriate `GeneratorOptions` JSON configuration. In the case of a superflat world, you may omit the `flat_world_options`.
The layers are applied from -64 and up and are added in the order of the list The layers are applied from -64 and up and are added in the order of the list
+1 -1
View File
@@ -6,7 +6,7 @@ A specific file can be omitted from each reference to allow for auto-selecting t
!!! warning "CurseForge API key usage" !!! warning "CurseForge API key usage"
A CurseForge API key must be allocated and set with `CF_API_KEY` (or `CF_API_KEY_FILE`) [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key). A CurseForge API key must be allocated and set with `CF_API_KEY` [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
## Project-file references ## Project-file references
-20
View File
@@ -12,8 +12,6 @@
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`. 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. 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.
You can also reference a file containing project entries by prefixing the **container path** path with `@`.
| Description | Example projects entry | | Description | Example projects entry |
|---------------------------------|-------------------------------------------------------| |---------------------------------|-------------------------------------------------------|
@@ -23,24 +21,6 @@
| Latest version using project ID | `P7dR8mSH` | | Latest version using project ID | `P7dR8mSH` |
| Latest version of datapack | `datapack:terralith` | | Latest version of datapack | `datapack:terralith` |
| Specific version of datapack | `datapack:terralith:2.5.5` | | Specific version of datapack | `datapack:terralith:2.5.5` |
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
!!! info "More about listing files"
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, `MODRINTH_PROJECTS` can be set to "@/extras/modrinth-mods.txt", assuming "/extras" has been added to `volumes` section, where the container file `/extras/modrinth-mods.txt` contains
```text
# This comment is ignored
fabric-api
# This and previous blank line are ignore
cloth-config
datapack:terralith
```
## Extra options ## Extra options
+2 -2
View File
@@ -1,5 +1,5 @@
mkdocs-material == 9.6.14 mkdocs-material == 9.6.12
mkdocs-autorefs == 1.4.2 mkdocs-autorefs == 1.4.1
mkdocstrings[python] == 0.29.1 mkdocstrings[python] == 0.29.1
mkdocs-literate-nav == 0.6.2 mkdocs-literate-nav == 0.6.2
mdx-gh-links == 0.4 mdx-gh-links == 0.4
@@ -32,20 +32,6 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
docker run --env-file=.env itzg/minecraft-server docker run --env-file=.env itzg/minecraft-server
``` ```
Alternately you can use [docker secrets](https://docs.docker.com/compose/how-tos/use-secrets/) with a `CF_API_KEY_FILE` environment variable:
```
service:
environment:
CF_API_KEY_FILE: /run/secrets/cf_api_key
secrets:
- cf_api_key
secrets:
cf_api_key:
file: cf_api_key.secret
```
!!! note !!! note
Be sure to use the appropriate [image tag for the Java version compatible with the modpack](../../versions/java.md). Be sure to use the appropriate [image tag for the Java version compatible with the modpack](../../versions/java.md).
@@ -12,7 +12,7 @@ Run a Bukkit/Spigot server type by setting the environment variable `TYPE` to "B
``` ```
docker run ... -e TYPE=SPIGOT ... docker run ... -e TYPE=SPIGOT ...
``` ```
Compose Compose
```yaml ```yaml
environment: environment:
@@ -50,16 +50,3 @@ Canyon is on a temporary hiatus, so by default the final build from GitHub will
-e CANYON_BUILD=6 -e CANYON_BUILD=6
-e CANYON_BUILD=26 -e CANYON_BUILD=26
### Poseidon
[Poseidon](https://github.com/retromcorg/Project-Poseidon) is a fork of CraftBukkit for Minecraft Beta 1.7.3. It includes multiple enhancements whilst also retaining compatibility with old Bukkit plugins.
-e VERSION=b1.7.3 -e TYPE=CANYON
!!! important
Only `VERSION=b1.7.3` is supported. Since that version pre-dates the health check mechanism used by this image, that will need to be disabled by setting `DISABLE_HEALTHCHECK=true`.
### Uberbukkit
[Uberbukkit](https://github.com/Moresteck/uberbukkit) is a fork of CraftBukkit for Minecraft Beta with Multi version support, supports b1.0 - b1.7.3
@@ -49,34 +49,6 @@ By default the latest build will be used; however, a specific build number can b
-e VERSION=1.16.5 -e MOHIST_BUILD=374 -e VERSION=1.16.5 -e MOHIST_BUILD=374
### Youer
A [Youer](https://github.com/MohistMC/Youer) server can be used with
-e TYPE=YOUER
!!! note
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
-e VERSION=1.16.5 -e MOHIST_BUILD=374
### Banner
A [Banner](https://github.com/MohistMC/Banner) server can be used with
-e TYPE=BANNER
!!! note
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
By default the latest build will be used; however, a specific build number can be selected by setting `MOHIST_BUILD`, such as
-e VERSION=1.16.5 -e MOHIST_BUILD=374
### Catserver ### Catserver
A [Catserver](http://catserver.moe/) type server can be used with A [Catserver](http://catserver.moe/) type server can be used with
@@ -84,10 +56,3 @@ A [Catserver](http://catserver.moe/) type server can be used with
-e TYPE=CATSERVER -e TYPE=CATSERVER
> **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored > **NOTE** Catserver only provides a single release stream, so `VERSION` is ignored
### Arclight
A [Arclight](https://arclight.izzel.io/) type server can be used with
-e TYPE=ARCLIGHT
-e ARCLIGHT_TYPE=NEOFORGE,FORGE,FABRIC
@@ -39,12 +39,6 @@ Configuration options with defaults:
Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.wiki/w/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure. Instead of using format codes in the MOTD, Limbo requires [JSON chat content](https://minecraft.wiki/w/Raw_JSON_text_format#Java_Edition). If a plain string is provided, which is the default, then it gets converted into the required JSON structure.
## NanoLimbo
A [NanoLimbo](https://github.com/Nan1t/NanoLimbo) server can be run by setting `TYPE` to `NANOLIMBO`.
An alternate Limbo server
## Crucible ## Crucible
A [Crucible](https://github.com/CrucibleMC/Crucible) server can be run by setting `TYPE` to `CRUCIBLE`. A [Crucible](https://github.com/CrucibleMC/Crucible) server can be run by setting `TYPE` to `CRUCIBLE`.
@@ -71,4 +65,4 @@ Alternatively, the final `-jar` invocation can be replaced by setting `CUSTOM_JA
When using `docker run` make sure to quote the entire value since it has spaces in it, such as When using `docker run` make sure to quote the entire value since it has spaces in it, such as
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer" -e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"
@@ -85,23 +85,6 @@ Extra variables:
- `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the built-in [Flare](https://blog.airplane.gg/flare) profiler - `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the built-in [Flare](https://blog.airplane.gg/flare) profiler
- `PURPUR_DOWNLOAD_URL=<url>` : set URL to download Purpur from custom URL. - `PURPUR_DOWNLOAD_URL=<url>` : set URL to download Purpur from custom URL.
### Leaf
A [Leaf server](https://www.leafmc.one/) is a Paper fork focused on performance improvements and low-level optimizations for smoother gameplay.
To use a Leaf server, set the environment variable `TYPE` to `"LEAF"`.
-e TYPE=LEAF
!!! note
The `VERSION` variable is used to select the Minecraft version to run.
To specify a particular Leaf build, use `LEAF_BUILD`.
By default the latest build will be used; however, a specific build number can be selected by setting `LEAF_BUILD`, such as
-e VERSION=1.21.4 -e LEAF_BUILD=441
### Folia ### Folia
A [Folia server](https://papermc.io/software/folia) can be used by setting the environment variable `TYPE` to "FOLIA". A [Folia server](https://papermc.io/software/folia) can be used by setting the environment variable `TYPE` to "FOLIA".
+3 -21
View File
@@ -1,7 +1,7 @@
!!! warning !!! warning
The variables listed on this page are manually documented and may be out-of-date or inaccurate. The variables listed on this page are manually documented and may be out-of-date or inaccurate.
All other documentation pages are actively maintained, so please use the search box above to find the desired topic. All other documentation pages are actively maintained, so please use the search box above to find the desired topic.
@@ -48,7 +48,7 @@
</tr> </tr>
<tr> <tr>
<td><code>TZ</code></td> <td><code>TZ</code></td>
<td>You can configure the timezone to match yours by setting the TZ environment variable. <td>You can configure the timezone to match yours by setting the TZ environment variable.
alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
@@ -81,18 +81,6 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
<td><code>false</code></td> <td><code>false</code></td>
<td>⬜️</td> <td>⬜️</td>
</tr> </tr>
<tr>
<td><code>USE_MEOWICE_FLAGS</code></td>
<td><a href="https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-">MeowIce has created an updated set of JVM flags</a> based on Aikar's flags but with support for optimizations for Java 17 and above</td>
<td><code>false</code></td>
<td>⬜️</td>
</tr>
<tr>
<td><code>USE_MEOWICE_GRAALVM_FLAGS</code></td>
<td>enables MeowIce's flags for GraalVM if USE_MEOWICE_GRAALVM_FLAGS is TRUE</td>
<td><code>true</code></td>
<td>⬜️</td>
</tr>
<tr> <tr>
<td><code>JVM_OPTS</code></td> <td><code>JVM_OPTS</code></td>
<td>General JVM options can be passed to the Minecraft Server invocation by passing a <code>JVM_OPTS</code> environment variable. The JVM requires -XX options to precede -X options, so those can be declared in <code>JVM_XX_OPTS</code>. Both variables are space-delimited, raw JVM arguments</td> <td>General JVM options can be passed to the Minecraft Server invocation by passing a <code>JVM_OPTS</code> environment variable. The JVM requires -XX options to precede -X options, so those can be declared in <code>JVM_XX_OPTS</code>. Both variables are space-delimited, raw JVM arguments</td>
@@ -723,7 +711,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
### CurseForge ### CurseForge
!!! tip !!! tip
Refer to the [main documentation page](types-and-platforms/mod-platforms/auto-curseforge.md) for more details and up-to-date information. Refer to the [main documentation page](types-and-platforms/mod-platforms/auto-curseforge.md) for more details and up-to-date information.
<table> <table>
@@ -742,12 +730,6 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
<td><code></code></td> <td><code></code></td>
<td>✅</td> <td>✅</td>
</tr> </tr>
<tr>
<td><code>CF_API_KEY_FILE</code></td>
<td>A path to a file inside of container that contains <strong>YOUR</strong> CurseForge (Eternal) API Key.</td>
<td><code></code></td>
<td>✅</td>
</tr>
<tr> <tr>
<td><code>CF_PAGE_URL</code></td> <td><code>CF_PAGE_URL</code></td>
<td>Pass a page URL to the modpack or a specific file</td> <td>Pass a page URL to the modpack or a specific file</td>
+1 -1
View File
@@ -78,7 +78,7 @@ where `java tag` still refers to the first column of the table above and `releas
### Stable image tag ### Stable image tag
The `stable` image tag combines the benefits of `latest` and [release versions](#release-versions) since it shifts to refer to the most recently released version. There is also a per-variant stable tag, formatted as `stable-{variant}`. The `stable` image tag combines the benefits of `latest` and [release versions](#release-versions) since it shifts to refer to the most recently released version.
## Version compatibilities ## Version compatibilities
+4 -2
View File
@@ -14,8 +14,10 @@ services:
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key # Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: ${CF_API_KEY} CF_API_KEY: ${CF_API_KEY}
CF_SLUG: all-the-mods-10 CF_SLUG: all-the-mods-10
# Optional: select a specific version/file # Or reference a specific modpack file/version using CF_PAGE_URL, such as this one for 2.47
# CF_FILENAME_MATCHER: "1.17" # CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/all-the-mods-10/files/6502777
# Optional: select a specific version/file when using CF_SLUG
# CF_FILENAME_MATCHER: "2.47"
MEMORY: 4G MEMORY: 4G
CF_OVERRIDES_EXCLUSIONS: | CF_OVERRIDES_EXCLUSIONS: |
shaderpacks/** shaderpacks/**
-1
View File
@@ -12,7 +12,6 @@ services:
# Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about # Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about
FTB_MODPACK_ID: "119" FTB_MODPACK_ID: "119"
# FTB_MODPACK_VERSION_ID: "" # FTB_MODPACK_VERSION_ID: ""
MEMORY: 4G
volumes: volumes:
# use a named, managed volume for data volume # use a named, managed volume for data volume
- data:/data - data:/data
+2 -4
View File
@@ -5,11 +5,9 @@ services:
EULA: true EULA: true
# https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/ # https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/
MODPACK_PLATFORM: AUTO_CURSEFORGE MODPACK_PLATFORM: AUTO_CURSEFORGE
# CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/6290684 # CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/6044634
CF_SLUG: skyfactory-5 CF_SLUG: skyfactory-5
# Comment out the following to get the latest version or pick a version from CF_FILENAME_MATCHER: 5.0.2
# https://www.curseforge.com/minecraft/modpacks/skyfactory-5/files/all?page=1&pageSize=20
CF_FILENAME_MATCHER: 5.0.8
# Allocate API key from https://console.curseforge.com/ # Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as # and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$.... # CF_API_KEY=$$2a$$10$$....
+5 -1
View File
@@ -45,7 +45,11 @@ if isTrue "${DEBUG_AUTOPAUSE}"; then
knockdArgs+=(-D) knockdArgs+=(-D)
fi fi
/usr/local/sbin/knockd "${knockdArgs[@]}" if isTrue "${SKIP_SUDO}"; then
/usr/local/sbin/knockd "${knockdArgs[@]}"
else
sudo /usr/local/sbin/knockd "${knockdArgs[@]}"
fi
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
logAutopause "Failed to start knockd daemon." logAutopause "Failed to start knockd daemon."
+5 -2
View File
@@ -6,5 +6,8 @@ if isTrue "${DEBUG_AUTOSTOP}"; then
fi fi
logAutostopAction "Stopping Java process" logAutostopAction "Stopping Java process"
pkill -f --signal SIGTERM mc-server-runner if isTrue "${AUTOSTOP_PKILL_USE_SUDO:-false}"; then
sudo pkill -f --signal SIGTERM mc-server-runner
else
pkill -f --signal SIGTERM mc-server-runner
fi
+2 -18
View File
@@ -28,7 +28,6 @@
"clickable-advancements", "clickable-advancements",
"compass-coords", "compass-coords",
"configured", "configured",
"controllable",
"controlling", "controlling",
"craftpresence", "craftpresence",
"ctm", "ctm",
@@ -38,7 +37,6 @@
"ding", "ding",
"drippy-loading-screen", "drippy-loading-screen",
"dynamic-surroundings", "dynamic-surroundings",
"dynamic-view",
"dynamiclights-reforged", "dynamiclights-reforged",
"easiervillagertrading", "easiervillagertrading",
"effective-forge", "effective-forge",
@@ -46,25 +44,20 @@
"embeddium-extension", "embeddium-extension",
"embeddium-extras", "embeddium-extras",
"enchantment-descriptions", "enchantment-descriptions",
"enhanced-boss-bars",
"enhancedvisuals", "enhancedvisuals",
"entity-collision-fps-fix", "entity-collision-fps-fix",
"entity-model-features", "entity-model-features",
"entity-texture-features-fabric", "entity-texture-features-fabric",
"entityculling", "entityculling",
"equipment-compare", "equipment-compare",
"essential-mod",
"euphoria-patches", "euphoria-patches",
"extreme-sound-muffler", "extreme-sound-muffler",
"ezzoom", "ezzoom",
"fading-night-vision", "fading-night-vision",
"falling-leaves-forge", "falling-leaves-forge",
"fancymenu", "fancymenu",
"farsight",
"faster-ladder-climbing", "faster-ladder-climbing",
"flerovium",
"foamfix-optimization-mod", "foamfix-optimization-mod",
"forgeskyboxes",
"fps-reducer", "fps-reducer",
"free-cam", "free-cam",
"ftb-backups-2", "ftb-backups-2",
@@ -72,7 +65,6 @@
"hwyla", "hwyla",
"iceberg", "iceberg",
"ignitioncoil", "ignitioncoil",
"illager-raid-music",
"inmisaddon", "inmisaddon",
"iris-flywheel-compat", "iris-flywheel-compat",
"irisshaders", "irisshaders",
@@ -88,10 +80,8 @@
"legendary-tooltips", "legendary-tooltips",
"lighty", "lighty",
"loot-capacitor-tooltips", "loot-capacitor-tooltips",
"loot-journal",
"lootbeams", "lootbeams",
"magnesium-extras", "magnesium-extras",
"make-bubbles-pop",
"menumobs", "menumobs",
"minecraft-rich-presence", "minecraft-rich-presence",
"model-gap-fix", "model-gap-fix",
@@ -105,12 +95,10 @@
"oculus", "oculus",
"oldjavawarning", "oldjavawarning",
"overloaded-armor-bar", "overloaded-armor-bar",
"particular",
"packmenu", "packmenu",
"packmodemenu", "packmodemenu",
"particular",
"particular-reforged",
"reauth", "reauth",
"rebind-narrator",
"reblured", "reblured",
"reeses-sodium-options", "reeses-sodium-options",
"reforgium", "reforgium",
@@ -134,9 +122,9 @@
"sodium-options-api", "sodium-options-api",
"sodium-rubidium-occlusion-culling-fix", "sodium-rubidium-occlusion-culling-fix",
"sound", "sound",
"sound-reloader",
"sound-filters", "sound-filters",
"sound-physics-remastered", "sound-physics-remastered",
"sound-reloader",
"stellar-sky", "stellar-sky",
"swingthroughgrass", "swingthroughgrass",
"textrues-embeddium-options", "textrues-embeddium-options",
@@ -150,7 +138,6 @@
"vanillafix", "vanillafix",
"visuality", "visuality",
"waila-harvestability", "waila-harvestability",
"wakes-reforged",
"wawla", "wawla",
"xaeroplus", "xaeroplus",
"yungs-menu-tweaks", "yungs-menu-tweaks",
@@ -160,9 +147,6 @@
"all-of-fabric-6": { "all-of-fabric-6": {
"forceIncludes": ["revelationary"] "forceIncludes": ["revelationary"]
}, },
"beyond-depth": {
"forceIncludes": ["particular-reforged"]
},
"create-arcane-engineering": { "create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"] "forceIncludes": ["just-enough-resources-jer"]
}, },
+2
View File
@@ -0,0 +1,2 @@
minecraft ALL=(ALL) NOPASSWD:/usr/bin/pkill
minecraft ALL=(ALL) NOPASSWD:/usr/local/sbin/knockd
Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 68 KiB

+6 -22
View File
@@ -147,11 +147,11 @@ if isTrue "${ENABLE_AUTOSTOP}"; then
"${SCRIPTS:-/}start-autostop" "${SCRIPTS:-/}start-autostop"
fi fi
if if
[[ "$RCON_CMDS_STARTUP" ]] || [[ "$RCON_CMDS_STARTUP" ]] ||
[[ "$RCON_CMDS_ON_CONNECT" ]] || [[ "$RCON_CMDS_ON_CONNECT" ]] ||
[[ "$RCON_CMDS_ON_DISCONNECT" ]] || [[ "$RCON_CMDS_ON_DISCONNECT" ]] ||
[[ "$RCON_CMDS_FIRST_CONNECT" ]] || [[ "$RCON_CMDS_FIRST_CONNECT" ]] ||
[[ "$RCON_CMDS_LAST_DISCONNECT" ]] [[ "$RCON_CMDS_LAST_DISCONNECT" ]]
then then
log "Starting RCON commands" log "Starting RCON commands"
@@ -250,7 +250,7 @@ case "${TYPE^^}" in
exec "${SCRIPTS:-/}start-deployKetting" "$@" exec "${SCRIPTS:-/}start-deployKetting" "$@"
;; ;;
MOHIST|YOUER|BANNER) MOHIST)
exec "${SCRIPTS:-/}start-deployMohist" "$@" exec "${SCRIPTS:-/}start-deployMohist" "$@"
;; ;;
@@ -274,32 +274,16 @@ case "${TYPE^^}" in
exec "${SCRIPTS:-/}start-deployLimbo" "$@" exec "${SCRIPTS:-/}start-deployLimbo" "$@"
;; ;;
NANOLIMBO)
exec "${SCRIPTS:-/}start-deployNanoLimbo" "$@"
;;
CRUCIBLE) CRUCIBLE)
exec "${SCRIPTS:-/}start-deployCrucible" "$@" exec "${SCRIPTS:-/}start-deployCrucible" "$@"
;; ;;
LEAF)
exec "${SCRIPTS:-/}start-deployLeaf" "$@"
;;
ARCLIGHT)
exec "${SCRIPTS:-/}start-deployArcLight" "$@"
;;
POSEIDON)
exec "${SCRIPTS:-/}start-deployPoseidon" "$@"
;;
*) *)
logError "Invalid TYPE: '$TYPE'" logError "Invalid TYPE: '$TYPE'"
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT," logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH," logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, CATSERVER, AIRPLANE, PUFFERFISH,"
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER" logError " CANYON, LIMBO, CRUCIBLE"
exit 1 exit 1
;; ;;
esac esac
-41
View File
@@ -1,41 +0,0 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
set -o pipefail
set -e
isDebugging && set -x
resolveVersion
: "${ARCLIGHT_RELEASE:=latest}"
: "${ARCLIGHT_TYPE:=neoforge}"
arclightReleasesUrl=https://api.github.com/repos/IzzelAliz/Arclight/releases
if [[ ${ARCLIGHT_RELEASE^^} = LATEST ]]; then
arclightReleaseUrl=${arclightReleasesUrl}/latest
else
arclightReleaseUrl=${arclightReleasesUrl}/tags/${ARCLIGHT_RELEASE}
fi
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /arclight-${ARCLIGHT_TYPE,,}-${VERSION}-.*\.jar/)].browser_download_url" \
--accept "application/vnd.github.v3+json" "$arclightReleaseUrl"); then
logError "Failed to access ${ARCLIGHT_RELEASE} release of Arclight"
exit 1
fi
if [[ $downloadUrl = null ]]; then
logError "Failed to locate Arclight jar for $VERSION from ${ARCLIGHT_RELEASE}"
exit 1
fi
log "Downloading Arclight from $downloadUrl"
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
logError "Arclight jar from $downloadUrl"
exit 1
fi
export SERVER
export FAMILY=HYBRID
export HYBRIDTYPE="${ARCLIGHT_TYPE,,}"
exec "${SCRIPTS:-/}start-spiget" "$@"
-11
View File
@@ -21,20 +21,9 @@ set -eu
: "${CF_DOWNLOADS_REPO=$([ -d /downloads ] && echo '/downloads' || echo '')}" : "${CF_DOWNLOADS_REPO=$([ -d /downloads ] && echo '/downloads' || echo '')}"
: "${CF_MODPACK_MANIFEST:=}" : "${CF_MODPACK_MANIFEST:=}"
: "${CF_API_CACHE_DEFAULT_TTL:=}" # as ISO-8601 duration, such as P2D or PT12H : "${CF_API_CACHE_DEFAULT_TTL:=}" # as ISO-8601 duration, such as P2D or PT12H
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
resultsFile=/data/.install-curseforge.env resultsFile=/data/.install-curseforge.env
if [[ -n ${CF_API_KEY_FILE} ]]; then
if [[ -r "${CF_API_KEY_FILE}" ]]; then
CF_API_KEY="$(cat "${CF_API_KEY_FILE}")"
export CF_API_KEY
else
logError "CF_API_KEY_FILE is not readable: ${CF_API_KEY_FILE}"
exit 1
fi
fi
isDebugging && set -x isDebugging && set -x
ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE" ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE"
+45 -8
View File
@@ -70,19 +70,38 @@ function downloadSpigot {
esac esac
if [[ ${VERSION^^} = LATEST ]]; then if [[ ${VERSION^^} = LATEST ]]; then
if ! downloadUrl=$(restify "${getBukkitBaseUrl}/${getbukkitFlavor}" --id='downloadr' | jq -r '.[0] | .href '); then 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" logError "Failed to retrieve latest version from ${getBukkitSpigotUrl} -- site might be down"
exit 1 exit 1
fi fi
fi fi
if [[ -z $downloadUrl ]]; then if [[ -z $downloadUrl ]]; then
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar" downloadBaseUrl="https://"
downloadSuffixUrl=".getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
if versionLessThan 1.16.5 || { [[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VERSION} = "1.16.5" ]] ; }; then
downloadBaseUrl+="cdn"
else
downloadBaseUrl+="download"
fi
downloadUrl="${downloadBaseUrl}${downloadSuffixUrl}"
fi fi
log "Downloading $match from $downloadUrl if missing ..." setServerVar
curlArgs=()
if [ -f "$SERVER" ] && ! isTrue "$FORCE_REDOWNLOAD"; then
# tell curl to only download when newer
curlArgs+=(-z "$SERVER")
fi
if isDebugging; then
curlArgs+=(-v)
fi
log "Downloading $match from $downloadUrl ..."
if ! SERVER=$(get -o /data --skip-existing --output-filename "$downloadUrl"); then tempFile="$SERVER.$$"
# HTTP error or download site responded with an HTML error page
if ! curl -fsSL -o "$tempFile" "${curlArgs[@]}" "$downloadUrl" || ( [ -f "$tempFile" ] && grep -iq "doctype html" "$tempFile" ); then
cat <<EOF cat <<EOF
@@ -92,9 +111,29 @@ ERROR: failed to download from $downloadUrl
Click into the version entry to find the **exact** version. Click into the version entry to find the **exact** version.
EOF EOF
exit 1
if isDebugging && grep -iq "doctype html" "$tempFile"; then
cat "$tempFile"
fi fi
export SERVER
if [ -f "$SERVER" ]; then
log "Continuing with existing $SERVER file"
else
# remove invalid download
rm "$tempFile"
exit 3
fi
else
if [ -f "$tempFile" ]; then
mv "$tempFile" "$SERVER"
fi
fi
JVM_OPTS="${JVM_OPTS} -DIReallyKnowWhatIAmDoingISwear"
export JVM_OPTS
} }
function setServerVar { function setServerVar {
@@ -118,8 +157,6 @@ else
downloadSpigot downloadSpigot
fi fi
JVM_OPTS="${JVM_OPTS} -DIReallyKnowWhatIAmDoingISwear"
export JVM_OPTS
# Normalize on Spigot for operations below # Normalize on Spigot for operations below
export FAMILY=SPIGOT export FAMILY=SPIGOT
-1
View File
@@ -28,6 +28,5 @@ if [ ! -f ${SERVER} ]; then
fi fi
export FAMILY=HYBRID export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"
-1
View File
@@ -56,6 +56,5 @@ fi
export SERVER export SERVER
export FAMILY=HYBRID export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"
-1
View File
@@ -40,6 +40,5 @@ fi
# Allow for overriding Family on custom for testing. # Allow for overriding Family on custom for testing.
export FAMILY="${FAMILY:-HYBRID}" export FAMILY="${FAMILY:-HYBRID}"
export HYBRIDTYPE="${HYBRIDTYPE:-any}"
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"
-1
View File
@@ -28,6 +28,5 @@ export EXTRA_ARGS
export SERVER export SERVER
export FAMILY=HYBRID export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"
-51
View File
@@ -1,51 +0,0 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
set -o pipefail
set -e
isDebugging && set -x
resolveVersion
: "${LEAF_BUILD:=LATEST}"
# Docs at https://api.leafmc.one/docs/swagger-ui/index.html
leafApiUrl="https://api.leafmc.one/v2/projects/leaf"
leafDownloadsPage="https://www.leafmc.one/download"
if ! get --exists "${leafApiUrl}/versions/${VERSION}/builds"; then
logError "Leaf builds do not exist for ${VERSION}"
logError " check ${leafDownloadsPage} for available versions"
logError " and set VERSION accordingly"
exit 1
fi
if [[ "${LEAF_BUILD^^}" == "LATEST" ]]; then
# Get the latest build number from the API, which will be the last object in the builds array
if ! buildNumber=$(
get --json-path '$.builds[-1].build' "${leafApiUrl}/versions/${VERSION}/builds"
); then
logError "failed to list Leaf builds for ${VERSION}"
exit 1
fi
LEAF_BUILD="${buildNumber}"
fi
if ! filename=$(
get --json-path='$.downloads.primary.name' --json-value-when-missing="" "${leafApiUrl}/versions/${VERSION}/builds/${LEAF_BUILD}"
); then
logError "Failed to retrieve download filename"
exit 1
fi
SERVER="/data/$filename"
if ! get --skip-existing --log-progress-each -o "${SERVER}" "${leafApiUrl}/versions/${VERSION}/builds/${LEAF_BUILD}/downloads/${filename}"; then
logError "Failed to download"
exit 1
fi
export FAMILY=SPIGOT
export SERVER
exec "${SCRIPTS:-/}start-spiget" "$@"
+1 -1
View File
@@ -65,4 +65,4 @@ fi
export LEVEL export LEVEL
export FAMILY=LIMBO export FAMILY=LIMBO
exec ${SCRIPTS:-/}start-setupWorld "$@" exec ${SCRIPTS:-/}start-setupWorld $@
-1
View File
@@ -25,6 +25,5 @@ fi
export SERVER export SERVER
export FAMILY=HYBRID export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"
-1
View File
@@ -34,6 +34,5 @@ fi
export SERVER export SERVER
export FAMILY=HYBRID export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"
+19 -29
View File
@@ -9,56 +9,46 @@ isDebugging && set -x
resolveVersion resolveVersion
: "${MOHIST_BUILD:=lastSuccessfulBuild}" : "${MOHIST_BUILD:=lastSuccessfulBuild}"
# Docs at https://mohistmc.com/mohistmc-api mohistBaseUrl="https://mohistmc.com/api/v2/projects/mohist/"
mohistType="${TYPE,,}" mohistApiUrl="${mohistBaseUrl}${VERSION}/builds/"
mohistApiUrl="https://api.mohistmc.com/project/${mohistType}"
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}"
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then function logMohistAvailableVerisons(){
logError "${mohistType} builds do not exist for ${VERSION}" logError " check ${mohistBaseUrl} for available versions"
logError " check ${mohistDownloadsPage} for available versions"
logError " and set VERSION accordingly" logError " and set VERSION accordingly"
}
if ! get --exists "${mohistApiUrl}"; then
logError "Mohist builds do not exist for ${VERSION}"
logMohistAvailableVerisons
exit 1 exit 1
fi fi
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
# Get the latest build number from the API # Get the latest build number from the API
if ! buildNumber=$( buildNumber=$(
get --json-path '$[0].id' "${mohistApiUrl}/${VERSION}/builds" get --json-path '$.builds[-1].number' "${mohistApiUrl}"
); then )
logError "failed to list ${mohistType} builds for ${VERSION}"
exit 1
fi
MOHIST_BUILD="${buildNumber}" MOHIST_BUILD="${buildNumber}"
fi fi
downloadUrl="${mohistApiUrl}/${VERSION}/builds/${MOHIST_BUILD}/download" downloadUrl=$(
get --json-path "$.builds[?(@.number==${MOHIST_BUILD})].url" "${mohistApiUrl}"
)
if [[ -z "${downloadUrl}" ]]; then if [[ -z "${downloadUrl}" ]]; then
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}" logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions" logMohistAvailableVerisons
logError " and set VERSION accordingly"
exit 1 exit 1
fi fi
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar" SERVER="/data/mohist-${VERSION}-${MOHIST_BUILD}-server.jar"
if [ ! -f "${SERVER}" ]; then if [ ! -f "${SERVER}" ]; then
log "Downloading ${mohistType^} build ${MOHIST_BUILD} for ${VERSION}" log "Downloading Mohist build ${MOHIST_BUILD} for ${VERSION}"
get -o "${SERVER}" "${downloadUrl}" get -o "${SERVER}" "${downloadUrl}"
fi fi
if [[ "${mohistType}" == "mohist" ]]; then
export HYBRIDTYPE=forge
elif [[ "${mohistType}" == "youer" ]]; then
export HYBRIDTYPE=neoforge
elif [[ "${mohistType}" == "banner" ]]; then
export HYBRIDTYPE=fabric
else
log "Unknown server type"
fi
export SERVER
export FAMILY=HYBRID export FAMILY=HYBRID
export SERVER
exec "${SCRIPTS:-/}start-spiget" "$@" exec "${SCRIPTS:-/}start-spiget" "$@"
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
isDebugging && set -x
if ! SERVER=$(mc-image-helper github download-latest-asset \
--output-directory=/data \
--name-pattern="NanoLimbo-.+?(?<!-sources)\.jar" \
Nan1t/NanoLimbo
); then
logError "Failed to download NanoLimbo"
exit 1
fi
export SERVER
export FAMILY=LIMBO
exec ${SCRIPTS:-/}start-setupMounts "$@"
-37
View File
@@ -1,37 +0,0 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
set -o pipefail
set -e
isDebugging && set -x
resolveVersion
if [ "${VERSION}" != "b1.7.3" ]; then
logError "Poseidon server type only supports VERSION=b1.7.3"
exit 1
fi
# : "${POSEIDON_RELEASE:=latest}" placeholder until I figure out how to add version selection with mc-image-helper
: "${POSEIDON_TYPE:=poseidon}"
if [[ ${POSEIDON_TYPE^^} = UBERBUKKIT ]]; then
poseidonRepo="Moresteck/uberbukkit"
else
poseidonRepo="retromcorg/Project-Poseidon"
fi
if ! SERVER=$(mc-image-helper github download-latest-asset \
--output-directory=/data \
--name-pattern="^(?!original-).+\.jar" \
${poseidonRepo}
); then
logError "Failed to download ${POSEIDON_TYPE}"
exit 1
fi
export SERVER
export FAMILY=SPIGOT
exec "${SCRIPTS:-/}start-spiget" "$@"
+5 -138
View File
@@ -151,38 +151,16 @@ if isTrue "${ENABLE_JMX}"; then
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}" log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
fi fi
if isTrue "${USE_MEOWICE_FLAGS}"; then
java_major_version=$(mc-image-helper java-release)
if [[ $java_major_version -gt 16 ]]; then
USE_MEOWICE_GRAALVM_FLAGS="${USE_MEOWICE_GRAALVM_FLAGS:-TRUE}"
log "Java version $java_major_version using MeowIce's flags for Java 17+"
else
log "Your Java version is $java_major_version, MeowIce's flags are for Java 17+ falling back to Aikar's"
USE_MEOWICE_FLAGS=FALSE
fi
USE_AIKAR_FLAGS=TRUE
fi
if isTrue "${USE_AIKAR_FLAGS}"; then if isTrue "${USE_AIKAR_FLAGS}"; then
# From https://mcflags.emc.gs/ # From https://mcflags.emc.gs/
if isTrue "${USE_MEOWICE_FLAGS}"; then
log "Using MeowIce's flags" if [[ $MAX_MEMORY ]] && (( $(normalizeMemSize "${MAX_MEMORY}") >= $(normalizeMemSize 12g) )); then
G1NewSizePercent=28
G1MaxNewSizePercent=50
G1HeapRegionSize=16M
G1ReservePercent=15
InitiatingHeapOccupancyPercent=20
G1MixedGCCountTarget=3
G1RSetUpdatingPauseTimePercent=0
elif [[ $MAX_MEMORY ]] && (( $(normalizeMemSize "${MAX_MEMORY}") >= $(normalizeMemSize 12g) )); then
log "Using Aikar's >12GB flags" log "Using Aikar's >12GB flags"
G1NewSizePercent=40 G1NewSizePercent=40
G1MaxNewSizePercent=50 G1MaxNewSizePercent=50
G1HeapRegionSize=16M G1HeapRegionSize=16M
G1ReservePercent=15 G1ReservePercent=15
InitiatingHeapOccupancyPercent=20 InitiatingHeapOccupancyPercent=20
G1MixedGCCountTarget=4
G1RSetUpdatingPauseTimePercent=5
else else
log "Using Aikar's flags" log "Using Aikar's flags"
G1NewSizePercent=30 G1NewSizePercent=30
@@ -190,8 +168,6 @@ if isTrue "${USE_AIKAR_FLAGS}"; then
G1HeapRegionSize=8M G1HeapRegionSize=8M
G1ReservePercent=20 G1ReservePercent=20
InitiatingHeapOccupancyPercent=15 InitiatingHeapOccupancyPercent=15
G1MixedGCCountTarget=4
G1RSetUpdatingPauseTimePercent=5
fi fi
JVM_XX_OPTS="${JVM_XX_OPTS} JVM_XX_OPTS="${JVM_XX_OPTS}
@@ -206,10 +182,10 @@ if isTrue "${USE_AIKAR_FLAGS}"; then
-XX:G1HeapRegionSize=${G1HeapRegionSize} -XX:G1HeapRegionSize=${G1HeapRegionSize}
-XX:G1ReservePercent=${G1ReservePercent} -XX:G1ReservePercent=${G1ReservePercent}
-XX:G1HeapWastePercent=5 -XX:G1HeapWastePercent=5
-XX:G1MixedGCCountTarget=${G1MixedGCCountTarget} -XX:G1MixedGCCountTarget=4
-XX:InitiatingHeapOccupancyPercent=${InitiatingHeapOccupancyPercent} -XX:InitiatingHeapOccupancyPercent=${InitiatingHeapOccupancyPercent}
-XX:G1MixedGCLiveThresholdPercent=90 -XX:G1MixedGCLiveThresholdPercent=90
-XX:G1RSetUpdatingPauseTimePercent=${G1RSetUpdatingPauseTimePercent} -XX:G1RSetUpdatingPauseTimePercent=5
-XX:SurvivorRatio=32 -XX:SurvivorRatio=32
-XX:+PerfDisableSharedMem -XX:+PerfDisableSharedMem
-XX:MaxTenuringThreshold=1 -XX:MaxTenuringThreshold=1
@@ -218,116 +194,6 @@ if isTrue "${USE_AIKAR_FLAGS}"; then
" "
fi fi
if isTrue "${USE_MEOWICE_FLAGS}"; then
JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:+UnlockDiagnosticVMOptions
-XX:G1SATBBufferEnqueueingThresholdPercent=30
-XX:G1ConcMarkStepDurationMillis=5
-XX:+UseNUMA
-XX:-DontCompileHugeMethods
-XX:MaxNodeLimit=240000
-XX:NodeLimitFudgeFactor=8000
-XX:ReservedCodeCacheSize=400M
-XX:NonNMethodCodeHeapSize=12M
-XX:ProfiledCodeHeapSize=194M
-XX:NonProfiledCodeHeapSize=194M
-XX:NmethodSweepActivity=1
-XX:+UseFastUnorderedTimeStamps
-XX:+UseCriticalJavaThreadPriority
-XX:AllocatePrefetchStyle=3
-XX:+AlwaysActAsServerClassMachine
-XX:+UseTransparentHugePages
-XX:LargePageSizeInBytes=2M
-XX:+UseLargePages
-XX:+EagerJVMCI
-XX:+UseStringDeduplication
-XX:+UseAES
-XX:+UseAESIntrinsics
-XX:+UseFMA
-XX:+UseLoopPredicate
-XX:+RangeCheckElimination
-XX:+OptimizeStringConcat
-XX:+UseCompressedOops
-XX:+UseThreadPriorities
-XX:+OmitStackTraceInFastThrow
-XX:+RewriteBytecodes
-XX:+RewriteFrequentPairs
-XX:+UseFPUForSpilling
-XX:+UseVectorCmov
-XX:+UseXMMForArrayCopy
-XX:+EliminateLocks
-XX:+DoEscapeAnalysis
-XX:+AlignVector
-XX:+OptimizeFill
-XX:+EnableVectorSupport
-XX:+UseCharacterCompareIntrinsics
-XX:+UseCopySignIntrinsic
-XX:+UseVectorStubs
"
if [[ $(arch) == "x86_64" ]]; then
JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:+UseFastStosb
-XX:+UseNewLongLShift
-XX:+UseXmmI2D
-XX:+UseXmmI2F
-XX:+UseXmmLoadAndClearUpper
-XX:+UseXmmRegToRegMoveAll
-XX:UseAVX=2
-XX:UseSSE=4
"
else
log "cpu not x86_64, disabling architecture specific flags"
fi
fi
if isTrue "${USE_MEOWICE_GRAALVM_FLAGS}"; then
if [[ $java_major_version -gt 23 ]]; then
log "Java 24 or higher detected, using modified GraalVM flags"
JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:+UseFastJNIAccessors
-XX:+UseInlineCaches
-XX:+SegmentedCodeCache
-Djdk.nio.maxCachedBufferSize=262144
-Djdk.graal.UsePriorityInlining=true
-Djdk.graal.Vectorization=true
-Djdk.graal.OptDuplication=true
-Djdk.graal.DetectInvertedLoopsAsCounted=true
-Djdk.graal.LoopInversion=true
-Djdk.graal.VectorizeHashes=true
-Djdk.graal.EnterprisePartialUnroll=true
-Djdk.graal.VectorizeSIMD=true
-Djdk.graal.StripMineNonCountedLoops=true
-Djdk.graal.SpeculativeGuardMovement=true
-Djdk.graal.TuneInlinerExploration=1
-Djdk.graal.LoopRotation=true
-Djdk.graal.CompilerConfiguration=enterprise
--enable-native-access=ALL-UNNAMED
"
else
log "Using MeowIce's flags for Graalvm"
JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:+UseFastJNIAccessors
-XX:+UseInlineCaches
-XX:+SegmentedCodeCache
-Djdk.nio.maxCachedBufferSize=262144
-Dgraal.UsePriorityInlining=true
-Dgraal.Vectorization=true
-Dgraal.OptDuplication=true
-Dgraal.DetectInvertedLoopsAsCounted=true
-Dgraal.LoopInversion=true
-Dgraal.VectorizeHashes=true
-Dgraal.EnterprisePartialUnroll=true
-Dgraal.VectorizeSIMD=true
-Dgraal.StripMineNonCountedLoops=true
-Dgraal.SpeculativeGuardMovement=true
-Dgraal.TuneInlinerExploration=1
-Dgraal.LoopRotation=true
-Dgraal.OptWriteMotion=true
-Dgraal.CompilerConfiguration=enterprise
"
fi
fi
if isTrue "${USE_FLARE_FLAGS}"; then if isTrue "${USE_FLARE_FLAGS}"; then
JVM_XX_OPTS="${JVM_XX_OPTS} JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:+UnlockDiagnosticVMOptions -XX:+UnlockDiagnosticVMOptions
@@ -494,3 +360,4 @@ else
exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java "${finalArgs[@]}" exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java "${finalArgs[@]}"
fi fi
fi fi
+2 -13
View File
@@ -11,19 +11,8 @@ set -e -o pipefail
: "${PLUGINS_FILE:=}" : "${PLUGINS_FILE:=}"
: "${REMOVE_OLD_MODS_DEPTH:=1} " : "${REMOVE_OLD_MODS_DEPTH:=1} "
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}" : "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
sum_file=/data/.generic_pack.sum sum_file=/data/.generic_pack.sum
if [[ -n ${CF_API_KEY_FILE} ]]; then
if [[ -r "${CF_API_KEY_FILE}" ]]; then
CF_API_KEY="$(cat "${CF_API_KEY_FILE}")"
export CF_API_KEY
else
logError "CF_API_KEY_FILE is not readable: ${CF_API_KEY_FILE}"
exit 1
fi
fi
# shellcheck source=start-utils # shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils" . "${SCRIPTS:-/}start-utils"
isDebugging && set -x isDebugging && set -x
@@ -264,7 +253,7 @@ function handleModrinthProjects() {
if [[ $MODRINTH_PROJECTS ]]; then if [[ $MODRINTH_PROJECTS ]]; then
if isFamily HYBRID; then if isFamily HYBRID; then
loader=${HYBRIDTYPE} loader=forge
elif isFamily VANILLA; then elif isFamily VANILLA; then
loader=datapack loader=datapack
else else
@@ -297,7 +286,7 @@ function handleCurseForgeFiles() {
if isFamily HYBRID; then if isFamily HYBRID; then
# To disambiguate mc-mods we'll assume that hybrid servers # To disambiguate mc-mods we'll assume that hybrid servers
# are blending Forge (rather than Fabric or NeoForge) # are blending Forge (rather than Fabric or NeoForge)
args+=(--mod-loader "${HYBRIDTYPE}") args+=(--mod-loader "forge")
fi fi
;; ;;
esac esac
+1 -2
View File
@@ -1,2 +1 @@
data/ data/
cf_api_key.secret
@@ -1,18 +0,0 @@
services:
mc:
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
environment:
EULA: "true"
SETUP_ONLY: "TRUE"
MODPACK_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY_FILE: /run/secrets/cf_api_key
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/the-pixelmon-modpack/files/5954570
DEBUG: true
volumes:
- ./data:/data
secrets:
- cf_api_key
secrets:
cf_api_key:
file: cf_api_key.secret
@@ -1,2 +0,0 @@
[[ -n "$CF_API_KEY" ]] || exit 1
echo "$CF_API_KEY" > cf_api_key.secret || exit 1
@@ -1,2 +0,0 @@
mc-image-helper assert fileExists "/data/mods/ExplorersCompass-1.16.5-1.1.2-forge.jar"
mc-image-helper assert fileExists "/data/forge-1.16.5-36.2.34.jar"