mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Compare commits
104 Commits
2025.10.5
...
4e4d6959e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e4d6959e4 | ||
|
|
92f3200b4c | ||
|
|
02b8993561 | ||
|
|
4466c778db | ||
|
|
f5616795bd | ||
|
|
a00062ba64 | ||
|
|
d217e21903 | ||
|
|
dd5e2be036 | ||
|
|
b818a72e54 | ||
|
|
fe1cadcb0d | ||
|
|
ac125dc15e | ||
|
|
4c0fd104c6 | ||
|
|
cca86e6a3d | ||
|
|
67ec9e1b3c | ||
|
|
5847c54c8f | ||
|
|
796849f9d8 | ||
|
|
6e05807865 | ||
|
|
fbbe29507e | ||
|
|
2bcc7d81bf | ||
|
|
41e50d3e9f | ||
|
|
6bb401f9ff | ||
|
|
82266fff97 | ||
|
|
92b4babc86 | ||
|
|
83435738f4 | ||
|
|
a9dd219f78 | ||
|
|
90ac9589e3 | ||
|
|
9520b06095 | ||
|
|
1ae5e4d748 | ||
|
|
d43802ebd4 | ||
|
|
4677d9065d | ||
|
|
4f6de31e38 | ||
|
|
941e25c4b9 | ||
|
|
621c673acd | ||
|
|
fb1614b149 | ||
|
|
feec7fb6bd | ||
|
|
f27eb08440 | ||
|
|
183e0cd18f | ||
|
|
4b24251d70 | ||
|
|
7678f52939 | ||
|
|
c1d5241fb2 | ||
|
|
1565d08949 | ||
|
|
816ab736d9 | ||
|
|
32b343840f | ||
|
|
0a98bee40e | ||
|
|
93d94f5ba8 | ||
|
|
f3ed09882b | ||
|
|
7325baf750 | ||
|
|
c23654008b | ||
|
|
f8ff8a7b8a | ||
|
|
9c01462c0c | ||
|
|
21c5c980d5 | ||
|
|
4458908a44 | ||
|
|
c9094063d3 | ||
|
|
320ad0906f | ||
|
|
128bbff3d7 | ||
|
|
82aafd5f5e | ||
|
|
f746162360 | ||
|
|
0131f66e46 | ||
|
|
998a5b4180 | ||
|
|
c45d3e2fdd | ||
|
|
308a7766fa | ||
|
|
53591311ac | ||
|
|
377cd569bc | ||
|
|
cf6761156c | ||
|
|
5cbf1e0785 | ||
|
|
f1cacb7c36 | ||
|
|
ca67f24298 | ||
|
|
5698e784a1 | ||
|
|
a357c8a793 | ||
|
|
0843d19722 | ||
|
|
55bc4fd329 | ||
|
|
d7d3cc50a0 | ||
|
|
d1535c1eeb | ||
|
|
aadf1a8b9f | ||
|
|
cdbcf41bfc | ||
|
|
548bea7786 | ||
|
|
06836b941a | ||
|
|
53fcaabdf7 | ||
|
|
7922797744 | ||
|
|
afaa4c89a1 | ||
|
|
43a7e9a36c | ||
|
|
ac46484072 | ||
|
|
c26119b512 | ||
|
|
85673fb661 | ||
|
|
fae779998a | ||
|
|
a29bb020d9 | ||
|
|
0e3c655d27 | ||
|
|
2d1e96f5ba | ||
|
|
11daad5dd3 | ||
|
|
6cdc1a4b78 | ||
|
|
5983aea0b9 | ||
|
|
36d278677e | ||
|
|
d974c1ec52 | ||
|
|
c7eb26515c | ||
|
|
baf55337c5 | ||
|
|
3941bd4e41 | ||
|
|
eeb62d45f9 | ||
|
|
a8d8bfeef8 | ||
|
|
690745cb13 | ||
|
|
6d38d24f3c | ||
|
|
6a8bcffa17 | ||
|
|
3f910f6910 | ||
|
|
da72d66774 | ||
|
|
f62ad37d31 |
1
.github/release.yml
vendored
1
.github/release.yml
vendored
@@ -2,6 +2,7 @@ changelog:
|
||||
exclude:
|
||||
authors:
|
||||
- dependabot
|
||||
- renovate
|
||||
categories:
|
||||
- title: Enhancements
|
||||
labels:
|
||||
|
||||
15
.github/workflows/auto-release.yml
vendored
Normal file
15
.github/workflows/auto-release.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: Auto release
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 14 * * *"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
auto-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: zenengeo/github-auto-release-action@main
|
||||
with:
|
||||
stable-duration: 3d
|
||||
force-duration: 14d
|
||||
token: '${{ secrets.GH_TOKEN }}'
|
||||
|
||||
@@ -12,7 +12,12 @@ on:
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
- "docker-compose.yml"
|
||||
- "images.json"
|
||||
- "compose-docs.yml"
|
||||
- "zensical.toml"
|
||||
- ".readthedocs.yaml"
|
||||
- "renovate.json5"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -22,19 +27,14 @@ jobs:
|
||||
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
|
||||
variant:
|
||||
- java25
|
||||
- java25-graalvm
|
||||
- java25-jdk
|
||||
- java21
|
||||
- java21-alpine
|
||||
- java21-graalvm
|
||||
- java21-jdk
|
||||
- java17
|
||||
- java17-graalvm
|
||||
- java17-alpine
|
||||
- java16
|
||||
- java11
|
||||
- java8
|
||||
- java8-graalvm-ce
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
include:
|
||||
# JAVA 25
|
||||
@@ -42,15 +42,11 @@ jobs:
|
||||
baseImage: eclipse-temurin:25-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java25-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:25-ol8
|
||||
- variant: java25-jdk
|
||||
baseImage: eclipse-temurin:25
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
# JAVA 21:
|
||||
- variant: java21-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:21-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java21
|
||||
baseImage: eclipse-temurin:21-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
@@ -69,14 +65,6 @@ jobs:
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-graalvm
|
||||
baseImage: container-registry.oracle.com/graalvm/jdk:17-ol8
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.20.4
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.20.4
|
||||
# JAVA 16
|
||||
- variant: java16
|
||||
baseImage: adoptopenjdk:16-jre-hotspot
|
||||
@@ -93,40 +81,28 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8
|
||||
# mcHelperVersion: 1.46.0
|
||||
- variant: java8-graalvm-ce
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:java8
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8
|
||||
# mcHelperVersion: 1.46.0
|
||||
mcHelperVersion: 1.51.1
|
||||
- variant: java8-jdk
|
||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8
|
||||
# mcHelperVersion: 1.46.0
|
||||
- variant: java8-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-8u312-b07-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8
|
||||
# mcHelperVersion: 1.46.0
|
||||
mcHelperVersion: 1.51.1
|
||||
env:
|
||||
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
|
||||
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
|
||||
MAIN_VARIANT: java21
|
||||
MAIN_VARIANT: java25
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5.0.0
|
||||
uses: actions/checkout@v6.0.2
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5.8.0
|
||||
uses: docker/metadata-action@v5.10.0
|
||||
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.
|
||||
@@ -156,13 +132,13 @@ jobs:
|
||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.11.1
|
||||
uses: docker/setup-buildx-action@v3.12.0
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.6.0
|
||||
uses: docker/setup-qemu-action@v3.7.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
uses: docker/build-push-action@v6.19.2
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
@@ -182,18 +158,19 @@ jobs:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3.6.0
|
||||
uses: docker/login-action@v3.7.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.6.0
|
||||
uses: docker/login-action@v3.7.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -201,7 +178,7 @@ jobs:
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
uses: docker/build-push-action@v6.19.2
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
30
.github/workflows/verify-pr.yml
vendored
30
.github/workflows/verify-pr.yml
vendored
@@ -1,17 +1,20 @@
|
||||
name: Verify PR
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
types: [assigned, opened, synchronize, labeled]
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
- "docker-compose*.yml"
|
||||
- "mkdocs.yml"
|
||||
- "docker-compose.yml"
|
||||
- "images.json"
|
||||
- "compose-docs.yml"
|
||||
- "zensical.toml"
|
||||
- ".readthedocs.yaml"
|
||||
- "renovate.json5"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -19,14 +22,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- java21
|
||||
- java25
|
||||
- java21-alpine
|
||||
- java17
|
||||
- java8
|
||||
include:
|
||||
# JAVA 21:
|
||||
- variant: java21
|
||||
baseImage: eclipse-temurin:21-jre
|
||||
# JAVA 21/25:
|
||||
- variant: java25
|
||||
baseImage: eclipse-temurin:25-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: latest
|
||||
- variant: java21-alpine
|
||||
@@ -44,22 +47,22 @@ jobs:
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8
|
||||
# mcHelperVersion: 1.42.1
|
||||
mcHelperVersion: 1.51.1
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5.0.0
|
||||
uses: actions/checkout@v6.0.2
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.11.1
|
||||
uses: docker/setup-buildx-action@v3.12.0
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
uses: docker/build-push-action@v6.19.2
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
# ensure latest base image is used
|
||||
@@ -70,7 +73,7 @@ jobs:
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v6.18.0
|
||||
uses: docker/build-push-action@v6.19.2
|
||||
with:
|
||||
# Only build single platform since loading multi-arch image into daemon fails with
|
||||
# "docker exporter does not currently support exporting manifest lists"
|
||||
@@ -92,5 +95,6 @@ jobs:
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
DEBUG: ${{ runner.debug }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
*.iml
|
||||
/gh-md-toc
|
||||
personal-build-and-develop.*
|
||||
site/
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
|
||||
mkdocs:
|
||||
configuration: mkdocs.yml
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
version: 2
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
|
||||
build:
|
||||
os: ubuntu-24.04
|
||||
tools:
|
||||
python: latest
|
||||
jobs:
|
||||
# We recommend using a requirements file for reproducible builds.
|
||||
# This is just a quick example to get started.
|
||||
# https://docs.readthedocs.io/page/guides/reproducible-builds.html
|
||||
install:
|
||||
- pip install zensical
|
||||
build:
|
||||
html:
|
||||
- zensical build
|
||||
post_build:
|
||||
- mkdir -p $READTHEDOCS_OUTPUT/html/
|
||||
- cp --recursive site/* $READTHEDOCS_OUTPUT/html/
|
||||
|
||||
24
Dockerfile
24
Dockerfile
@@ -1,4 +1,4 @@
|
||||
ARG BASE_IMAGE=eclipse-temurin:21-jre
|
||||
ARG BASE_IMAGE=eclipse-temurin:25-jre
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
@@ -25,31 +25,37 @@ EXPOSE 25565
|
||||
ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/easy-add
|
||||
ARG EASY_ADD_VERSION=0.8.11
|
||||
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.10
|
||||
# renovate: datasource=github-releases packageName=itzg/restify
|
||||
ARG RESTIFY_VERSION=1.7.12
|
||||
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.7.1
|
||||
# renovate: datasource=github-releases packageName=itzg/rcon-cli
|
||||
ARG RCON_CLI_VERSION=1.7.3
|
||||
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.15.6
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
||||
ARG MC_MONITOR_VERSION=0.16.1
|
||||
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.13.4
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.14.1
|
||||
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.50.2
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
||||
ARG MC_HELPER_VERSION=1.54.1
|
||||
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
|
||||
@@ -89,4 +95,8 @@ HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
|
||||
ARG BUILDTIME=local
|
||||
ARG VERSION=local
|
||||
ARG REVISION=local
|
||||
RUN echo "buildtime=${BUILDTIME}\nversion=${VERSION}\nrevision=${REVISION}" > /etc/image.properties
|
||||
COPY <<EOF /etc/image.properties
|
||||
buildtime=${BUILDTIME}
|
||||
version=${VERSION}
|
||||
revision=${REVISION}
|
||||
EOF
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
[](https://hub.docker.com/r/itzg/minecraft-server/)
|
||||
[](https://github.com/itzg/docker-minecraft-server/issues)
|
||||
[](https://discord.gg/DXfKpjB)
|
||||
[](https://github.com/itzg/docker-minecraft-server/actions/workflows/build-multiarch.yml)
|
||||
[](https://github.com/itzg/docker-minecraft-server/actions/workflows/build.yml)
|
||||
[](https://www.buymeacoffee.com/itzg)
|
||||
[](https://docker-minecraft-server.readthedocs.io/en/latest/?badge=latest)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ dnf config-manager --set-enabled ol${os_major_version}_codeready_builder
|
||||
tee /etc/yum.repos.d/ol${os_major_version}-epel.repo <<EOF
|
||||
[ol${os_major_version}_developer_EPEL]
|
||||
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/OL${os_major_version}$([ "$os_major_version" -ge 10 ] && echo '/0' || echo '')/developer/EPEL/\$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
@@ -26,6 +26,7 @@ dnf update -y
|
||||
|
||||
# Install necessary packages
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2046
|
||||
dnf install -y \
|
||||
ImageMagick \
|
||||
file \
|
||||
@@ -36,34 +37,43 @@ dnf install -y \
|
||||
git \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql \
|
||||
$([ "$os_major_version" -ge 10 ] && echo 'mysql8.4' || echo 'mysql') \
|
||||
procps-ng \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
unzip \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
$([ "$os_major_version" -ge 10 ] && echo 'bzip2' || echo 'lbzip2') \
|
||||
libpcap \
|
||||
libwebp \
|
||||
findutils \
|
||||
which \
|
||||
glibc-langpack-en \
|
||||
$([ "$os_major_version" -ge 10 ] && echo 'git-lfs' || echo '') \
|
||||
$([ "$os_major_version" -ge 10 ] && echo 'openssl' || echo '') \
|
||||
${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
|
||||
# Install Git LFS through third party repository for older OL releases
|
||||
if [ "$os_major_version" -lt 10 ]; then
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
|
||||
dnf update -y
|
||||
dnf install -y git-lfs
|
||||
fi
|
||||
|
||||
# Clean up DNF when done
|
||||
dnf clean all
|
||||
|
||||
# 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
|
||||
cat <<EOF > /usr/local/sbin/knockd
|
||||
#!/bin/sh
|
||||
|
||||
echo "Auto-pause (using knockd) is currently unavailable on graalvm image variants"
|
||||
echo "Consider using a different image variant https://docker-minecraft-server.readthedocs.io/en/latest/versions/java/"
|
||||
echo "or mc-router's auto scale up/down feature https://github.com/itzg/mc-router#docker-auto-scale-updown"
|
||||
exit 2
|
||||
EOF
|
||||
chmod 755 /usr/local/sbin/knockd
|
||||
# TODO restore retrieval from https://github.com/Metalcape/knock when tar's "Cannot open: Invalid argument" is solved
|
||||
|
||||
# Set git credentials globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
|
||||
15
compose-dev.yml
Normal file
15
compose-dev.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
mc-dev:
|
||||
build:
|
||||
context: .
|
||||
environment:
|
||||
EULA: true
|
||||
volumes:
|
||||
- ./scripts:/image/scripts:ro
|
||||
- data:/data
|
||||
ports:
|
||||
- "25565:25565"
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
data:
|
||||
16
compose-docs.yml
Normal file
16
compose-docs.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
# This composition can be used to serve up the rendered mkdocs for local authoring.
|
||||
#
|
||||
# docker compose -f compose-docs.yml -p zensical up
|
||||
#
|
||||
# and then access http://localhost:8000
|
||||
|
||||
services:
|
||||
zensical:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docs/Dockerfile
|
||||
volumes:
|
||||
- ./zensical.toml:/docs/zensical.toml
|
||||
- ./docs:/docs/docs
|
||||
ports:
|
||||
- "8000:8000"
|
||||
@@ -1,19 +0,0 @@
|
||||
# This composition can be used to serve up the rendered mkdocs for local authoring.
|
||||
#
|
||||
# docker compose -f docker-compose-mkdocs.yml -p mkdocs up
|
||||
#
|
||||
# and then access http://localhost:8000
|
||||
|
||||
services:
|
||||
mkdocs:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docs/Dockerfile
|
||||
volumes:
|
||||
- ./mkdocs.yml:/mkdocs/mkdocs.yml
|
||||
- ./docs:/mkdocs/docs
|
||||
command:
|
||||
- serve
|
||||
- --dev-addr=0.0.0.0:8000
|
||||
ports:
|
||||
- "8000:8000"
|
||||
@@ -1,10 +1,4 @@
|
||||
FROM python:3.11
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
WORKDIR /mkdocs
|
||||
FROM zensical/zensical
|
||||
|
||||
RUN --mount=target=/build/requirements.txt,source=docs/requirements.txt \
|
||||
pip install -r /build/requirements.txt
|
||||
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
@@ -19,7 +19,7 @@ If you want to use a file's content for value, such as when using secrets mounte
|
||||
|
||||
For example, a `my.cnf` file could contain:
|
||||
|
||||
```
|
||||
```toml
|
||||
[client]
|
||||
password = ${CFG_DB_PASSWORD}
|
||||
```
|
||||
@@ -50,8 +50,7 @@ REPLACE_ENV_VARIABLES_EXCLUDE_PATHS="/data/plugins/Essentials/userdata /data/plu
|
||||
|
||||
Here is a full example where we want to replace values inside a `database.yml`.
|
||||
|
||||
```yml
|
||||
|
||||
```yaml
|
||||
---
|
||||
database:
|
||||
host: ${CFG_DB_HOST}
|
||||
@@ -59,10 +58,10 @@ database:
|
||||
password: ${CFG_DB_PASSWORD}
|
||||
```
|
||||
|
||||
This is how your `docker-compose.yml` file could look like:
|
||||
This is how your `compose.yaml` file could look like:
|
||||
|
||||
```yml
|
||||
# Other docker-compose examples in /examples
|
||||
```yaml title="compose.yaml"
|
||||
# Other docker compose examples in /examples
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
|
||||
@@ -10,6 +10,12 @@ By default, the image declares an initial and maximum Java memory-heap limit of
|
||||
|
||||
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
|
||||
|
||||
To have control over heap size, without relying on absolute memory sizes percentages are also supported using `<size>%`.
|
||||
|
||||
!!! info "RAMPercentage parameters"
|
||||
Percentage based heap sizing is enabled using `-XX:InitialRAMPercentage` for `INIT_MEMORY` and `-XX:MaxRAMPercentage` for `MAX_MEMORY`.
|
||||
For details on the function of these parameters look [here](https://www.baeldung.com/java-jvm-parameters-rampercentage).
|
||||
|
||||
!!! example "Using docker run"
|
||||
|
||||
```
|
||||
@@ -37,19 +43,7 @@ The values of all three are passed directly to the JVM and support format/units
|
||||
MAX_MEMORY: 4G
|
||||
```
|
||||
|
||||
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 4GB of memory:
|
||||
|
||||
!!! example "MaxRAMPercentage using compose file"
|
||||
|
||||
```
|
||||
environment:
|
||||
MEMORY: ""
|
||||
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 4G
|
||||
```
|
||||
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit.
|
||||
|
||||
!!! important
|
||||
The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
|
||||
@@ -57,10 +51,10 @@ To let the JVM calculate the heap size from the container declared memory limit,
|
||||
## Extra JVM Options
|
||||
|
||||
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
||||
environment variable. The JVM requires `-XX` options to precede `-X` options, so those can be declared in `JVM_XX_OPTS`. Both variables are space-delimited, raw JVM arguments.
|
||||
environment variable. If needing to set `-XX` options, then pass those with the `JVM_XX_OPTS` variable instead. Both variables accept space-delimited, raw JVM arguments.
|
||||
|
||||
```
|
||||
docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
|
||||
docker run ... -e JVM_OPTS="-XsomeJVMOption -DpropName=value" ...
|
||||
```
|
||||
|
||||
**NOTE** When declaring `JVM_OPTS` in a compose file's `environment` section with list syntax, **do not** include the quotes:
|
||||
@@ -68,7 +62,7 @@ docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
|
||||
```yaml
|
||||
environment:
|
||||
- EULA=true
|
||||
- JVM_OPTS=-someJVMOption someJVMOptionValue
|
||||
- JVM_OPTS=-XsomeJVMOption -DpropName=value
|
||||
```
|
||||
|
||||
Using object syntax is recommended and more intuitive:
|
||||
@@ -76,9 +70,9 @@ Using object syntax is recommended and more intuitive:
|
||||
```yaml
|
||||
environment:
|
||||
EULA: "true"
|
||||
JVM_OPTS: "-someJVMOption someJVMOptionValue"
|
||||
# or
|
||||
# JVM_OPTS: -someJVMOption someJVMOptionValue
|
||||
JVM_OPTS: "-XsomeJVMOption -DpropName=value"
|
||||
# or without quotes
|
||||
# JVM_OPTS: -XsomeJVMOption -DpropName=value
|
||||
```
|
||||
|
||||
As a shorthand for passing several system properties as `-D` arguments, you can instead pass a comma separated list of `name=value` or `name:value` pairs with `JVM_DD_OPTS`. (The colon syntax is provided for management platforms like Plesk that don't allow `=` inside a value.)
|
||||
|
||||
@@ -13,10 +13,11 @@ For VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, CURSEFORGE, SPONGEVANILLA server type
|
||||
`$FORCE_REDOWNLOAD` to some value (e.g. 'true) to force a re-download of the server file for
|
||||
the particular server type. by adding a `-e FORCE_REDOWNLOAD=true` to your command-line.
|
||||
|
||||
For example, with PaperSpigot, it would look something like this:
|
||||
For example, with Paper, it would look something like this:
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
docker run -d --pull=always \
|
||||
-v /path/on/host:/data \
|
||||
-e TYPE=PAPER -e FORCE_REDOWNLOAD=true \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
@@ -47,7 +48,7 @@ To allow time for players to finish what they're doing during a graceful server
|
||||
|
||||
The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed.
|
||||
|
||||
The grace period can be increased using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
|
||||
The grace period can be increased using [the -t option on `docker compose down`](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
|
||||
|
||||
The `STOP_SERVER_ANNOUNCE_DELAY` can be bypassed by sending a `SIGUSR1` signal to the `mc-server-runner` process.
|
||||
|
||||
@@ -76,15 +77,74 @@ The openj9 image tags include specific variables to simplify configuration:
|
||||
- `-e TUNE_NURSERY_SIZES=TRUE` : configures nursery sizes where the initial size is 50%
|
||||
of the `MAX_MEMORY` and the max size is 80%.
|
||||
|
||||
## Enabling rolling logs
|
||||
## Customize Minecraft server logging
|
||||
|
||||
By default the vanilla log file will grow without limit. The logger can be reconfigured to use a rolling log files strategy by using:
|
||||
The image can use a templated log4j2 configuration based on PaperMC's logging setup, which is automatically applied for versions that don't require Log4j security patches. This configuration provides rolling logs and advanced logging features by default.
|
||||
|
||||
```
|
||||
-e ENABLE_ROLLING_LOGS=true
|
||||
Set the environment variable `GENERATE_LOG4J2_CONFIG` to "true" to enable the following features.
|
||||
|
||||
!!! note
|
||||
|
||||
This configures the server logging only. To diagnose container startup, set the `DEBUG` environment variable to "true".
|
||||
|
||||
### Customization via environment variables
|
||||
|
||||
You can customize various aspects of the logging behavior using environment variables:
|
||||
|
||||
- `LOG_LEVEL` : Root logger level (default: `info`)
|
||||
```
|
||||
-e LOG_LEVEL=debug
|
||||
```
|
||||
|
||||
- `ROLLING_LOG_FILE_PATTERN` : Pattern for rolled log file names (default: `logs/%d{yyyy-MM-dd}-%i.log.gz`)
|
||||
```
|
||||
-e ROLLING_LOG_FILE_PATTERN="logs/archive/%d{yyyy-MM-dd}-%i.log.gz"
|
||||
```
|
||||
|
||||
- `ROLLING_LOG_MAX_FILES` : Maximum number of archived log files to keep (default: `1000`)
|
||||
```
|
||||
-e ROLLING_LOG_MAX_FILES=30
|
||||
```
|
||||
|
||||
### Customizing log message formats
|
||||
|
||||
For full control over how log messages are formatted, you can customize the Log4j2 pattern layouts using these variables. These use [Log4j2 Pattern Layout syntax](https://logging.apache.org/log4j/2.x/manual/layouts.html#PatternLayout):
|
||||
|
||||
- `LOG_CONSOLE_FORMAT` : Format for console output (what you see in `docker logs`)
|
||||
Default: `[%d{HH:mm:ss}] [%t/%level]: %msg%n`
|
||||
|
||||
- `LOG_FILE_FORMAT` : Format for file logs (written to `logs/latest.log`)
|
||||
Default: `[%d{HH:mm:ss}] [%t/%level]: %msg%n`
|
||||
|
||||
- `LOG_TERMINAL_FORMAT` : Format for interactive terminal console (used with `docker attach`)
|
||||
Default: `[%d{HH:mm:ss} %level]: %msg%n`
|
||||
|
||||
### Example configurations
|
||||
|
||||
Simple timestamp customization (most common use case):
|
||||
```yaml
|
||||
environment:
|
||||
# What you see in docker logs
|
||||
LOG_CONSOLE_FORMAT: "[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%t/%level]: %msg%n"
|
||||
# What gets written to logs/latest.log
|
||||
LOG_FILE_FORMAT: "[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%t/%level]: %msg%n"
|
||||
```
|
||||
|
||||
> **NOTE** this will interfere with interactive/color consoles [as described in the section above](#interactive-and-color-console)
|
||||
Advanced customization:
|
||||
```yaml
|
||||
environment:
|
||||
LOG_LEVEL: debug
|
||||
# Custom ISO8601 format with logger names
|
||||
LOG_CONSOLE_FORMAT: "%d{ISO8601} %-5level [%t] %logger{36} - %msg%n"
|
||||
LOG_FILE_FORMAT: "%d{ISO8601} %-5level [%t] %logger{36} - %msg%n"
|
||||
ROLLING_LOG_MAX_FILES: 50
|
||||
```
|
||||
|
||||
### Legacy ENABLE_ROLLING_LOGS option
|
||||
|
||||
The `ENABLE_ROLLING_LOGS` environment variable is no longer needed for most use cases, as rolling logs are now enabled by default through the templated configuration. This option is maintained for backward compatibility but is only checked for error reporting when rolling logs cannot be used due to Log4j security patches.
|
||||
|
||||
> **NOTE** The templated log4j2 configuration may interfere with interactive/color consoles [as described in the section above](#interactive-and-color-console)
|
||||
|
||||
## Timezone Configuration
|
||||
|
||||
@@ -94,7 +154,7 @@ You can configure the timezone to match yours by setting the `TZ` environment va
|
||||
|
||||
such as:
|
||||
|
||||
docker run -d -it -e TZ=Europe/London -p 25565:25565 --name mc itzg/minecraft-server
|
||||
docker run -d -it --pull=always -e TZ=Europe/London -p 25565:25565 --name mc itzg/minecraft-server
|
||||
|
||||
Or mounting `/etc/timezone` as readonly (not supported on Windows):
|
||||
|
||||
@@ -102,7 +162,7 @@ Or mounting `/etc/timezone` as readonly (not supported on Windows):
|
||||
|
||||
such as:
|
||||
|
||||
docker run -d -it -v /etc/timezone:/etc/timezone:ro -p 25565:25565 --name mc itzg/minecraft-server
|
||||
docker run -d -it --pull=always -v /etc/timezone:/etc/timezone:ro -p 25565:25565 --name mc itzg/minecraft-server
|
||||
|
||||
## HTTP Proxy
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
In order to unify management of the Minecraft server container, all of the [`server.properties`](https://minecraft.wiki/w/Server.properties) entries can be managed by the environment variables described in the sections below. Some of the mappings provide additional functionality above and beyond the properties file.
|
||||
To unify management of the Minecraft server container, all known [`server.properties`](https://minecraft.wiki/w/Server.properties) entries can be managed by the environment variables described in the sections below. Some mappings provide additional functionality above and beyond the properties file and will be described in the sections below.
|
||||
|
||||
!!! warning "Version compatibility"
|
||||
|
||||
Not all server properties are supported by all versions of Minecraft. Since this image supports a wide range of versions, please consult the [server properties documentation](https://minecraft.wiki/w/Server.properties) for the version you are using.
|
||||
|
||||
If you prefer to manually manage the `server.properties` file, set `OVERRIDE_SERVER_PROPERTIES` to "false". Similarly, you can entirely skip the startup script's creation of `server.properties` by setting `SKIP_SERVER_PROPERTIES` to "true".
|
||||
|
||||
@@ -238,15 +242,46 @@ By default an existing `server-icon.png` file will not be replaced, that can be
|
||||
|
||||
### RCON
|
||||
|
||||
RCON is **enabled by default** to allow for graceful shut down the server and coordination of save state during backups. RCON can be disabled by setting `ENABLE_RCON` to "false".
|
||||
RCON is **enabled by default** to allow for graceful shut down of the server and coordination of save state during backups. RCON can be disabled by setting `ENABLE_RCON` to "false".
|
||||
|
||||
!!! warning
|
||||
|
||||
Disabling RCON will remove and limit some features, such as interactive and color console support.
|
||||
|
||||
The default password is randomly generated on each startup; however, a specific one can be set with `RCON_PASSWORD`.
|
||||
#### RCON Password
|
||||
|
||||
**DO NOT MAP THE RCON PORT EXTERNALLY** unless you are aware of all the consequences and have set a **secure password** with `RCON_PASSWORD`.
|
||||
The default password is randomly generated on each startup. However, you can specify a password using one of the following environment variables:
|
||||
|
||||
* Set `RCON_PASSWORD` to your desired password.
|
||||
* Set `RCON_PASSWORD_FILE` to the path of a file containing the password.
|
||||
|
||||
Using `RCON_PASSWORD_FILE` is the recommended method for managing sensitive data, as it allows full support for [Docker Secrets](https://docs.docker.com/compose/how-tos/use-secrets/).
|
||||
|
||||
??? example
|
||||
```yaml title="compose.yaml"
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:latest
|
||||
pull_policy: daily
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
RCON_PASSWORD_FILE: /run/secrets/rcon_pass # Points to the path where the secret is mounted
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
secrets:
|
||||
- rcon_pass
|
||||
|
||||
secrets:
|
||||
rcon_pass:
|
||||
file: ./rcon_password # local file containing the password
|
||||
```
|
||||
!!! warning
|
||||
**BE CAUTIOUS OF MAPPING THE RCON PORT EXTERNALLY** unless you are aware of all the consequences and have set a **secure password**.
|
||||
|
||||
!!! info
|
||||
|
||||
@@ -396,11 +431,16 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
|
||||
### Other server property mappings
|
||||
|
||||
!!! warning "Version compatibility"
|
||||
|
||||
Not all server properties are supported by all versions of Minecraft. Since this image supports a wide range of versions, please consult the [server properties documentation](https://minecraft.wiki/w/Server.properties) for the version you are using.
|
||||
|
||||
| Environment Variable | Server Property |
|
||||
|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ACCEPTS_TRANSFERS | [accepts-transfers](https://minecraft.wiki/w/Server.properties#accepts-transfers) |
|
||||
| ALLOW_FLIGHT | [allow-flight](https://minecraft.wiki/w/Server.properties#allow-flight) |
|
||||
| ALLOW_NETHER | [allow-nether](https://minecraft.wiki/w/Server.properties#allow-nether) |
|
||||
| ANNOUNCE_PLAYER_ACHIEVEMENTS | [announce-player-achievements](https://minecraft.wiki/w/Server.properties#announce-player-achievements) |
|
||||
| BROADCAST_CONSOLE_TO_OPS | [broadcast-console-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-console-to-ops) |
|
||||
| BROADCAST_RCON_TO_OPS | [broadcast-rcon-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-rcon-to-ops) |
|
||||
| BUG_REPORT_LINK | [bug-report-link](https://minecraft.wiki/w/Server.properties#bug-report-link) |
|
||||
@@ -411,6 +451,7 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| FORCE_GAMEMODE | [force-gamemode](https://minecraft.wiki/w/Server.properties#force-gamemode) |
|
||||
| FUNCTION_PERMISSION_LEVEL | [function-permission-level](https://minecraft.wiki/w/Server.properties#function-permission-level) |
|
||||
| GENERATE_STRUCTURES | [generate-structures](https://minecraft.wiki/w/Server.properties#generate-structures) |
|
||||
| GENERATOR_SETTINGS | [generator-settings](https://minecraft.wiki/w/Server.properties#generator-settings) |
|
||||
| HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
|
||||
| HIDE_ONLINE_PLAYERS | [hide-online-players](https://minecraft.wiki/w/Server.properties#hide-online-players) |
|
||||
| LOG_IPS | [log-ips](https://minecraft.wiki/w/Server.properties#log-ips) |
|
||||
@@ -422,6 +463,12 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| MANAGEMENT_SERVER_TLS_ENABLED | [management-server-tls-enabled](https://minecraft.wiki/w/Server.properties#management-server-tls-enabled) |
|
||||
| MANAGEMENT_SERVER_TLS_KEYSTORE | [management-server-tls-keystore](https://minecraft.wiki/w/Server.properties#management-server-tls-keystore) |
|
||||
| MANAGEMENT_SERVER_TLS_KEYSTORE_PASSWORD | [management-server-tls-keystore-password](https://minecraft.wiki/w/Server.properties#management-server-tls-keystore-password) |
|
||||
| MAX_BUILD_HEIGHT | [max-build-height](https://minecraft.wiki/w/Server.properties#max-build-height) |
|
||||
| MAX_COMMAND_CHAIN_LENGTH | [max-command-chain-length](https://minecraft.wiki/w/Server.properties#max-command-chain-length) |
|
||||
| MAX_ENTITY_CRAMMING | [max-entity-cramming](https://minecraft.wiki/w/Server.properties#max-entity-cramming) |
|
||||
| MAX_ENTITY_COLLISION_RADIUS | [max-entity-collision-radius](https://minecraft.wiki/w/Server.properties#max-entity-collision-radius) |
|
||||
| MAX_FUNCTION_CHAIN_DEPTH | [max-function-chain-depth](https://minecraft.wiki/w/Server.properties#max-function-chain-depth) |
|
||||
| MAX_NEIGHBORS | [max-neighbors](https://minecraft.wiki/w/Server.properties#max-neighbors) |
|
||||
| MAX_CHAINED_NEIGHBOR_UPDATES | [max-chained-neighbor-updates](https://minecraft.wiki/w/Server.properties#max-chained-neighbor-updates) |
|
||||
| MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) |
|
||||
| MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
|
||||
@@ -439,9 +486,12 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| RESOURCE_PACK_PROMPT | [resource-pack-prompt](https://minecraft.wiki/w/Server.properties#resource-pack-prompt) |
|
||||
| SERVER_NAME | [server-name](https://minecraft.wiki/w/Server.properties#server-name) |
|
||||
| SIMULATION_DISTANCE | [simulation-distance](https://minecraft.wiki/w/Server.properties#simulation-distance) |
|
||||
| SNOOPER_ENABLED | [snooper-enabled](https://minecraft.wiki/w/Server.properties#snooper-enabled) |
|
||||
| SPAWN_ANIMALS | [spawn-animals](https://minecraft.wiki/w/Server.properties#spawn-animals) |
|
||||
| SPAWN_MONSTERS | [spawn-monsters](https://minecraft.wiki/w/Server.properties#spawn-monsters) |
|
||||
| SPAWN_NPCS | [spawn-npcs](https://minecraft.wiki/w/Server.properties#spawn-npcs) |
|
||||
| SPAWN_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) |
|
||||
| STATUS_HEARTBEAT_INTERVAL | [status-heartbeat-interval](https://minecraft.wiki/w/Server.properties#status-heartbeat-interval) |
|
||||
| SYNC_CHUNK_WRITES | [sync-chunk-writes](https://minecraft.wiki/w/Server.properties#sync-chunk-writes) |
|
||||
| USE_NATIVE_TRANSPORT | [use-native-transport](https://minecraft.wiki/w/Server.properties#use-native-transport) |
|
||||
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |
|
||||
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |
|
||||
|
||||
@@ -28,13 +28,14 @@ When attached in this way you can stop the server, edit the configuration under
|
||||
|
||||
There might be a safer/better way to accommodate these systems. Please post an issue or PR if you have more information.
|
||||
|
||||
With Docker Compose, setting up a host attached directory is even easier since relative paths can be configured. For example, with the following `docker-compose.yml` Docker will automatically create/attach the relative directory `minecraft-data` to the container.
|
||||
With Docker Compose, setting up a host attached directory is even easier since relative paths can be configured. For example, with the following `compose.yaml` Docker will automatically create/attach the relative directory `minecraft-data` to the container.
|
||||
|
||||
``` yaml title="docker-compose.yml"
|
||||
```yaml title="compose.yaml"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:latest
|
||||
pull_policy: daily
|
||||
ports:
|
||||
- 25565:25565
|
||||
environment:
|
||||
|
||||
@@ -15,7 +15,28 @@ To simply use the latest stable version, run
|
||||
|
||||
docker run -d -it -p 25565:25565 -e EULA=TRUE itzg/minecraft-server
|
||||
|
||||
where, in this case, the standard server port 25565, will be exposed on your host machine.
|
||||
where, in this case, the standard server port 25565 will be exposed on your host machine.
|
||||
|
||||
!!! important "Persistent Data"
|
||||
|
||||
The Minecraft server will store its data in the container's `/data` directory. This directory can be [mounted](https://docs.docker.com/storage/volumes/) from the host machine or a managed volume.
|
||||
|
||||
Using `docker run` add a `-v` option somewhere before the image name:
|
||||
|
||||
```
|
||||
... -v /path/on/host:/data itzg/minecraft-server
|
||||
```
|
||||
|
||||
Using docker compose, add a `volumes` section to the service definition:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
# ... image and environment section
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:data
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
@@ -25,24 +46,21 @@ where, in this case, the standard server port 25565, will be exposed on your hos
|
||||
|
||||
Be sure to always include `-e EULA=TRUE` in your commands and container definitions, as Mojang/Microsoft requires EULA acceptance.
|
||||
|
||||
!!! warning
|
||||
|
||||
**DO NOT** port forward RCON on 25575 without first setting `RCON_PASSWORD` to a secure value. It is highly recommended to only use RCON within the container, such as with `rcon-cli`.
|
||||
|
||||
By default, the container will download the latest version of the "vanilla" [Minecraft: Java Edition server](https://www.minecraft.net/en-us/download/server) provided by Mojang. The [`VERSION`](versions/minecraft.md) and the [`TYPE`](types-and-platforms/index.md) can be configured to create many variations of desired Minecraft server.
|
||||
|
||||
## Using [Docker Compose](https://docs.docker.com/compose/)
|
||||
|
||||
1. Create a new directory
|
||||
2. Put the contents of the file below in a file called `docker-compose.yml`
|
||||
2. Put the contents of the file below in a file called `compose.yaml`
|
||||
3. Run `docker compose up -d` in that directory
|
||||
4. Done! Point your client at your host's name/IP address and port 25565.
|
||||
|
||||
```yaml
|
||||
```yaml title="compose.yaml"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:latest
|
||||
pull_policy: daily
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
@@ -59,10 +77,11 @@ To apply changes made to the compose file, just run `docker compose up -d` again
|
||||
Follow the logs of the container using `docker compose logs -f`, check on the status with `docker compose ps`, and stop the container using `docker compose stop`.
|
||||
|
||||
!!! note "Configurator Tool"
|
||||
If you prefer to use an interactive tool to create or edit a Docker Compose file for this image, you can check out [setupmc.com's configurator](https://setupmc.com/java-server/). It provides a form that supports most of the image variables and generates the `compose.yml` file in real time.
|
||||
If you prefer to use an interactive tool to create or edit a Docker Compose file for this image, you can check out [setupmc.com's configurator](https://setupmc.com/java-server/). It provides a form that supports most of the image variables and generates the `compose.yaml` file in real time.
|
||||
|
||||
!!! note "More Compose Examples"
|
||||
There are more [examples located in the Github repo](https://github.com/itzg/docker-minecraft-server/tree/master/examples).
|
||||
|
||||
!!! note "Deployment Examples"
|
||||
The [deployments page](misc/deployment/index.md) provides more examples of deployment with and beyond Docker Compose.
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ A `.skip-pause` file can be created in the `/data` directory to make the server
|
||||
|
||||
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.
|
||||
|
||||
!!! note
|
||||
|
||||
When configuring kubernetes readiness/liveness health checks with auto-pause enabled, be sure to reference the `mc-health` wrapper script rather than `mc-status` directly.
|
||||
|
||||
39
docs/misc/autoscale/autoscale.md
Normal file
39
docs/misc/autoscale/autoscale.md
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
# Autoscaling (sleep when idle)
|
||||
|
||||
Autoscaling (sometimes called *sleeping*, *scale to zero* or *wake on join*) is the pattern of stopping a Minecraft server when nobody is playing and starting it again when someone tries to connect with the intention of saving resources when the server is not in use (e.g., on a VPS with limited CPU/RAM or a home server).
|
||||
|
||||
## mc-router
|
||||
|
||||
[mc-router](https://github.com/itzg/mc-router) is a Minecraft-aware router/multiplexer.
|
||||
|
||||
- Routes players by the hostname they connect with (useful for multiple servers behind one port)
|
||||
- Can auto-start a backend container on join and stop it again after an idle timeout
|
||||
|
||||
Examples:
|
||||
|
||||
- See the mc-router section in [Examples](../examples.md#mc-router-with-auto-scale)
|
||||
|
||||
## Lazymc
|
||||
|
||||
[Lazymc](https://github.com/timvisee/lazymc) can keep a server “asleep” until a player connects. With Docker it’s commonly used via [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy).
|
||||
|
||||
- Players connect to the proxy; the proxy starts/stops the server container
|
||||
- Usually requires a static IP for the Minecraft container on a user-defined network
|
||||
|
||||
Example:
|
||||
|
||||
- See the Lazymc section in [Examples](../examples.md#lazymc-put-your-minecraft-server-to-rest-when-idle)
|
||||
|
||||
## Lazytainer
|
||||
|
||||
[Lazytainer](https://github.com/vmorganp/Lazytainer) starts/stops containers based on network traffic.
|
||||
|
||||
- Uses packet thresholds + inactivity timeouts (not Minecraft hostname aware)
|
||||
- Can be triggered by port scans/pings in noisy environments
|
||||
|
||||
Example:
|
||||
|
||||
- See the Lazytainer section in [Examples](../examples.md#lazytainer-stop-minecraft-container-based-on-traffic)
|
||||
|
||||
|
||||
@@ -11,61 +11,15 @@ Adding a new server `TYPE` can vary due to the complexity of obtaining and confi
|
||||
|
||||
## Iterative script development
|
||||
|
||||
Individual scripts can be iteratively developed, debugged, and tested using the following procedure.
|
||||
|
||||
First, build a baseline of the image to include the packages needed by existing or new scripts:
|
||||
|
||||
PowerShell: (Example of building and testing ForgeAPI)
|
||||
```powershell
|
||||
$env:FOLDER_TO_TEST="forgeapimods_projectids"
|
||||
$env:IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $env:IMAGE_TO_TEST .
|
||||
pushd "tests/setuponlytests/$env:FOLDER_TO_TEST/"
|
||||
docker-compose run mc
|
||||
docker-compose down -v --remove-orphans
|
||||
popd
|
||||
```
|
||||
|
||||
PowerShell: Building different images of Java for testing
|
||||
```powershell
|
||||
$env:BASE_IMAGE='eclipse-temurin:8u312-b07-jre'
|
||||
$env:IMAGE_TO_TEST="mc-dev"
|
||||
docker build --build-arg BASE_IMAGE=$env:BASE_IMAGE -t $env:IMAGE_TO_TEST .
|
||||
```
|
||||
|
||||
Bash: (Example of building and testing ForgeAPI)
|
||||
```bash
|
||||
export FOLDER_TO_TEST="forgeapimods_file"
|
||||
export IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $IMAGE_TO_TEST .
|
||||
pushd tests/setuponlytests/$FOLDER_TO_TEST/
|
||||
docker-compose run mc
|
||||
docker-compose down -v --remove-orphans
|
||||
popd
|
||||
```
|
||||
|
||||
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
|
||||
The included `compose-dev.yml` will mount the local `scripts` code into the container and allow for iterative development. Replace `[-e key=value]` with any environment variables you wish to set for testing the modified scripts.
|
||||
|
||||
```shell
|
||||
docker run -it --rm -v ${PWD}:/image/scripts --entrypoint bash mc-dev
|
||||
docker compose -f compose-dev.yml run --rm -it [-e key=value] mc-dev
|
||||
```
|
||||
|
||||
From within the container you can run individual scripts via the attached `/image/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
|
||||
!!! tip
|
||||
|
||||
```shell
|
||||
export VERSION=1.12.2
|
||||
/image/scripts/start-deployFabric
|
||||
```
|
||||
|
||||
...or pre-pending script execution:
|
||||
|
||||
```shell
|
||||
VERSION=1.12.2 /image/scripts/start-deployFabric
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
|
||||
To speed up the development cycle, it is recommended to set `SETUP_ONLY` to `true` as part of the run command above.
|
||||
|
||||
## Using development copy of tools
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Site documentation
|
||||
|
||||
The documentation for this image/repository is written in markdown and built by [MkDocs](https://www.mkdocs.org/) into a documentation website hosted at [Read the Docs](https://readthedocs.org/). [Here is general information about writing MkDocs markdown](https://www.mkdocs.org/user-guide/writing-your-docs/) and [specifics for the Material theme used](https://squidfunk.github.io/mkdocs-material/reference/).
|
||||
The documentation for this image/repository is written in markdown and built using [Zensical](https://zensical.org/) into a documentation website hosted at [Read the Docs](https://readthedocs.org/). [Here is general information about writing Zensical markdown](https://zensical.org/docs/authoring/markdown/).
|
||||
|
||||
!!! note
|
||||
The README.md rarely needs to be modified and only serves as a brief introduction to the project.
|
||||
@@ -10,7 +10,7 @@ The documentation source is maintained in the [docs](https://github.com/itzg/doc
|
||||
It will be very helpful to view the rendered documentation as you're editing. To do that run the following from the top-level directory:
|
||||
|
||||
```shell
|
||||
docker compose -f docker-compose-mkdocs.yml -p mkdocs up
|
||||
docker compose -f compose-docs.yml -p zensical up
|
||||
```
|
||||
|
||||
You can access the live documentation rendering at <http://localhost:8000>.
|
||||
You can access the live documentation rendering at <http://localhost:8000>.
|
||||
|
||||
@@ -6,11 +6,12 @@ Various examples are [maintained in the repository](https://github.com/itzg/dock
|
||||
|
||||
Using the [GeyserMC plugin](https://geysermc.org/) with a Paper server (or similar) "enables clients from Minecraft Bedrock Edition to join your Minecraft Java server". The example also includes [Floodgate](https://wiki.geysermc.org/floodgate/) which "allows Xbox Live authenticated Bedrock users to join without a Java Edition account".
|
||||
|
||||
```yaml
|
||||
```yaml title="compose.yaml"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:latest
|
||||
pull_policy: daily
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
@@ -26,11 +27,53 @@ services:
|
||||
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/geyser/docker-compose.yml)
|
||||
|
||||
|
||||
## mc-router with auto-scale
|
||||
|
||||
Using [mc-router](https://github.com/itzg/mc-router) in front of one or multiple Minecraft server containers allows you to route players based on the hostname they use to connect.
|
||||
|
||||
With `AUTO_SCALE_UP` and `AUTO_SCALE_DOWN` enabled, mc-router can automatically start a target server when a player connects and stop it again after a period of inactivity.
|
||||
|
||||
```yaml title="compose.yaml"
|
||||
services:
|
||||
router:
|
||||
image: itzg/mc-router
|
||||
environment:
|
||||
IN_DOCKER: true
|
||||
AUTO_SCALE_DOWN: true
|
||||
AUTO_SCALE_UP: true
|
||||
AUTO_SCALE_DOWN_AFTER: 2h
|
||||
AUTO_SCALE_ASLEEP_MOTD: "Server is asleep. Join again to wake it up!"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
||||
vanilla:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
labels:
|
||||
mc-router.host: "vanilla.example.com"
|
||||
|
||||
paper:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: PAPER
|
||||
labels:
|
||||
mc-router.host: "paper.example.com"
|
||||
```
|
||||
|
||||
[Source](https://github.com/itzg/mc-router/blob/main/examples/docker-autoscale/compose-minimal.yml)
|
||||
|
||||
[More detailed example](https://github.com/itzg/mc-router/blob/main/examples/docker-autoscale/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
|
||||
```yaml title="compose.yaml"
|
||||
# Lazymc requires that the minecraft server have a static IP.
|
||||
#
|
||||
# To ensure that our servers have a static IP we need to create
|
||||
@@ -72,6 +115,7 @@ services:
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
pull_policy: daily
|
||||
# Assign a static IP to the server container
|
||||
networks:
|
||||
minecraft-network:
|
||||
@@ -105,7 +149,7 @@ Monitors network traffic to the Minecraft containers. If there is traffic, the c
|
||||
|
||||
By using [Lazytainer](https://github.com/vmorganp/Lazytainer) with the [docker-minecraft-server](https://github.com/itzg/docker-minecraft-server) a somehow similar behaviour to [Lazymc](https://github.com/timvisee/lazymc) can be archived.
|
||||
|
||||
```yaml
|
||||
```yaml title="compose.yaml"
|
||||
services:
|
||||
lazytainer:
|
||||
image: ghcr.io/vmorganp/lazytainer:master
|
||||
@@ -123,7 +167,8 @@ services:
|
||||
restart: unless-stopped
|
||||
network_mode: bridge
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:latest
|
||||
pull_policy: daily
|
||||
environment:
|
||||
EULA: TRUE
|
||||
TYPE: PAPER
|
||||
|
||||
@@ -27,6 +27,18 @@ There are optional volume paths that can be attached to supply content to be cop
|
||||
`/plugins`
|
||||
: content in this directory is synchronized into `/data/plugins` for server types that use plugins, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_PLUGINS_SRC` and destination by setting `COPY_PLUGINS_DEST`. If using a mod-based loader, such as Forge or Fabric, but a hybrid mod like [Cardboard](https://modrinth.com/mod/cardboard), then set `USES_PLUGINS` to have the automation utilize `/plugins` mount.
|
||||
|
||||
!!! example "Using Cardboard plugins with Fabric"
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "FABRIC"
|
||||
MODRINTH_PROJECTS: |
|
||||
fabric-api
|
||||
cardboard
|
||||
USES_PLUGINS: true
|
||||
```
|
||||
|
||||
`/mods`
|
||||
: content in this directory is synchronized into `/data/mods` for server types that use mods, [as described above](#mods-vs-plugins). For special cases, the source can be changed by setting `COPY_MODS_SRC` and destination by setting `COPY_MODS_DEST`.
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
To configure server mods using a packwiz modpack, set the `PACKWIZ_URL` environment variable to the location of your `pack.toml` modpack definition:
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data -e TYPE=FABRIC \
|
||||
docker run -d --pull=always \
|
||||
-v /path/on/host:/data -e TYPE=FABRIC \
|
||||
-e "PACKWIZ_URL=https://example.com/modpack/pack.toml" \
|
||||
itzg/minecraft-server
|
||||
```
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
mkdocs-material == 9.6.22
|
||||
mkdocs-autorefs == 1.4.3
|
||||
mkdocstrings[python] == 0.30.1
|
||||
mkdocs-literate-nav == 0.6.2
|
||||
mdx-gh-links == 0.4
|
||||
mkdocs-click == 0.9.0
|
||||
mkdocs-static-i18n == 1.3.0
|
||||
click==8.3.1
|
||||
colorama==0.4.6
|
||||
deepmerge==2.0
|
||||
ghp-import==2.1.0
|
||||
griffe==2.0.0
|
||||
Jinja2==3.1.6
|
||||
Markdown==3.10.2
|
||||
MarkupSafe==3.0.3
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.6.1
|
||||
mkdocs-autorefs==1.4.4
|
||||
mkdocs-get-deps==0.2.0
|
||||
mkdocstrings==1.0.3
|
||||
mkdocstrings-python==2.0.2
|
||||
packaging==26.0
|
||||
pathspec==1.0.4
|
||||
platformdirs==4.9.2
|
||||
Pygments==2.19.2
|
||||
pymdown-extensions==10.21
|
||||
python-dateutil==2.9.0.post0
|
||||
PyYAML==6.0.3
|
||||
pyyaml_env_tag==1.1
|
||||
six==1.17.0
|
||||
watchdog==6.0.0
|
||||
# zensical @ file:///
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Sending commands
|
||||
title: With Docker
|
||||
---
|
||||
|
||||
[RCON](http://wiki.vg/RCON) is enabled by default, so you can `exec` into the container to
|
||||
@@ -25,8 +25,8 @@ If rcon is disabled you can send commands by passing them as arguments to the pa
|
||||
|
||||
```shell
|
||||
docker exec --user 1000 mc mc-send-to-console op player
|
||||
| |
|
||||
+- container name +- Minecraft commands start here
|
||||
| |
|
||||
+- container name +- Minecraft commands start here
|
||||
```
|
||||
|
||||
## Enabling interactive console
|
||||
@@ -66,4 +66,4 @@ and then Control-p Control-q to **detach**.
|
||||
|
||||
!!! info "RCON is required for fully interactive, color console"
|
||||
|
||||
RCON must be enabled, which is the default, in order to use a fully interactive console with auto-completion and colorized log output.
|
||||
RCON must be enabled, which is the default, in order to use a fully interactive console with auto-completion and colorized log output.
|
||||
70
docs/sending-commands/ssh.md
Normal file
70
docs/sending-commands/ssh.md
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Over SSH
|
||||
---
|
||||
|
||||
The container can host an SSH console. It is enabled by setting `ENABLE_SSH` to `true`.
|
||||
The SSH server only supports password based authentication. The password is the same as the RCON password.
|
||||
|
||||
!!! question
|
||||
See [the RCON password](../configuration/server-properties.md/#rcon-password) section under configuration/server-properties for more information on how to set an RCON password.
|
||||
|
||||
The SSH server runs on port `2222` inside the container.
|
||||
|
||||
??? tip "Tip: Exposing the SSH port"
|
||||
|
||||
!!! warning "Security Implications"
|
||||
By default, publishing ports in Docker binds them to all network interfaces (`0.0.0.0`), making the SSH console accessible to any device that can reach your host machine.
|
||||
|
||||
Since the SSH console grants **full administrative access** to your server, it is critical to use a strong [RCON password](../configuration/server-properties.md/#rcon-password).
|
||||
|
||||
If you wish to restrict access to the local machine only, refer to the [Docker documentation](https://docs.docker.com/engine/network/port-publishing/#publishing-ports) on binding to specific IP addresses (e.g., `127.0.0.1:2222:2222`).
|
||||
|
||||
If SSH access is only intended for inter-container connections, consider **NOT** forwarding the port to the host machine, and putting the containers in a shared [Docker network](https://docs.docker.com/engine/network/#user-defined-networks).
|
||||
|
||||
```yaml title="compose.yaml"
|
||||
services:
|
||||
mc:
|
||||
ports:
|
||||
- '25565:25565'
|
||||
- '2222:2222'
|
||||
```
|
||||
|
||||
## Connecting
|
||||
|
||||
Connecting should be as simple as running
|
||||
```bash
|
||||
ssh anyuser@127.0.0.1 -p 2222
|
||||
```
|
||||
and typing in the RCON password.
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Environment Variable | Usage | Default |
|
||||
| -------------------- | ------------------------- | ------- |
|
||||
| `ENABLE_SSH` | Enable remote SSH console | `false` |
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
```yaml title="compose.yaml"
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:latest
|
||||
pull_policy: daily
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
- "2222:2222"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
ENABLE_SSH: true
|
||||
RCON_PASSWORD_FILE: /run/secrets/rcon_pass
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
|
||||
secrets:
|
||||
rcon_pass:
|
||||
file: ./rcon_password
|
||||
```
|
||||
90
docs/sending-commands/websocket.md
Normal file
90
docs/sending-commands/websocket.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
title: With WebSocket
|
||||
---
|
||||
|
||||
With `WEBSOCKET_CONSOLE` set to `true`, logs can be streamed, and commands sent, over a WebSocket connection.
|
||||
The API is available on `/console`.
|
||||
|
||||
## Password
|
||||
A password must be supplied using the `Sec-WebSocket-Protocol` header. This is done by putting `mc-server-runner-ws-v1` in the first slot, and the password in the second. The password can be set with `RCON_PASSWORD` or `WEBSOCKET_PASSWORD`. The latter overwrites the former. Authentication can be disabled with `WEBSOCKET_DISABLE_AUTHENTICATION`.
|
||||
??? Example "Examples"
|
||||
```js title="JavaScript example"
|
||||
let socket = new WebSocket("http://localhost:80/websocket", ["mc-server-runner-ws-v1", "rcon-password"]);
|
||||
```
|
||||
|
||||
## Allowed origins
|
||||
A list of comma-separated allowed origins should be supplied with `WEBSOCKET_ALLOWED_ORIGINS`. Origin checking can be disabled with `WEBSOCKET_DISABLE_ORIGIN_CHECK`.
|
||||
|
||||
## Listen address
|
||||
The listen address and port can be set with `WEBSOCKET_ADDRESS` (defaults to `0.0.0.0:80`), but it's recommended to listen on all interfaces when running in Docker.
|
||||
|
||||
## Log history
|
||||
When a connection is established, the last 50 (by default, configurable with `WEBSOCKET_LOG_BUFFER_SIZE`) log lines are sent with a `logHistory` type message.
|
||||
|
||||
??? tip "Tip: Remember to forward the WebSocket port on the host"
|
||||
|
||||
!!! warning "Security Implications"
|
||||
By default, publishing ports in Docker binds them to all network interfaces (`0.0.0.0`), making the WebSocket console accessible to any device that can reach your host machine.
|
||||
|
||||
Since the WebSocket console grants **full administrative access** to your server, it is critical to use a strong [WebSocket password](#password) or [RCON password](../configuration/server-properties.md/#rcon-password).
|
||||
|
||||
If you wish to restrict access to the local machine only, refer to the [Docker documentation](https://docs.docker.com/engine/network/port-publishing/#publishing-ports) on binding to specific IP addresses (e.g., `127.0.0.1:80:80`).
|
||||
|
||||
If WebSocket access is only intended for inter-container connections, consider **NOT** forwarding the port to the host machine, and putting the containers in a shared [Docker network](https://docs.docker.com/engine/network/#user-defined-networks).
|
||||
|
||||
```yaml title="compose.yaml"
|
||||
services:
|
||||
mc:
|
||||
ports:
|
||||
- '25565:25565'
|
||||
- '80:80'
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
| Environment Variable | Usage | Default |
|
||||
| ---------------------------------- | ---------------------------------------------------------- | ------------ |
|
||||
| `WEBSOCKET_CONSOLE` | Allow remote shell over WebSocket | `false` |
|
||||
| `WEBSOCKET_ADDRESS` | Bind address for WebSocket server | `0.0.0.0:80` |
|
||||
| `WEBSOCKET_DISABLE_ORIGIN_CHECK` | Disable checking if origin is trusted | `false` |
|
||||
| `WEBSOCKET_ALLOWED_ORIGINS` | Comma-separated list of trusted origins | ` ` |
|
||||
| `WEBSOCKET_PASSWORD` | Password will be the same as RCON_PASSWORD if unset | ` ` |
|
||||
| `WEBSOCKET_DISABLE_AUTHENTICATION` | Disable WebSocket authentication | `false` |
|
||||
| `WEBSOCKET_LOG_BUFFER_SIZE` | Number of log lines to save and send to connecting clients | `50` |
|
||||
|
||||
## API Schema
|
||||
```ts title="API Schema"
|
||||
interface StdinMessage {
|
||||
type: "stdin";
|
||||
data: string;
|
||||
}
|
||||
|
||||
interface StdoutMessage {
|
||||
type: "stdout";
|
||||
data: string;
|
||||
}
|
||||
|
||||
interface StderrMessage {
|
||||
type: "stderr";
|
||||
data: string;
|
||||
}
|
||||
|
||||
interface LogHistoryMessage {
|
||||
type: "logHistory";
|
||||
lines: string[];
|
||||
}
|
||||
|
||||
interface AuthFailureMessage {
|
||||
type: "authFailure";
|
||||
reason: string;
|
||||
}
|
||||
|
||||
// Messages sent from Client -> Server
|
||||
export type ClientMessage = StdinMessage;
|
||||
|
||||
// Messages sent from Server -> Client
|
||||
export type ServerMessage =
|
||||
| StdoutMessage
|
||||
| StderrMessage
|
||||
| LogHistoryMessage
|
||||
| AuthFailureMessage;
|
||||
```
|
||||
@@ -7,58 +7,55 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
|
||||
!!! warning "CurseForge API key usage"
|
||||
|
||||
A CurseForge API key is **required** to use this feature. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
|
||||
|
||||
|
||||
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`. Refer to [this compose file reference section](https://docs.docker.com/compose/compose-file/compose-file-v3/#variable-substitution) for more information.
|
||||
|
||||
|
||||
Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`:
|
||||
```yaml
|
||||
# compose.yaml
|
||||
```yaml title="compose.yaml"
|
||||
environment:
|
||||
CF_API_KEY: '$$11$$22$$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
|
||||
```
|
||||
If you use `docker run` you will need to make sure to use single quotes:
|
||||
|
||||
|
||||
```shell
|
||||
docker run ... -e CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
|
||||
```
|
||||
|
||||
To avoid exposing the API key, it is highly recommended to use a `.env` file, which is [loaded automatically by docker compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file). You **do not** need to escape `$`'s with a second `$` in the `.env` file **as long as the key is wrapped in single quotes**.
|
||||
|
||||
```
|
||||
# .env
|
||||
|
||||
To avoid exposing the API key, it is highly recommended to use a `.env` file, which is [loaded automatically by docker compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file). You **do not** need to escape `$`'s with a second `$` in the `.env` file **as long as the key is wrapped in single quotes**.
|
||||
|
||||
```title=".env"
|
||||
CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
|
||||
```
|
||||
|
||||
|
||||
The variable should to be referenced from the compose file, such as:
|
||||
|
||||
```yaml
|
||||
# compose.yaml
|
||||
|
||||
```yaml title="compose.yaml"
|
||||
environment:
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
```
|
||||
|
||||
|
||||
The .env file should be placed in the same directory as your compose file like so:
|
||||
|
||||
```
|
||||
/minecraft-server
|
||||
minecraft-server/
|
||||
├── .env
|
||||
├── compose.yaml
|
||||
├── /data
|
||||
├── data/
|
||||
```
|
||||
|
||||
|
||||
To use the equivalent with `docker run` you need to specify the `.env` file explicitly:
|
||||
```
|
||||
```shell
|
||||
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:
|
||||
```
|
||||
```yaml title="compose.yaml"
|
||||
service:
|
||||
environment:
|
||||
CF_API_KEY_FILE: /run/secrets/cf_api_key
|
||||
secrets:
|
||||
- cf_api_key
|
||||
|
||||
|
||||
secrets:
|
||||
cf_api_key:
|
||||
file: cf_api_key.secret
|
||||
@@ -67,27 +64,48 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
|
||||
|
||||
!!! note
|
||||
Be sure to use the appropriate [image tag for the Java version compatible with the modpack](../../versions/java.md).
|
||||
|
||||
|
||||
Most modpacks require a good amount of memory, so it best to set `MEMORY` to at least "4G" since the default is only 1 GB.
|
||||
|
||||
## Usage
|
||||
|
||||
Use one of the following to specify the modpack to install:
|
||||
|
||||
Pass a page URL to the modpack or a specific file with `CF_PAGE_URL` such as the modpack page "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8" or a specific file "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390". For example:
|
||||
Pass a page URL to the modpack or a specific file with `CF_PAGE_URL` such as the modpack page "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8" or a specific file "https://www.curseforge.com/minecraft/modpacks/all-the-mods-8/files/4248390".
|
||||
|
||||
```
|
||||
-e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
||||
```
|
||||
!!! example "Using CF_PAGE_URL"
|
||||
|
||||
```yaml title="Using compose.yaml"
|
||||
environment:
|
||||
# ...
|
||||
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
|
||||
```
|
||||
|
||||
```title="Using docker run"
|
||||
docker run -e CF_API_KEY=${CF_API_KEY} -e TYPE=AUTO_CURSEFORGE -e CF_PAGE_URL=https://www.curseforge.com/minecraft/modpacks/all-the-mods-8
|
||||
```
|
||||
|
||||
Instead of a URL, the modpack slug can be provided as `CF_SLUG`. The slug is the short identifier visible in the URL after "/modpacks/", such as
|
||||
|
||||

|
||||
|
||||
For example:
|
||||
```
|
||||
-e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
|
||||
```
|
||||
!!! example "Using CF_SLUG"
|
||||
|
||||
```yaml title="Using compose.yaml"
|
||||
environment:
|
||||
# ...
|
||||
MODPACK_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-8
|
||||
```
|
||||
|
||||
```title="Using docker run"
|
||||
docker run -e CF_API_KEY=${CF_API_KEY} -e TYPE=AUTO_CURSEFORGE -e CF_SLUG=all-the-mods-8
|
||||
```
|
||||
|
||||
### Pinning modpack and mod loader versions
|
||||
|
||||
@@ -119,6 +137,30 @@ The following examples all refer to version 1.0.7 of ATM8:
|
||||
|
||||
Pinning modpack version also pins the mod loader (to the version specified by the modpack). Mod loader version cannot be pinned independently of the modpack.
|
||||
|
||||
### Custom modloader versions
|
||||
|
||||
By default, AUTO_CURSEFORGE will use the exact modloader version declared by the modpack. However, you can override the modloader version by setting the following environment variable:
|
||||
|
||||
- `CF_MOD_LOADER_VERSION`: Override the mod loader version (e.g., `43.4.22`)
|
||||
|
||||
!!! example "Override mod loader version"
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
CF_SLUG: all-the-mods-8
|
||||
CF_MOD_LOADER_VERSION: "43.4.22"
|
||||
```
|
||||
|
||||
```title="Using docker run"
|
||||
docker run -e CF_MOD_LOADER_VERSION=43.4.22 -e CF_SLUG=my-fabric-pack ...
|
||||
```
|
||||
|
||||
!!! warning "Compatibility"
|
||||
|
||||
Using a custom modloader version that differs significantly from what the modpack was designed for may cause compatibility issues. Use this feature carefully and test thoroughly.
|
||||
|
||||
## Manual Downloads
|
||||
|
||||
For mod, modpacks, and world files that are not allowed for automated download, the container path `/downloads` can be attached and matching files will be retrieved from there. The subdirectories `mods`, `modpacks`, and `worlds` will also be checked accordingly. To change the source location of downloaded files, set `CF_DOWNLOADS_REPO` to an existing container path. To disable this feature, set `CF_DOWNLOADS_REPO` to an empty string.
|
||||
@@ -130,12 +172,12 @@ For mod, modpacks, and world files that are not allowed for automated download,
|
||||
!!! example
|
||||
|
||||
Assuming Docker compose is being used:
|
||||
|
||||
1. Create a directory next to the `docker-compose.yml` file. The name doesn't matter, but "downloads" is the common convention
|
||||
|
||||
1. Create a directory next to the `compose.yaml` file. The name doesn't matter, but "downloads" is the common convention
|
||||
2. From the "Mods Need Download" output, visit the download page of each, click on the file download and save that file into the directory created in the previous step
|
||||
3. Add a host directory mount to the volumes section where the container path **must be** `/downloads`. The snippet below shows how that will look
|
||||
4. Re-run `docker compose up -d` to apply the changes
|
||||
|
||||
|
||||
```yaml
|
||||
volumes:
|
||||
./downloads:/downloads
|
||||
@@ -150,7 +192,8 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:latest
|
||||
pull_policy: daily
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
@@ -163,7 +206,7 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
|
||||
```
|
||||
|
||||
where an exported manifest file should look like:
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"minecraft": {
|
||||
@@ -197,13 +240,13 @@ If you wish to use an unpublished modpack zip, set the container path to the fil
|
||||
|
||||
## Exclude client mods
|
||||
|
||||
Quite often there are mods that need to be excluded, such as ones that did not properly declare as a client mod via the file's game versions. Similarly, there are some mods that are incorrectly tagged as client only. The following describes two options to exclude/include mods:
|
||||
Quite often there are mods that need to be excluded, such as ones that did not properly declare as a client mod via the file's game versions. Similarly, there are some mods that are incorrectly tagged as client only. The following describes some options to exclude/include mods:
|
||||
|
||||
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.
|
||||
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. Alternatively, all mods can be excluded by setting `CF_EXCLUDE_ALL_MODS` to `true`
|
||||
|
||||
!!! 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:
|
||||
@@ -219,7 +262,7 @@ If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true"
|
||||
!!! tip "Embedded comments"
|
||||
|
||||
Comments can be embedded in the list using the `#` character.
|
||||
|
||||
|
||||
```yaml
|
||||
CF_EXCLUDE_MODS: |
|
||||
# Exclude client-side mods not published correctly
|
||||
@@ -229,7 +272,7 @@ If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true"
|
||||
|
||||
## Excluding Overrides Files
|
||||
|
||||
Modpack zip files typically include an `overrides` subdirectory that may contain 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 `CF_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.
|
||||
Modpack zip files typically include an `overrides` subdirectory that may contain 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 `CF_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.
|
||||
|
||||
### Ant-style paths
|
||||
|
||||
@@ -242,15 +285,15 @@ Ant-style paths can include the following globbing/wildcard symbols:
|
||||
| `?` | Matches one character |
|
||||
|
||||
!!! example
|
||||
|
||||
|
||||
The following compose `environment` entries show how to exclude Iris and Sodium mods from the overrides
|
||||
|
||||
|
||||
```yaml
|
||||
CF_OVERRIDES_EXCLUSIONS: mods/iris*.jar,mods/sodium*.jar
|
||||
```
|
||||
|
||||
|
||||
or using newline delimiter, which improves maintainability
|
||||
|
||||
|
||||
```yaml
|
||||
CF_OVERRIDES_EXCLUSIONS: |
|
||||
mods/iris*.jar
|
||||
@@ -266,7 +309,7 @@ Some modpacks come with world/save data via a worlds file and/or the overrides p
|
||||
|
||||
## Ignore missing files
|
||||
|
||||
Some mods use temporary files from the modpack and delete them when finished. Others will patch themselves and "disable" the original mod jar, such as gregtech. In order to avoid the installer from detecting the absent file(s) and re-installing, those files can be ignored by passing a comma or newline delimited list to `CF_IGNORE_MISSING_FILES`.
|
||||
Some mods use temporary files from the modpack and delete them when finished. Others will patch themselves and "disable" the original mod jar, such as gregtech. In order to avoid the installer from detecting the absent file(s) and re-installing, those files can be ignored by passing a comma, newline delimited list, or a file globbing pattern to `CF_IGNORE_MISSING_FILES`.
|
||||
|
||||
!!! hint
|
||||
|
||||
@@ -283,6 +326,7 @@ Some mods use temporary files from the modpack and delete them when finished. Ot
|
||||
environment:
|
||||
CF_IGNORE_MISSING_FILES: |
|
||||
mods/gregtech-2.6.2-beta.jar
|
||||
mods/*.jar
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -11,20 +11,20 @@ variable. A CurseForge server modpack is available together with its respective
|
||||
client modpack at <https://www.curseforge.com/minecraft/modpacks> .
|
||||
|
||||
Now you can add a `-e CF_SERVER_MOD=name_of_modpack.zip` to your command-line.
|
||||
|
||||
docker run -d -v /path/on/host:/data -e TYPE=CURSEFORGE \
|
||||
-e CF_SERVER_MOD=SkyFactory_4_Server_4.1.0.zip \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
```shell
|
||||
docker run -d --pull=always -v /path/on/host:/data -e TYPE=CURSEFORGE \
|
||||
-e CF_SERVER_MOD=SkyFactory_4_Server_4.1.0.zip \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
If you want to keep the pre-download modpacks separate from your data directory,
|
||||
then you can attach another volume at a path of your choosing and reference that.
|
||||
The following example uses `/modpacks` as the container path as the pre-download area:
|
||||
|
||||
docker run -d -v /path/on/host:/data -v /path/to/modpacks:/modpacks \
|
||||
-e TYPE=CURSEFORGE \
|
||||
-e CF_SERVER_MOD=/modpacks/SkyFactory_4_Server_4.1.0.zip \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
|
||||
```shell
|
||||
docker run -d --pull=always -v /path/on/host:/data \
|
||||
-v /path/to/modpacks:/modpacks -e TYPE=CURSEFORGE \
|
||||
-e CF_SERVER_MOD=/modpacks/SkyFactory_4_Server_4.1.0.zip \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
### Modpack data directory
|
||||
|
||||
By default, CurseForge modpacks are expanded into the sub-directory `/data/FeedTheBeast` and executed from there. (The default location was chosen for legacy reasons, when Curse and FTB were maintained together.)
|
||||
|
||||
@@ -30,12 +30,8 @@ If a specific `FTB_MODPACK_VERSION_ID` was not specified, simply restart the con
|
||||
The following example runs the latest version of [FTB Presents Direwolf20 1.12](https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/):
|
||||
|
||||
``` shell
|
||||
docker run -d --name mc-ftb -e EULA=TRUE \
|
||||
-e TYPE=FTBA -e FTB_MODPACK_ID=31 \
|
||||
-p 25565:25565 \
|
||||
itzg/minecraft-server:java8-multiarch
|
||||
docker run -d --pull=always -v /path/on/host:/data \
|
||||
-e EULA=TRUE -e TYPE=FTBA \
|
||||
-e FTB_MODPACK_ID=31 -p 25565:25565 \
|
||||
itzg/minecraft-server:java8-multiarch
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
Normally you will also add `-v` volume for `/data` since the mods and config are installed there along with world data.
|
||||
|
||||
54
docs/types-and-platforms/mod-platforms/gtnh.md
Normal file
54
docs/types-and-platforms/mod-platforms/gtnh.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Auto-setup GTNH server
|
||||
|
||||
[GT New Horizons (GTNH)](https://www.gtnewhorizons.com/) is a Minecraft 1.7.10 modpack maintained and supported by dedicated community members! With over 10 years in development, GTNH offers a carefully balanced and immersive experience to challenge players as they climb through the 15 tiers of technology. The ultimate goal of GTNH is to build the Stargate, an interdimensional teleporter and the symbol for absolute prestige, aptitude, and determination.
|
||||
|
||||
As GTNH is a complex modpack with some specifics it has its own `TYPE` to simplify the deployment and update process. To use it set the environment variable `TYPE` to "GTNH".
|
||||
|
||||
Configuration options with defaults:
|
||||
|
||||
- `GTNH_PACK_VERSION`=latest
|
||||
- `GTNH_DELETE_BACKUPS`=false
|
||||
- `SKIP_GTNH_UPDATE_CHECK`=false
|
||||
|
||||
## Set Modpack version
|
||||
|
||||
As GTNH is a Minecraft 1.7.10 modpack, when using it your minecraft version is set to 1.7.10 by default. The [modpack version](https://www.gtnewhorizons.com/downloads/) can be selected by setting `GTNH_PACK_VERSION` to `latest`, `latest-dev` or any specific version number. `latest` will automatically select the latest full release version available and deploy the server with it (Note: this will also automatically update the server on startup). `latest-dev` does the same but selects the latest version marked as beta or RC (it won't select a full release version even if a newer exist). The third (and recommended) option is setting the server to a specific version like `2.8.1` to manage updates manually.
|
||||
|
||||
> To actively prevent an update from happening you can set the environment variable `SKIP_GTNH_UPDATE_CHECK` to true this will prevent any update check from running, but will also prevent the server install from running, so just set it after the initial setup.
|
||||
|
||||
## Resource requirements
|
||||
|
||||
**Recommended Minimum:**
|
||||
|
||||
- 2-4 cpu cores
|
||||
- 6GB of RAM +0.5GB per extra player (early game)
|
||||
- 6GB of RAM +1GB per extra player (~UV tier+)
|
||||
- 20GB+ storage. HDD is feasible, SSD is preferred
|
||||
|
||||
For more details regarding the server setup consult the [modpack wiki](https://wiki.gtnewhorizons.com/wiki/Server_Setup).
|
||||
|
||||
## Java Version
|
||||
|
||||
GTNH supports java 8 and 17+ (java 17+ is always recommended for maximum performance). The server will only start when a supported version of itzg/docker-minecraft-server is used.
|
||||
|
||||
For optimal performance choose java25 with GTNH 2.8.0 and later.
|
||||
|
||||
## Config backups
|
||||
|
||||
During version upgrade, the server will replace all config files to make sure all new features are setup as intended. The old config files are stored in a backup folder in the data directory, for you to use as reference for manual reapplication of your changed settings. Set the environment variable `GTNH_DELETE_BACKUPS` to true to delete all backup folders at startup.
|
||||
|
||||
## server.properties defaults
|
||||
|
||||
To deliver the intended GTNH by default, when running a GTNH server, the following options are set in `server.properties`. It is recommended to leave them as is, but if you know what you are doing feel free to play around with them.
|
||||
|
||||
- `LEVEL_TYPE=rwg`
|
||||
- `DIFFICULTY=hard`
|
||||
- `ALLOW_FLIGHT=true`
|
||||
- `ENABLE_COMMAND_BLOCK=true`
|
||||
- `MOTD=Greg Tech New Horizon <current-pack-version>`
|
||||
|
||||
## Java args
|
||||
|
||||
With java 17+ the server starts with `-Dfml.readTimeout=180 @java9args.txt -jar lwjgl3ify-forgePatches.jar`.
|
||||
|
||||
With java 8 the server stars with `-XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseCodeCacheFlushing -Dfml.readTimeout=180 -jar forge-1.7.10-10.13.4.1614-1.7.10-universal.jar`
|
||||
@@ -36,7 +36,7 @@ Instead of auto resolving, a specific version of modpack file can be specified b
|
||||
|
||||
## Ignore missing files
|
||||
|
||||
Some mods, such as [MCInstance Loader](https://modrinth.com/mod/mcinstance-loader), use temporary files from the modpack and delete them when finished. In order to avoid the installer from detecting the absent file(s) and re-installing, those files can be ignored by passing a comma or newline delimited list to `MODRINTH_IGNORE_MISSING_FILES`.
|
||||
Some mods, such as [MCInstance Loader](https://modrinth.com/mod/mcinstance-loader), use temporary files from the modpack and delete them when finished. In order to avoid the installer from detecting the absent file(s) and re-installing, those files can be ignored by passing a comma, newline delimited list or, a file globbing pattern to `MODRINTH_IGNORE_MISSING_FILES`.
|
||||
|
||||
!!! example
|
||||
|
||||
@@ -45,6 +45,7 @@ Some mods, such as [MCInstance Loader](https://modrinth.com/mod/mcinstance-loade
|
||||
environment:
|
||||
MODRINTH_IGNORE_MISSING_FILES: |
|
||||
config/mcinstanceloader/pack.mcinstance
|
||||
mods/*.jar
|
||||
```
|
||||
|
||||
## Excluding files
|
||||
|
||||
@@ -4,8 +4,8 @@ A [Fabric server](https://fabricmc.net/) can be automatically downloaded, upgrad
|
||||
|
||||
Using `docker run` command line
|
||||
|
||||
```
|
||||
docker run -d -e EULA=TRUE -e TYPE=FABRIC -p 25565:25565 itzg/minecraft-server
|
||||
```shell
|
||||
docker run -d --pull=always -e EULA=TRUE -e TYPE=FABRIC -p 25565:25565 itzg/minecraft-server
|
||||
```
|
||||
|
||||
In a compose file service:
|
||||
@@ -24,7 +24,7 @@ A specific loader or launcher version other than the latest can be requested usi
|
||||
|
||||
With docker run
|
||||
|
||||
```
|
||||
```shell
|
||||
docker run -d ... \
|
||||
-e TYPE=FABRIC \
|
||||
-e FABRIC_LAUNCHER_VERSION=0.10.2 \
|
||||
@@ -41,6 +41,8 @@ A specific loader or launcher version other than the latest can be requested usi
|
||||
FABRIC_LOADER_VERSION: 0.13.1
|
||||
```
|
||||
|
||||
The container fetches Fabric loader and game version metadata from the [Fabric meta API](https://meta.fabricmc.net). You can override the base URL with `FABRIC_META_BASE_URL` (default: `https://meta.fabricmc.net`), for example when using a mirror or custom meta endpoint.
|
||||
|
||||
!!! note
|
||||
|
||||
See the [Working with mods and plugins](../../mods-and-plugins/index.md) section to set up Fabric mods and configuration.
|
||||
|
||||
@@ -10,7 +10,7 @@ A [Forge server](http://www.minecraftforge.net/) can be automatically downloaded
|
||||
|
||||
!!! example
|
||||
|
||||
```
|
||||
```shell
|
||||
docker run -e TYPE=FORGE ...
|
||||
```
|
||||
|
||||
@@ -25,7 +25,7 @@ The overall version is specified by `VERSION`, [as described in the section abov
|
||||
|
||||
!!! example
|
||||
|
||||
```
|
||||
```shell
|
||||
docker run -e TYPE=FORGE -e VERSION=1.12.2 -e FORGE_VERSION=14.23.5.2854 ...
|
||||
```
|
||||
|
||||
@@ -58,7 +58,7 @@ Support for [NeoForge](https://neoforged.net/) is also provided. A NeoForge serv
|
||||
|
||||
!!! example
|
||||
|
||||
```
|
||||
```shell
|
||||
docker run -e TYPE=NEOFORGE -e VERSION=1.20.1 -e NEOFORGE_VERSION=47.1.79 ...
|
||||
```
|
||||
|
||||
|
||||
@@ -77,14 +77,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
|
||||
|
||||
### Catserver
|
||||
|
||||
A [Catserver](http://catserver.moe/) type server can be used with
|
||||
|
||||
-e TYPE=CATSERVER
|
||||
|
||||
> **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
|
||||
|
||||
@@ -9,7 +9,7 @@ If you want to run a specific version, you can add `-e SPONGEVERSION=1.11.2-6.1.
|
||||
Beware that current [Sponge](https://www.spongepowered.org) `STABLE` versions for Minecraft 1.12 require using [the Java 8 tag](../../versions/java.md):
|
||||
|
||||
``` shell
|
||||
docker run -d -v /path/on/host:/data -e TYPE=SPONGEVANILLA \
|
||||
docker run -d --pull=always -v /path/on/host:/data -e TYPE=SPONGEVANILLA \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server:java8-multiarch
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@ You can also choose to use the `EXPERIMENTAL` branch.
|
||||
Just change it with `SPONGEBRANCH`, such as:
|
||||
|
||||
``` shell
|
||||
$ docker run -d -v /path/on/host:/data ... \
|
||||
$ docker run -d --pull=always -v /path/on/host:/data ... \
|
||||
-e TYPE=SPONGEVANILLA -e SPONGEBRANCH=EXPERIMENTAL ...
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
A [PaperMC server](https://papermc.io/) can be automatically downloaded, upgraded, and run by setting the environment variable TYPE to "PAPER".
|
||||
|
||||
By default, the container will find and download the latest build for the `VERSION` chosen. If `VERSION` is not specified, then the latest Minecraft version released by PaperMC is selected. Along with a specific `VERSION`, a specific Paper build can be selected by setting the environment variable `PAPER_BUILD`.
|
||||
By default, the container will find and download the latest build for the `VERSION` chosen. If `VERSION` is not specified, then the latest Minecraft version released by PaperMC is selected. Along with a specific `VERSION`, a specific Paper build can be selected by setting the environment variable `PAPER_BUILD`.
|
||||
|
||||
To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "experimental", otherwise only release/default channel builds are selected.
|
||||
|
||||
@@ -8,7 +8,7 @@ To allow for the selection of experimental builds, set `PAPER_CHANNEL` to "exper
|
||||
|
||||
Using `docker run` command line
|
||||
|
||||
```
|
||||
```shell
|
||||
docker run ... -e TYPE=PAPER ...
|
||||
|
||||
docker run ... -e TYPE=PAPER -e VERSION=1.20.6 ...
|
||||
@@ -65,6 +65,7 @@ A [Pufferfish](https://github.com/pufferfish-gg/Pufferfish) server, which is "a
|
||||
The `VERSION` variable is used to select branch latest, 1.18, or 1.17. Use PUFFERFISH_BUILD to really select the SERVER VERSION number.
|
||||
|
||||
Extra variables:
|
||||
|
||||
- `PUFFERFISH_BUILD=lastSuccessfulBuild` : set a specific Pufferfish build to use. Example: selecting build 47 => 1.18.1, or build 50 => 1.18.2 etc
|
||||
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||
- `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the built-in [Flare](https://blog.airplane.gg/flare) profiler
|
||||
@@ -80,6 +81,7 @@ A [Purpur](https://purpurmc.org/) server, which is "a drop-in replacement for Pa
|
||||
The `VERSION` variable is used to lookup a build of Purpur to download
|
||||
|
||||
Extra variables:
|
||||
|
||||
- `PURPUR_BUILD=LATEST` : set a specific Purpur build to use
|
||||
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||
- `USE_FLARE_FLAGS=false` : set to true to add appropriate flags for the built-in [Flare](https://blog.airplane.gg/flare) profiler
|
||||
@@ -112,9 +114,9 @@ By default, the container will run the latest experimental build of [Folia serve
|
||||
|
||||
Using `docker run`
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=FOLIA \
|
||||
```shell
|
||||
docker run -d --pull=always \
|
||||
-v /path/on/host:/data -e TYPE=FOLIA \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
|
||||
@@ -129,4 +131,23 @@ If you have attached a host directory to the `/data` volume, then you can instal
|
||||
|
||||
## Extra config
|
||||
|
||||
- `SKIP_DOWNLOAD_DEFAULTS`: when set to "true" startup will entirely skip checking for default Paper/Bukkit/Spigot config files to download
|
||||
- `SKIP_DOWNLOAD_DEFAULTS`: when set to "true" startup will entirely skip checking for default Paper/Bukkit/Spigot config files to download
|
||||
|
||||
## Configuration Repositories
|
||||
|
||||
You can automatically download optimized or custom configuration files (e.g., `bukkit.yml`, `spigot.yml`, `paper-global.yml`, `purpur.yml`) by setting a repository URL. The container will automatically append the Minecraft version to the URL (e.g., `<REPO_URL>/1.21.1/<FILE>`).
|
||||
|
||||
| Server Type | Variable |
|
||||
| :--- | :--- |
|
||||
| Paper | `PAPER_CONFIG_REPO` |
|
||||
| Pufferfish | `PUFFERFISH_CONFIG_REPO` |
|
||||
| Purpur | `PURPUR_CONFIG_REPO` |
|
||||
|
||||
### Server Properties
|
||||
|
||||
You can also download a base `server.properties` file using `SERVER_PROPERTIES_REPO_URL`.
|
||||
|
||||
- **Smart Mode**: If the URL does **not** end in `.properties`, the script treats it as a base URL and appends `/${VERSION}/server.properties` (matching the behavior of the config repos).
|
||||
- **Direct Mode**: If the URL ends in `.properties`, it downloads that specific file.
|
||||
|
||||
**Note**: Environment variables (like `MOTD`, `DIFFICULTY`, `MAX_PLAYERS`) defined in your Docker configuration will **override** values in the downloaded `server.properties` file.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Enable [Quilt server](https://quiltmc.org/) mode by adding a `-e TYPE=QUILT` to your command-line.
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=QUILT \
|
||||
```shell
|
||||
docker run -d --pull=always \
|
||||
-v /path/on/host:/data -e TYPE=QUILT \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
|
||||
@@ -10,9 +10,9 @@ By default, the container will install the latest [quilt server launcher](https:
|
||||
|
||||
A specific loader or installer version other than the latest can be requested using `QUILT_LOADER_VERSION` and `QUILT_INSTALLER_VERSION` respectively, such as:
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data ... \
|
||||
-e TYPE=QUILT \
|
||||
```shell
|
||||
docker run -d --pull=always \
|
||||
-v /path/on/host:/data ... -e TYPE=QUILT \
|
||||
-e QUILT_LOADER_VERSION=0.16.0 \
|
||||
-e QUILT_INSTALLER_VERSION=0.4.1
|
||||
```
|
||||
|
||||
@@ -57,9 +57,45 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td><code>UTC</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LOG_LEVEL</code></td>
|
||||
<td>Root logger level (trace, debug, info, warn, error)</td>
|
||||
<td><code>info</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LOG_CONSOLE_FORMAT</code></td>
|
||||
<td>Log4j2 pattern for console output (what you see in <code>docker logs</code>)</td>
|
||||
<td><code>[%d{HH:mm:ss}] [%t/%level]: %msg%n</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LOG_FILE_FORMAT</code></td>
|
||||
<td>Log4j2 pattern for file logs (written to <code>logs/latest.log</code>)</td>
|
||||
<td><code>[%d{HH:mm:ss}] [%t/%level]: %msg%n</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LOG_TERMINAL_FORMAT</code></td>
|
||||
<td>Log4j2 pattern for interactive terminal console (used with <code>docker attach</code>)</td>
|
||||
<td><code>[%d{HH:mm:ss} %level]: %msg%n</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ROLLING_LOG_FILE_PATTERN</code></td>
|
||||
<td>Pattern for rolled/archived log file names</td>
|
||||
<td><code>logs/%d{yyyy-MM-dd}-%i.log.gz</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ROLLING_LOG_MAX_FILES</code></td>
|
||||
<td>Maximum number of archived log files to keep</td>
|
||||
<td><code>1000</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ENABLE_ROLLING_LOGS</code></td>
|
||||
<td>By default the vanilla log file will grow without limit. The logger can be reconfigured to use a rolling log files strategy by setting this to <code>true</code></td>
|
||||
<td><strong>Legacy option.</strong> Rolling logs are now enabled by default via templated log4j2 configuration. This option is maintained for backward compatibility but only used for error reporting</td>
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
@@ -180,102 +216,6 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td><code>FALSE</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>MAX_PLAYERS</code></td>
|
||||
<td>The maximum number of players that can join the server.</td>
|
||||
<td><code>20</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>MAX_WORLD_SIZE</code></td>
|
||||
<td>The maximum possible size in blocks, expressed as a radius.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ALLOW_NETHER</code></td>
|
||||
<td>Allows players to travel to the Nether</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ANNOUNCE_PLAYER_ACHIEVEMENTS</code></td>
|
||||
<td>Allows server to announce when a player gets an achievement.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ENABLE_COMMAND_BLOCK</code></td>
|
||||
<td>Enables the command blocks.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>FORCE_GAMEMODE</code></td>
|
||||
<td>Force players to join in the default game mode.</td>
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>GENERATE_STRUCTURES</code></td>
|
||||
<td>Defines whether structures (such as villages) will be generated.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>HARDCORE</code></td>
|
||||
<td>If set to <code>true</code>, players will be set to spectator mode if they die.</td>
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SNOOPER_ENABLED</code></td>
|
||||
<td>If set to false, the server will not send data to snoop.minecraft.net server.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>MAX_BUILD_HEIGHT</code></td>
|
||||
<td>The maximum height in which building is allowed. Terrain may still naturally generate above a low height limit.</td>
|
||||
<td><code>256</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SPAWN_ANIMALS</code></td>
|
||||
<td>Determines if animals will be able to spawn.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SPAWN_MONSTERS</code></td>
|
||||
<td>Determines if monsters will be spawned.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SPAWN_NPCS</code></td>
|
||||
<td>Determines if villagers will be spawned.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SPAWN_PROTECTION</code></td>
|
||||
<td>Sets the area that non-ops can not edit (0 to disable)</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>VIEW_DISTANCE</code></td>
|
||||
<td>Sets the amount of world data the server sends the client, measured in chunks in each direction of the player (radius, not diameter). It determines the server-side viewing distance.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SEED</code></td>
|
||||
<td>Sets the seed to create the Minecraft world. If you use a negative number, make sure that it is in quotes.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>MODE</code></td>
|
||||
<td>Minecraft servers are configured to run in Survival mode by default. You can change the mode using MODE where you can either provide the <a href="http://minecraft.wiki/Game_mode#Game_modes">standard numerical values</a> or the shortcut values:<br />
|
||||
@@ -288,127 +228,18 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>PVP</code></td>
|
||||
<td>By default, servers are created with player-vs-player (PVP) mode enabled.</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LEVEL_TYPE</code></td>
|
||||
<td>By default, a standard world is generated with hills, valleys, water, etc. A different level type can be configured by setting LEVEL_TYPE to <a href="https://minecraft.wiki/w/Server.properties#level-type">an expected type listed here</a>.
|
||||
</td>
|
||||
<td><code>minecraft:default</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>GENERATOR_SETTINGS</code></td>
|
||||
<td>For some of the level types, <code>GENERATOR_SETTINGS</code> can be used to further customize the world generation <a href="https://minecraft.wiki/w/Server.properties#generator-settings">as described here</a>.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LEVEL</code></td>
|
||||
<td>You can either switch between world saves or run multiple containers with different saves by using the LEVEL option</td>
|
||||
<td>Maps to <a href="https://minecraft.wiki/w/Server.properties#level-name">the <code>level-name</code> server property</a>. You can either switch between world saves or run multiple containers with different saves by using the LEVEL option</td>
|
||||
<td><code>world</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ONLINE_MODE</code></td>
|
||||
<td>By default, server checks connecting players against Minecraft's account database. If you want to create an offline server or your server is not connected to the internet, you can disable the server to try connecting to minecraft.net to authenticate players</td>
|
||||
<td><code>true</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ALLOW_FLIGHT</code></td>
|
||||
<td>Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed.</td>
|
||||
<td><code>FALSE</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SERVER_NAME</code></td>
|
||||
<td>The server name</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SERVER_PORT</code></td>
|
||||
<td>Only change this value if you know what you're doing. It is only needed when using host networking and it is rare that host networking should be used.</td>
|
||||
<td>Maps to <a href="https://minecraft.wiki/w/Server.properties#server-port">the <code>server-port</code> server property</a>. Only change this value if you know what you're doing. It is only needed when using host networking and it is rare that host networking should be used.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>PLAYER_IDLE_TIMEOUT</code></td>
|
||||
<td>player-idle-timeout</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ENABLE_JMX</code></td>
|
||||
<td>enable-jmx-monitoring</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SYNC_CHUNK_WRITES</code></td>
|
||||
<td>sync-chunk-writes</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ENABLE_STATUS</code></td>
|
||||
<td>enable-status</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ENTITY_BROADCAST_RANGE_PERCENTAGE</code></td>
|
||||
<td>entity-broadcast-range-percentage</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>FUNCTION_PERMISSION_LEVEL</code></td>
|
||||
<td>function-permission-level</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>NETWORK_COMPRESSION_THRESHOLD</code></td>
|
||||
<td>network-compression-threshold</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>OP_PERMISSION_LEVEL</code></td>
|
||||
<td>op-permission-level</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>PREVENT_PROXY_CONNECTIONS</code></td>
|
||||
<td>prevent-proxy-connections</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>USE_NATIVE_TRANSPORT</code></td>
|
||||
<td>use-native-transport</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>SIMULATION_DISTANCE</code></td>
|
||||
<td>simulation-distance</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>EXEC_DIRECTLY</code></td>
|
||||
<td>If you would like to docker attach to the Minecraft server console with color and interactive capabilities, then set to <code>true</code></td>
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>STOP_SERVER_ANNOUNCE_DELAY</code></td>
|
||||
<td>To allow time for players to finish what they're doing during a graceful server shutdown, set <code>STOP_SERVER_ANNOUNCE_DELAY</code> to a number of seconds to delay after an announcement is posted by the server.</td>
|
||||
@@ -466,6 +297,10 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Server properties
|
||||
|
||||
This image maps known server properties as described in [this section](configuration/server-properties.md).
|
||||
|
||||
### Custom resource pack
|
||||
|
||||
<table>
|
||||
@@ -609,10 +444,6 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
|
||||
### Auto-Pause
|
||||
|
||||
!!! note
|
||||
|
||||
Autopause is not compatible with `EXEC_DIRECTLY=true` and the two cannot be set together.
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -747,7 +578,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<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>Pass a page URL to the modpack or a specific file</td>
|
||||
@@ -818,6 +649,12 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>CF_MOD_LOADER_VERSION</code></td>
|
||||
<td>Override the mod loader version declared by the modpack</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -12,27 +12,28 @@ where `<tag>` refers to the first column of this table:
|
||||
|
||||
| Tag | Java version | Linux | JVM Type | Architecture | Note |
|
||||
|----------------|--------------|--------|--------------------|---------------------|------|
|
||||
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| latest | 25 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| stable | 25 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| java25 | 25 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| java25-graalvm | 25 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
|
||||
| java25-jdk | 25 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
||||
| java25-graalvm | 25 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (5) |
|
||||
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 | |
|
||||
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
||||
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 | |
|
||||
| java21-graalvm | 21 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
|
||||
| java21-graalvm | 21 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (5) |
|
||||
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||
| java17-graalvm | 17 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
|
||||
| java17-alpine | 17 | Alpine | Hotspot | amd64 (1) | |
|
||||
| java17-graalvm | 17 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (5) |
|
||||
| java16 | 16 | Ubuntu | Hotspot | amd64, arm64, armv7 | (4) |
|
||||
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
|
||||
|
||||
Notes
|
||||
|
||||
1. Why no arm64 for Java 17 Alpine? That is because the base images, such as [elipse-temurin](https://hub.docker.com/_/eclipse-temurin/tags?page=&page_size=&ordering=&name=17-jre-alpine) do not provide support for that. Use the Ubuntu based images instead.
|
||||
1. Why no arm64 for Java 17 Alpine? That is because the base images, such as [elipse-temurin](https://hub.docker.com/_/eclipse-temurin/tags?page=&page_size=&ordering=&name=17-jre-alpine) do not provide support for that. Use the Ubuntu-based images instead.
|
||||
2. Short-term variant, subject to deprecation upon next version introduction
|
||||
3. 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. Based on the [Oracle GraalVM 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.
|
||||
4. This version of Java is [recommended for PaperMC 1.16.5](https://docs.papermc.io/paper/getting-started/#requirements)
|
||||
5. Due to these images using Oracle Linux, (which is based on Red Hat Enterprise Linux) Forge Installer will not work due to its use of zlib-ng. Use other images for initial installation and Forge version upgrade.
|
||||
|
||||
!!! example "Example using java8"
|
||||
|
||||
@@ -134,6 +135,7 @@ The following image tags have been deprecated and are no longer receiving update
|
||||
- java16-openj9
|
||||
- java17-graalvm-ce
|
||||
- java17-openj9
|
||||
- java17-alpine
|
||||
- java19
|
||||
- java20-graalvm, java20, java20-alpine
|
||||
- java23-*
|
||||
@@ -143,4 +145,5 @@ The following image tags have been deprecated and are no longer receiving update
|
||||
|
||||
## JSON Listing
|
||||
|
||||
Information about the image tags is available programmatically at <https://raw.githubusercontent.com/itzg/docker-minecraft-server/refs/heads/master/images.json>
|
||||
|
||||
Information about the image tags is available for programmatic access at <https://raw.githubusercontent.com/itzg/docker-minecraft-server/refs/heads/master/images.json>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
To use a different Minecraft version, pass the `VERSION` environment variable (case sensitive), which can have the value
|
||||
|
||||
- LATEST (the default)
|
||||
- SNAPSHOT
|
||||
- a specific version, such as "1.7.9"
|
||||
- `LATEST` for latest release (the default)
|
||||
- `SNAPSHOT` for latest snapshot
|
||||
- a specific version, such as `1.7.9`, `25w35a`, `26.1`, or `26.1-snapshot-1`
|
||||
- or an alpha and beta version, such as "b1.7.3" (server download might not exist)
|
||||
|
||||
For example, to use the latest snapshot:
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
# Allocate API key from https://console.curseforge.com/
|
||||
CF_API_KEY: ${CF_API_KEY}
|
||||
# Example of overriding modloader version for a Fabric modpack
|
||||
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
|
||||
CF_SLUG: "cobblemon-fabric"
|
||||
# Override the mod loader version from the modpack
|
||||
CF_MOD_LOADER_VERSION: "0.16.14"
|
||||
MEMORY: "4G"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
# See https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#custom-modloader-versions
|
||||
@@ -110,9 +110,20 @@ services:
|
||||
####################################################################
|
||||
# Logging Options #
|
||||
# #
|
||||
# Set to "true" to delete old logs #
|
||||
# Rolling logs are now enabled by default with templated #
|
||||
# log4j2 configuration. You can customize: #
|
||||
# #
|
||||
# LOG_LEVEL: Log level (default: info) #
|
||||
# LOG_CONSOLE_FORMAT: Console output format (docker logs) #
|
||||
# LOG_FILE_FORMAT: File log format (logs/latest.log) #
|
||||
# ROLLING_LOG_MAX_FILES: Max archived files (default: 1000) #
|
||||
# #
|
||||
# Example: Add full timestamp to logs #
|
||||
# LOG_CONSOLE_FORMAT: "[%d{yyyy-MM-dd HH:mm:ss}] [%t/%level]: %msg%n"
|
||||
# LOG_FILE_FORMAT: "[%d{yyyy-MM-dd HH:mm:ss}] [%t/%level]: %msg%n"
|
||||
# #
|
||||
# ENABLE_ROLLING_LOGS is now legacy and no longer needed. #
|
||||
####################################################################
|
||||
ENABLE_ROLLING_LOGS: "true"
|
||||
|
||||
####################################################################
|
||||
# Server Timezone #
|
||||
|
||||
@@ -120,9 +120,20 @@ services:
|
||||
####################################################################
|
||||
# Logging Options #
|
||||
# #
|
||||
# Set to "true" to delete old logs #
|
||||
# Rolling logs are now enabled by default with templated #
|
||||
# log4j2 configuration. You can customize: #
|
||||
# #
|
||||
# LOG_LEVEL: Log level (default: info) #
|
||||
# LOG_CONSOLE_FORMAT: Console output format (docker logs) #
|
||||
# LOG_FILE_FORMAT: File log format (logs/latest.log) #
|
||||
# ROLLING_LOG_MAX_FILES: Max archived files (default: 1000) #
|
||||
# #
|
||||
# Example: Add full timestamp to logs #
|
||||
# LOG_CONSOLE_FORMAT: "[%d{yyyy-MM-dd HH:mm:ss}] [%t/%level]: %msg%n"
|
||||
# LOG_FILE_FORMAT: "[%d{yyyy-MM-dd HH:mm:ss}] [%t/%level]: %msg%n"
|
||||
# #
|
||||
# ENABLE_ROLLING_LOGS is now legacy and no longer needed. #
|
||||
####################################################################
|
||||
ENABLE_ROLLING_LOGS: "true"
|
||||
|
||||
####################################################################
|
||||
# Server Timezone #
|
||||
|
||||
17
examples/ftba/stoneblock4/compose.yml
Normal file
17
examples/ftba/stoneblock4/compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java25
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FTBA
|
||||
FTB_MODPACK_ID: "130"
|
||||
FTB_MODPACK_VERSION_ID: "100171"
|
||||
MEMORY: "4G"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- data:/data
|
||||
volumes:
|
||||
data:
|
||||
25
examples/gtnh/docker-compose-type-gtnh.yaml
Normal file
25
examples/gtnh/docker-compose-type-gtnh.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
services:
|
||||
mc:
|
||||
# make sure this java version matches with pack java version
|
||||
image: itzg/minecraft-server:java25
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: GTNH
|
||||
GTNH_PACK_VERSION: "2.8.1"
|
||||
# Enable to delete old config backups
|
||||
# GTNH_DELETE_BACKUPS: true
|
||||
# Use to prevent updates
|
||||
# SKIP_GTNH_UPDATE_CHECK: true
|
||||
MEMORY: 6G
|
||||
# Bring in standard extra mods described at https://wiki.gtnewhorizons.com/wiki/Additional_Mods
|
||||
# MODS: |
|
||||
# https://github.com/Kynake/BetterFoliage/releases/download/1.2.1/BetterFoliage-LegacyEdition-1.2.1.jar
|
||||
volumes:
|
||||
# attach a managed volume, change to a relative or absolute host directory if needed
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
27
examples/mc-router-autoscale/compose-minimal.yml
Normal file
27
examples/mc-router-autoscale/compose-minimal.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
# Source: https://github.com/itzg/mc-router/blob/main/examples/docker-autoscale/compose-minimal.yml
|
||||
services:
|
||||
router:
|
||||
image: itzg/mc-router
|
||||
environment:
|
||||
IN_DOCKER: true
|
||||
AUTO_SCALE_DOWN: true
|
||||
AUTO_SCALE_UP: true
|
||||
AUTO_SCALE_DOWN_AFTER: 2h
|
||||
AUTO_SCALE_ASLEEP_MOTD: "Server is asleep. Join again to wake it up!"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
vanilla:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
labels:
|
||||
mc-router.host: "vanilla.example.com"
|
||||
paper:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: PAPER
|
||||
labels:
|
||||
mc-router.host: "paper.example.com"
|
||||
50
examples/mc-router-autoscale/compose.yml
Normal file
50
examples/mc-router-autoscale/compose.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
# Source: https://github.com/itzg/mc-router/blob/main/examples/docker-autoscale/compose.yml
|
||||
# This is a verbose example with comments and explanations for configuring auto-scaling behavior
|
||||
# for Docker backend servers. See compose-minimal.yml for a simple minimal example.
|
||||
services:
|
||||
router:
|
||||
image: itzg/mc-router
|
||||
environment:
|
||||
IN_DOCKER: true
|
||||
# Global auto-scaling settings for all docker-backend servers
|
||||
# Settings can be overridden per-backend using labels
|
||||
# as shown in the backend services below (except for AUTO_SCALE_DOWN_AFTER which is global only)
|
||||
# Enable auto-scaling down after inactivity for all backends by default
|
||||
AUTO_SCALE_DOWN: true
|
||||
# Enable auto-scaling up after player join for all backends by default
|
||||
AUTO_SCALE_UP: true
|
||||
# Time of inactivity after which to scale down (default: 10m) - Global only setting
|
||||
AUTO_SCALE_DOWN_AFTER: 2h
|
||||
# MOTD to show when server is asleep (default: empty string - don't show MOTD, show server offline instead)
|
||||
AUTO_SCALE_ASLEEP_MOTD: "Server is asleep. Join again to wake it up!"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
vanilla:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
labels:
|
||||
# If global auto scaling settings are enabled, this backend will
|
||||
# auto-scale without any additional auto-scale related configuration
|
||||
mc-router.host: "vanilla.example.com"
|
||||
fabric:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FABRIC
|
||||
labels:
|
||||
mc-router.host: "fabric.example.com"
|
||||
# Disable auto-scaling for this backend specifically
|
||||
mc-router.auto-scale-up: false
|
||||
mc-router.auto-scale-down: false
|
||||
paper:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: PAPER
|
||||
labels:
|
||||
mc-router.host: "paper.example.com"
|
||||
# Override asleep MOTD for this backend
|
||||
mc-router.auto-scale-asleep-motd: "Paper is folded. Join to unfold!"
|
||||
@@ -1,60 +0,0 @@
|
||||
# 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!
|
||||
|
||||
129
examples/optimized-server-config/README.md
Normal file
129
examples/optimized-server-config/README.md
Normal file
@@ -0,0 +1,129 @@
|
||||
# Optimized Server Configuration (Paper, Purpur, Pufferfish)
|
||||
|
||||
This example demonstrates how to automatically download and apply optimized configuration files for your Minecraft server from a remote Git repository. This is useful for maintaining a standard, high-performance configuration across multiple server instances.
|
||||
|
||||
## Features
|
||||
|
||||
- **Automatic Download**: Fetches `bukkit.yml`, `spigot.yml`, and server-specific configs (`paper-global.yml`, `purpur.yml`, `pufferfish.yml`) on startup.
|
||||
- **Version Aware**: Downloads configurations from a folder matching your Minecraft version (e.g., `1.21.1`).
|
||||
- **Base `server.properties`**: Optionally download a base `server.properties` file while still allowing environment variable overrides.
|
||||
|
||||
## Repository Structure
|
||||
|
||||
Your configuration repository should be structured by Minecraft version. For example:
|
||||
|
||||
```text
|
||||
my-config-repo/
|
||||
├── 1.21.1/
|
||||
│ ├── bukkit.yml
|
||||
│ ├── spigot.yml
|
||||
│ ├── purpur.yml
|
||||
│ ├── pufferfish.yml
|
||||
│ └── server.properties
|
||||
├── 1.20.4/
|
||||
│ └── ...
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## Docker Compose Examples
|
||||
|
||||
### 1. Paper Server
|
||||
|
||||
For Paper, use `PAPER_CONFIG_REPO`.
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "PAPER"
|
||||
VERSION: "1.21.1"
|
||||
|
||||
# URL to the root of your config repository (e.g. raw.githubusercontent.com)
|
||||
# The script automatically appends "/<VERSION>/<FILE>" to this URL.
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/refs/heads/main"
|
||||
```
|
||||
|
||||
### 2. Purpur Server
|
||||
|
||||
For Purpur, use `PURPUR_CONFIG_REPO`.
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "PURPUR"
|
||||
VERSION: "1.21.1"
|
||||
|
||||
# URL to the root of your config repository (e.g. raw.githubusercontent.com)
|
||||
# The script automatically appends "/<VERSION>/<FILE>" to this URL.
|
||||
PURPUR_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/refs/heads/main"
|
||||
```
|
||||
|
||||
### 2. Pufferfish Server
|
||||
|
||||
For Pufferfish, use `PUFFERFISH_CONFIG_REPO`.
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "PUFFERFISH"
|
||||
VERSION: "1.21.1" # Must match a folder in your repo
|
||||
|
||||
# Automagically download optimized configs (bukkit.yml, spigot.yml, pufferfish.yml)
|
||||
PUFFERFISH_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/refs/heads/main"
|
||||
```
|
||||
|
||||
### 3. Downloading `server.properties` (Optional)
|
||||
|
||||
If you also want to download a base `server.properties` file from your repository, you must explicitly set `SERVER_PROPERTIES_REPO_URL`.
|
||||
|
||||
**Smart Feature**:
|
||||
|
||||
- If you provide a **base URL** (like the repo root), the script will automatically append `/<VERSION>/server.properties`.
|
||||
- If you provide a **full URL** (ending in `.properties`), it will download that specific file.
|
||||
|
||||
**Crucial Note**: Environment variables (like `MOTD`, `DIFFICULTY`, `MAX_PLAYERS`) in your Docker Compose **WILL override** values in the downloaded file. This allows you to have a shared optimized base but customize specifics per instance.
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
# ... other vars ...
|
||||
|
||||
# Option A: Base URL (Smart)
|
||||
# Will look for: https://.../main/1.21.1/server.properties
|
||||
SERVER_PROPERTIES_REPO_URL: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/refs/heads/main"
|
||||
|
||||
# Option B: Specific URL (Manual)
|
||||
# SERVER_PROPERTIES_REPO_URL: "https://gist.githubusercontent.com/.../server.properties"
|
||||
|
||||
# These will OVERRIDE settings in the downloaded file
|
||||
MOTD: "My Custom Instance"
|
||||
MAX_PLAYERS: 50
|
||||
```
|
||||
|
||||
## Supported Variables
|
||||
|
||||
| Variable | Description |
|
||||
| :--- | :--- |
|
||||
| `PAPER_CONFIG_REPO` | Base URL for Paper configs. Downloads `paper-global.yml`, `bukkit.yml`, `spigot.yml`, etc. |
|
||||
| `PURPUR_CONFIG_REPO` | Base URL for Purpur configs. Downloads `purpur.yml`, `bukkit.yml`, `spigot.yml`. |
|
||||
| `PUFFERFISH_CONFIG_REPO` | Base URL for Pufferfish configs. Downloads `pufferfish.yml`, `bukkit.yml`, `spigot.yml`. |
|
||||
| `SERVER_PROPERTIES_REPO_URL` | Boolean/URL. Set to download `server.properties`. Can be a base URL or direct file link. |
|
||||
|
||||
## Contribution
|
||||
|
||||
Got ideas to squeeze even more performance out of these configs? Or maybe you found a better way to structure things?
|
||||
|
||||
I'd love to see your improvements! Feel free to open a Pull Request or an Issue in the [repository](https://github.com/Alpha018/paper-config-optimized). Let's make these configs the best they can be together.
|
||||
@@ -35,6 +35,8 @@
|
||||
"controllable",
|
||||
"controlling",
|
||||
"craftpresence",
|
||||
"crash-assistant",
|
||||
"cull-less-leaves",
|
||||
"ctm",
|
||||
"custom-main-menu",
|
||||
"dark-mode-everywhere",
|
||||
@@ -99,13 +101,16 @@
|
||||
"lootbeams",
|
||||
"magnesium-extras",
|
||||
"make-bubbles-pop",
|
||||
"mekalus-oculus-fork-with-fixed-mekanism-mekasuit",
|
||||
"menumobs",
|
||||
"minecraft-rich-presence",
|
||||
"mining-speed-tooltips",
|
||||
"model-gap-fix",
|
||||
"more-overlays",
|
||||
"mouse-tweaks",
|
||||
"neat",
|
||||
"nekos-enchanted-books",
|
||||
"neoculus",
|
||||
"no-nv-flash",
|
||||
"no-recipe-book",
|
||||
"not-enough-animations",
|
||||
@@ -148,6 +153,7 @@
|
||||
"sound-filters",
|
||||
"sound-physics-remastered",
|
||||
"sound-reloader",
|
||||
"status-effect-bars-reforged",
|
||||
"stellar-sky",
|
||||
"swingthroughgrass",
|
||||
"textrues-embeddium-options",
|
||||
@@ -179,6 +185,12 @@
|
||||
"create-arcane-engineering": {
|
||||
"forceIncludes": ["just-enough-resources-jer"]
|
||||
},
|
||||
"ftb-stoneblock-4": {
|
||||
"forceIncludes": [
|
||||
"particular-reforged",
|
||||
"ctm"
|
||||
]
|
||||
},
|
||||
"mc-eternal-2": {
|
||||
"forceIncludes": [
|
||||
"particular-reforged",
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN">
|
||||
<Appenders>
|
||||
<Console name="SysOut" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
</Console>
|
||||
<Queue name="TerminalConsole">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
|
||||
</Queue>
|
||||
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
<Policies>
|
||||
<!-- Based on filePattern resolution, so daily -->
|
||||
<TimeBasedTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="100 MB" />
|
||||
<OnStartupTriggeringPolicy />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy>
|
||||
<Delete basePath="logs">
|
||||
<IfFileName glob="*.log.gz" />
|
||||
<IfLastModified age="7d" />
|
||||
<IfAccumulatedFileCount exceeds="20"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="info">
|
||||
<filters>
|
||||
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
|
||||
</filters>
|
||||
<AppenderRef ref="SysOut"/>
|
||||
<AppenderRef ref="File"/>
|
||||
<AppenderRef ref="TerminalConsole"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
@@ -32,6 +32,8 @@
|
||||
"continuity",
|
||||
"controlling",
|
||||
"craftpresence",
|
||||
"CrashAssistant",
|
||||
"Cull Less Leaves",
|
||||
"cwb",
|
||||
"DisableCustomWorldsAdvice",
|
||||
"distraction_free_recipes",
|
||||
@@ -71,6 +73,7 @@
|
||||
"loadmyresources",
|
||||
"lootbeams",
|
||||
"MindfulDarkness",
|
||||
"miningspeedtooltips",
|
||||
"MouseTweaks",
|
||||
"nicer-skies",
|
||||
"notenoughanimations",
|
||||
|
||||
12
files/nanolimbo-settings-patch.json
Normal file
12
files/nanolimbo-settings-patch.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"file": "/data/settings.yml",
|
||||
"ops": [
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.bind.port",
|
||||
"value": "${SERVER_PORT}",
|
||||
"value-type": "int"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
17
images.json
17
images.json
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"tag": "latest",
|
||||
"notes": "Always tracks the most recent commit on the main branch",
|
||||
"java": "21",
|
||||
"java": "25",
|
||||
"distribution": "ubuntu",
|
||||
"jvm": "hotspot",
|
||||
"architectures": ["amd64", "arm64"],
|
||||
@@ -11,7 +11,7 @@
|
||||
{
|
||||
"tag": "stable",
|
||||
"notes": "Always tracks the most recent release",
|
||||
"java": "21",
|
||||
"java": "25",
|
||||
"distribution": "ubuntu",
|
||||
"jvm": "hotspot",
|
||||
"architectures": ["amd64", "arm64"],
|
||||
@@ -77,13 +77,6 @@
|
||||
"architectures": ["amd64", "arm64"],
|
||||
"jdk": true
|
||||
},
|
||||
{
|
||||
"tag": "java21-graalvm",
|
||||
"java": "21",
|
||||
"distribution": "oracle",
|
||||
"jvm": "graalvm",
|
||||
"architectures": ["amd64", "arm64"]
|
||||
},
|
||||
{
|
||||
"tag": "java17",
|
||||
"java": "17",
|
||||
@@ -97,7 +90,8 @@
|
||||
"java": "17",
|
||||
"distribution": "alpine",
|
||||
"jvm": "hotspot",
|
||||
"architectures": ["amd64", "arm64"]
|
||||
"architectures": ["amd64", "arm64"],
|
||||
"deprecated": true
|
||||
},
|
||||
{
|
||||
"tag": "java17-graalvm",
|
||||
@@ -147,4 +141,5 @@
|
||||
{"tag": "java8-jdk", "deprecated": true},
|
||||
{"tag": "java8-openj9", "deprecated": true},
|
||||
{"tag": "java8-graalvm-ce", "deprecated": true}
|
||||
]
|
||||
|
||||
]
|
||||
|
||||
96
mkdocs.yml
96
mkdocs.yml
@@ -1,96 +0,0 @@
|
||||
---
|
||||
site_name: Minecraft Server on Docker (Java Edition)
|
||||
site_url: https://docker-minecraft-server.readthedocs.io/en/latest/
|
||||
site_description: Documentation for Minecraft Server on Docker
|
||||
repo_url: https://github.com/itzg/docker-minecraft-server
|
||||
edit_uri: blob/master/docs/
|
||||
theme:
|
||||
name: material
|
||||
features:
|
||||
- navigation.tracking
|
||||
- navigation.tabs
|
||||
- navigation.tabs.sticky
|
||||
- navigation.sections
|
||||
- navigation.expand
|
||||
- navigation.top
|
||||
- navigation.indexes
|
||||
locale: en
|
||||
palette:
|
||||
|
||||
# Palette toggle for automatic mode
|
||||
- media: "(prefers-color-scheme)"
|
||||
toggle:
|
||||
icon: material/brightness-auto
|
||||
name: Switch to light mode
|
||||
|
||||
# Palette toggle for light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
toggle:
|
||||
icon: material/brightness-7
|
||||
name: Switch to dark mode
|
||||
|
||||
# Palette toggle for dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
toggle:
|
||||
icon: material/brightness-4
|
||||
name: Switch to system preference
|
||||
|
||||
highlightjs: true
|
||||
hljs_languages:
|
||||
- yaml
|
||||
- bash
|
||||
- java
|
||||
- docker
|
||||
- shell
|
||||
- json
|
||||
|
||||
extra_css:
|
||||
- css/extra.css
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- toc:
|
||||
permalink: true
|
||||
- attr_list
|
||||
- def_list
|
||||
- footnotes
|
||||
- tables
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
line_spans: __span
|
||||
pygments_lang_class: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.details
|
||||
- pymdownx.snippets
|
||||
- pymdownx.superfences
|
||||
- mdx_gh_links:
|
||||
user: camalot
|
||||
repo: mkdocs-test
|
||||
- mkdocs-click
|
||||
copyright: Copyright © itzg 2024.
|
||||
plugins:
|
||||
- search
|
||||
- autorefs
|
||||
- mkdocstrings:
|
||||
handlers:
|
||||
python:
|
||||
options:
|
||||
docstring_section_style: list
|
||||
members_order: source
|
||||
show_root_heading: true
|
||||
show_source: false
|
||||
show_signature_annotations: true
|
||||
# https://github.com/ultrabug/mkdocs-static-i18n
|
||||
- i18n:
|
||||
languages:
|
||||
- locale: en
|
||||
name: English
|
||||
build: true
|
||||
default: true
|
||||
- literate-nav:
|
||||
nav_file: README.md
|
||||
implicit_index: true
|
||||
16
renovate.json5
Normal file
16
renovate.json5
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"enabledManagers": [
|
||||
"custom.regex"
|
||||
],
|
||||
"customManagers": [
|
||||
{
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["/^Dockerfile$/"],
|
||||
"matchStrings": [
|
||||
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: packageName=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s"
|
||||
]
|
||||
}
|
||||
],
|
||||
"labels": ["dependencies"]
|
||||
}
|
||||
@@ -28,7 +28,11 @@ shopt -s nullglob
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
#umask 002
|
||||
if (( $(mc-image-helper java-release) >= 17 )); then
|
||||
MC_IMAGE_HELPER_OPTS+=" --enable-native-access=ALL-UNNAMED"
|
||||
export MC_IMAGE_HELPER_OPTS
|
||||
fi
|
||||
|
||||
export HOME=/data
|
||||
|
||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
@@ -91,11 +95,6 @@ fi
|
||||
##########################################
|
||||
# Auto-pause/stop
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
logError "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
logError "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
|
||||
exit 1
|
||||
@@ -190,7 +189,7 @@ if [[ $MODPACK_PLATFORM && $TYPE && $TYPE != VANILLA ]]; then
|
||||
fi
|
||||
|
||||
case "${TYPE^^}" in
|
||||
AUTO_CURSEFORGE|MODRINTH|CURSEFORGE|FTB|FTBA)
|
||||
AUTO_CURSEFORGE|MODRINTH|CURSEFORGE|FTB|FTBA|GTNH)
|
||||
MODPACK_PLATFORM="$TYPE"
|
||||
;;
|
||||
esac
|
||||
@@ -213,6 +212,10 @@ if [[ $MODPACK_PLATFORM ]]; then
|
||||
exec "$(dirname "$0")/start-deployModrinth" "$@"
|
||||
;;
|
||||
|
||||
GTNH)
|
||||
exec "$(dirname "$0")/start-deployGTNH" "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
logError "Invalid MODPACK_PLATFORM: '$MODPACK_PLATFORM'"
|
||||
exit 1
|
||||
@@ -278,10 +281,6 @@ case "${TYPE^^}" in
|
||||
exec "$(dirname "$0")/start-deployMohist" "$@"
|
||||
;;
|
||||
|
||||
CATSERVER)
|
||||
exec "$(dirname "$0")/start-deployCatserver" "$@"
|
||||
;;
|
||||
|
||||
PURPUR)
|
||||
exec "$(dirname "$0")/start-deployPurpur" "$@"
|
||||
;;
|
||||
@@ -321,8 +320,8 @@ case "${TYPE^^}" in
|
||||
*)
|
||||
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, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
|
||||
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, GTNH, AIRPLANE, PUFFERFISH,"
|
||||
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER, NEOFORGE"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
|
||||
4
scripts/start-deployAutoCF
Normal file → Executable file
4
scripts/start-deployAutoCF
Normal file → Executable file
@@ -14,6 +14,7 @@ set -eu
|
||||
: "${CF_IGNORE_MISSING_FILES:=}"
|
||||
: "${CF_EXCLUDE_INCLUDE_FILE=/image/cf-exclude-include.json}"
|
||||
: "${CF_EXCLUDE_MODS:=}"
|
||||
: "${CF_EXCLUDE_ALL_MODS:=}"
|
||||
: "${CF_FORCE_INCLUDE_MODS:=}"
|
||||
: "${CF_SET_LEVEL_FROM:=}" # --set-level-from
|
||||
: "${CF_OVERRIDES_SKIP_EXISTING:=false}" # --overrides-skip-existing
|
||||
@@ -22,6 +23,7 @@ set -eu
|
||||
: "${CF_MODPACK_MANIFEST:=}"
|
||||
: "${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
|
||||
: "${CF_MOD_LOADER_VERSION:=}" # Override mod loader version
|
||||
|
||||
resultsFile=/data/.install-curseforge.env
|
||||
|
||||
@@ -63,8 +65,10 @@ 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 --exclude-all-mods CF_EXCLUDE_ALL_MODS
|
||||
setArg --force-include-mods CF_FORCE_INCLUDE_MODS
|
||||
setArg --exclude-include-file CF_EXCLUDE_INCLUDE_FILE
|
||||
setArg --mod-loader-version CF_MOD_LOADER_VERSION
|
||||
setArg --downloads-repo CF_DOWNLOADS_REPO
|
||||
|
||||
if ! mc-image-helper install-curseforge "${args[@]}"; then
|
||||
|
||||
@@ -28,7 +28,19 @@ function buildSpigotFromSource {
|
||||
mkdir ${tempDir}
|
||||
cd ${tempDir}
|
||||
|
||||
jvmOpts="-Xms${INIT_MEMORY:-$MEMORY} -Xmx${MAX_MEMORY:-$MEMORY}"
|
||||
jvmOpts=""
|
||||
|
||||
if isPercentage "${INIT_MEMORY:-$MEMORY}"; then
|
||||
jvmOpts+="-XX:InitialRAMPercentage=$(getPercentageValue "${INIT_MEMORY:-$MEMORY}") "
|
||||
else
|
||||
jvmOpts+="-Xms${INIT_MEMORY:-$MEMORY} "
|
||||
fi
|
||||
|
||||
if isPercentage "${MAX_MEMORY:-$MEMORY}"; then
|
||||
jvmOpts+="-XX:MaxRAMPercentage=$(getPercentageValue "${MAX_MEMORY:-$MEMORY}")"
|
||||
else
|
||||
jvmOpts+="-Xmx${MAX_MEMORY:-$MEMORY}"
|
||||
fi
|
||||
|
||||
logn ''
|
||||
curl -sSL -o ${tempDir}/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
|
||||
latestAsset=$(
|
||||
curl -fsSL https://api.github.com/repos/Luohuayu/CatServer/releases/latest | \
|
||||
jq '.assets[] | select(.name | match(".*-universal.jar"))'
|
||||
)
|
||||
|
||||
if [[ -z "${latestAsset}" ]]; then
|
||||
logError "Latest release of Catserver is missing universal.jar asset"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
isDebugging && log "Latest asset ${latestAsset}"
|
||||
latestJarName=$(echo ${latestAsset} | jq --raw-output '.name')
|
||||
latestJarId=$(echo ${latestAsset} | jq --raw-output '.id')
|
||||
|
||||
|
||||
export SERVER="/data/${latestJarName}"
|
||||
|
||||
if [ ! -f ${SERVER} ]; then
|
||||
log "Downloading ${latestJarName}"
|
||||
curl -H "Accept:application/octet-stream" -o "$SERVER" -fsSL https://api.github.com/repos/Luohuayu/CatServer/releases/assets/${latestJarId}
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
export HYBRIDTYPE=forge
|
||||
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
@@ -93,7 +93,7 @@ if isTrue "$FTB_FORCE_REINSTALL" ||
|
||||
|
||||
log "Installing modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID}"
|
||||
log "This could take a while..."
|
||||
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force | tee ftb-installer.log
|
||||
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force -no-java | tee ftb-installer.log
|
||||
rm -f forge*installer.jar
|
||||
|
||||
echo "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" > ${ftbInstallMarker}
|
||||
|
||||
2
scripts/start-deployFolia
Normal file → Executable file
2
scripts/start-deployFolia
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${FOLIA_CHANNEL:=experimental}"
|
||||
: "${FOLIA_CHANNEL:=default}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
282
scripts/start-deployGTNH
Executable file
282
scripts/start-deployGTNH
Executable file
@@ -0,0 +1,282 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
# Define setup functions
|
||||
function getGTNHdownloadPath(){
|
||||
gtnh_download_path=""
|
||||
current_java_version=$(mc-image-helper java-release)
|
||||
|
||||
if ! packs_data="$(restify --tag=a https://www.gtnewhorizons.com/version-history/ | jq -r '.[].href | select(test("Server"))')"; then
|
||||
logError "Failed to retrieve data from http://downloads.gtnewhorizons.com/ServerPacks/?raw"
|
||||
exit 1
|
||||
fi
|
||||
mapfile -t packs <<< "$packs_data"
|
||||
|
||||
log "Start locating server files..."
|
||||
for pack in "${packs[@]}"; do
|
||||
# Extract the Java version(s) from the pack filename
|
||||
if ! pack_java_version=$(basename "$pack" | grep -Eo 'Java_[0-9]+(-[0-9]+)?' | sed 's/Java_//'); then
|
||||
logWarning "Could not parse java version of $pack"
|
||||
fi
|
||||
|
||||
# Skip the pack if the current Java version is not compatible
|
||||
if [[ "$pack_java_version" == *-* ]]; then
|
||||
# Handle range of Java versions (e.g., "17-21")
|
||||
java_min_version=$(echo "$pack_java_version" | cut -d'-' -f1)
|
||||
java_max_version=$(echo "$pack_java_version" | cut -d'-' -f2)
|
||||
if (( current_java_version < java_min_version || current_java_version > java_max_version )); then
|
||||
debug "Skipping $pack due to incompatible Java version: $current_java_version not in range $java_min_version-$java_max_version"
|
||||
continue
|
||||
fi
|
||||
else
|
||||
# Handle single Java version (e.g., "8")
|
||||
if (( current_java_version != pack_java_version )); then
|
||||
debug "Skipping $pack due to incompatible Java version: $current_java_version != $pack_java_version"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# Extract version numbers and release type (beta or RC) from the file names
|
||||
|
||||
if ! pack_version=$(basename "$pack" | grep -Eo '[0-9]+(\.[0-9]+)+'); then
|
||||
logWarning "Could not parse version of $pack"
|
||||
fi
|
||||
if ! pack_release_type=$(basename "$pack" | grep -Eo '(beta|RC)(-[0-9]+)?' || echo ""); then
|
||||
logWarning "Could not parse release type of $pack"
|
||||
fi
|
||||
if ! current_version=$(basename "$gtnh_download_path" | grep -Eo '[0-9]+(\.[0-9]+)+'); then
|
||||
debug "Could not parse version of selected download path. String might be empty."
|
||||
fi
|
||||
if ! current_release_type=$(basename "$gtnh_download_path" | grep -Eo '(beta|RC)(-[0-9]+)?' || echo ""); then
|
||||
debug "Could not parse release type of selected download path. String might be empty."
|
||||
fi
|
||||
# Check if the pack matches the desired type based on GTNH_PACK_VERSION:
|
||||
# - If GTNH_PACK_VERSION is "latest-dev", only consider beta packs (path contains "/betas/").
|
||||
# - If GTNH_PACK_VERSION is "latest", only consider non-beta packs (path does not contain "/betas/").
|
||||
if [[ ($pack == *"/betas/"* && $GTNH_PACK_VERSION == "latest-dev") || ($pack != *"/betas/"* && $GTNH_PACK_VERSION == "latest") ]]; then
|
||||
# Compare versions and update gtnh_download_path if pack is newer
|
||||
# Check if the current version is unset or if the pack version is newer than the current version.
|
||||
# This comparison uses version sorting to determine the latest version.
|
||||
if [[ -z "$current_version" || "$(printf '%s\n' "$pack_version" "$current_version" | sort -V | tail -n 1)" == "$pack_version" ]]; then
|
||||
|
||||
# If the pack version is the same as the current version, prioritize based on release type.
|
||||
# Full versions are preferred over RC (Release Candidate), and RC is preferred over beta.
|
||||
# Within the same release type, higher numbered versions are preferred.
|
||||
if [[ "$pack_version" == "$current_version" ]]; then
|
||||
if [[ -z "$pack_release_type" || ("$pack_release_type" == "RC" && "$current_release_type" == "beta") ||
|
||||
("$pack_release_type" == "$current_release_type" && "$(printf '%s\n' "$pack_release_type" "$current_release_type" | sort -V | tail -n 1)" == "$pack_release_type") ]]; then
|
||||
debug "$current_version-$current_release_type is older than $pack_version-$pack_release_type! Update latest version to: $pack_version-$pack_release_type"
|
||||
gtnh_download_path="$pack"
|
||||
fi
|
||||
else
|
||||
# If the pack version is newer than the current version, set it as the download path.
|
||||
debug "$current_version is older than $pack_version! Update latest version to: $pack_version"
|
||||
gtnh_download_path="$pack"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ "$pack_version" == "$GTNH_PACK_VERSION" || "$pack_version-$pack_release_type" == "$GTNH_PACK_VERSION" ]]; then
|
||||
log "Found exact match $pack_version = $GTNH_PACK_VERSION! Select $pack_version for download."
|
||||
gtnh_download_path="$pack"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function deleteGTNHbackup(){
|
||||
log "Start deleting all config backups"
|
||||
if ! find . -maxdepth 1 -type d -name 'gtnh-upgrade-*' -exec rm -rf {} + ; then
|
||||
logWarning "Can not delete config backup!"
|
||||
fi
|
||||
}
|
||||
|
||||
function updateGTNH(){
|
||||
# Get the current date and time
|
||||
current_datetime=$(date +%Y-%m-%dT%H:%M)
|
||||
|
||||
# Define folders and files to update
|
||||
folders_to_update=("libraries" "mods" "resources" "scripts")
|
||||
files_to_update=("lwjgl3ify-forgePatches.jar" "java9args.txt" "startserver-java9.bat" "startserver-java9.sh" "forge-1.7.10-10.13.4.1614-1.7.10-universal.jar" "startserver.bat" "startserver.sh" "server-icon.png")
|
||||
config_folder="config"
|
||||
backup_folder="/data/gtnh-upgrade-${current_version}${current_release_type:+-$current_release_type}-$current_datetime"
|
||||
journey_map_folder="JourneyMapServer"
|
||||
|
||||
# Delete specified folders if they exist
|
||||
for folder in "${folders_to_update[@]}"; do
|
||||
folder_path="/data/$folder"
|
||||
if [[ -d "$folder_path" ]]; then
|
||||
log "Deleting folder: $folder_path"
|
||||
rm -rf "$folder_path"
|
||||
fi
|
||||
done
|
||||
|
||||
# Delete specific files if they exist
|
||||
for file in "${files_to_update[@]}"; do
|
||||
file_path="/data/$file"
|
||||
if [[ -f "$file_path" ]]; then
|
||||
log "Deleting file: $file_path"
|
||||
rm -f "$file_path"
|
||||
fi
|
||||
done
|
||||
|
||||
# Backup the config folder
|
||||
if [[ -d "/data/$config_folder" ]]; then
|
||||
log "Creating backup of /data/$config_folder at $backup_folder"
|
||||
cp -r "/data/$config_folder" "$backup_folder"
|
||||
log "Deleting original /data/$config_folder"
|
||||
rm -rf "/data/$config_folder"
|
||||
fi
|
||||
|
||||
# Updating the required folders in data directory
|
||||
for folder in "${folders_to_update[@]}" "$config_folder"; do
|
||||
if [[ -d "$base_dir/$folder" ]]; then
|
||||
log "Copying $folder to /data"
|
||||
cp -r "$base_dir/$folder" "/data/"
|
||||
else
|
||||
logWarning "Folder $folder not found in the unzipped data!"
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy specific files to the /data directory
|
||||
for file in "${files_to_update[@]}"; do
|
||||
if [[ -f "$base_dir/$file" ]]; then
|
||||
log "Copying $file to /data"
|
||||
cp "$base_dir/$file" "/data/"
|
||||
else
|
||||
logWarning "File $file not found in the unzipped data!"
|
||||
fi
|
||||
done
|
||||
|
||||
# Ensure the config folder exists
|
||||
if [[ ! -d "$config_folder" ]]; then
|
||||
log "$config_folder does not exist. Creating it now."
|
||||
mkdir -p "$config_folder"
|
||||
fi
|
||||
|
||||
# Restore JourneyMapServer folder from backup
|
||||
if [[ -d "$backup_folder/$journey_map_folder" ]]; then
|
||||
log "Restoring $journey_map_folder to $config_folder"
|
||||
cp -r "$backup_folder/$journey_map_folder" "$config_folder/"
|
||||
else
|
||||
logWarning "$journey_map_folder not found in backup!"
|
||||
fi
|
||||
|
||||
# Copy the changelog file to /data
|
||||
gtnh_changelog_file=$(mc-image-helper find --max-depth=1 --type=file --name=changelog*.md "$base_dir")
|
||||
if [[ -n "$gtnh_changelog_file" ]]; then
|
||||
log "Copying changelog file to /data"
|
||||
cp -f "$gtnh_changelog_file" /data/
|
||||
fi
|
||||
}
|
||||
|
||||
function handleGTNH() {
|
||||
|
||||
: "${GTNH_PACK_VERSION:=latest}"
|
||||
: "${GTNH_DELETE_BACKUPS:=false}"
|
||||
: "${SKIP_GTNH_UPDATE_CHECK:=false}"
|
||||
debug "GTNH VAR CHECK: GTNH_DELETE_BACKUPS=$GTNH_DELETE_BACKUPS, GTNH_PACK_VERSION=$GTNH_PACK_VERSION, TYPE=$TYPE, SKIP_GTNH_UPDATE_CHECK=$SKIP_GTNH_UPDATE_CHECK"
|
||||
|
||||
if isTrue "$GTNH_DELETE_BACKUPS"; then
|
||||
deleteGTNHbackup
|
||||
fi
|
||||
|
||||
if [[ -n $GTNH_PACK_VERSION ]] && isFalse "$SKIP_GTNH_UPDATE_CHECK" ; then
|
||||
|
||||
getGTNHdownloadPath
|
||||
|
||||
if [[ -z $gtnh_download_path ]]; then
|
||||
logError "Server files not found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION! Download not possible!"
|
||||
exit 1
|
||||
fi
|
||||
log "Server files located! Will proceed update $gtnh_download_path."
|
||||
|
||||
# Decide if update or install is needed or not.
|
||||
if [[ ! -f /data/.gtnh-version || "$(basename "$gtnh_download_path")" != "$(cat /data/.gtnh-version)" ]]; then
|
||||
log "Update/Install required: /data/.gtnh-version is missing or does not match the selected version $(basename "$gtnh_download_path")."
|
||||
|
||||
mkdir -p /data/packs
|
||||
log "Downloading $gtnh_download_path."
|
||||
if ! gtnh_download=$(mc-image-helper get -o /data/packs --output-filename --skip-up-to-date "$gtnh_download_path"); then
|
||||
logError "Failed to download $gtnh_download_path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Unpacking Server files into temporary directory
|
||||
log "Unpacking Server Files..."
|
||||
original_base_dir=/data/.tmp/gtnh_base
|
||||
base_dir=$original_base_dir
|
||||
rm -rf "${base_dir}"
|
||||
mkdir -p "${base_dir}"
|
||||
extract "${gtnh_download}" "${base_dir}"
|
||||
trap 'rm -rf /data/.tmp' EXIT
|
||||
# Removing downloaded zip
|
||||
rm -f "$gtnh_download"
|
||||
|
||||
# Remove any eula file since container manages it
|
||||
rm -f "${base_dir}/eula.txt"
|
||||
|
||||
# recalculate the actual base directory of content
|
||||
if ! base_dir=$(mc-image-helper find \
|
||||
--max-depth=3 --type=directory --name=mods,config \
|
||||
--only-shallowest --fail-no-matches --format '%h' \
|
||||
"$base_dir"); then
|
||||
logError "Unable to find content base of downloaded Server Files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Split installation from update path. Check for version file.
|
||||
if [[ -f /data/.gtnh-version ]]; then
|
||||
log ".gtnh-version file detected! Assuming old version already exists. Proceed updating existing server..."
|
||||
updateGTNH
|
||||
else
|
||||
log "No .gtnh-version file detected! Assuming no old server exists. Proceed installing new server..."
|
||||
cp -R -f "${base_dir}"/* /data
|
||||
fi
|
||||
# Update .gtnh-version
|
||||
basename "$gtnh_download_path" > /data/.gtnh-version
|
||||
# Cleaning up
|
||||
rm -rf "$original_base_dir"
|
||||
|
||||
else
|
||||
log "No update required: /data/.gtnh-version matches the selected version $(basename "$gtnh_download_path")."
|
||||
fi
|
||||
else
|
||||
log "SKIP_GTNH_UPDATE_CHECK=$SKIP_GTNH_UPDATE_CHECK ... Skipping GTNH Update/Install"
|
||||
fi
|
||||
}
|
||||
|
||||
# Set server.properties defaults suitable for gtnh servers
|
||||
log "Applying GTNH optimized server defaults"
|
||||
export ALLOW_FLIGHT="${ALLOW_FLIGHT:=true}"
|
||||
export LEVEL_TYPE="${LEVEL_TYPE:=rwg}"
|
||||
export DIFFICULTY="${DIFFICULTY:=3}"
|
||||
export ENABLE_COMMAND_BLOCK="${ENABLE_COMMAND_BLOCK:=true}"
|
||||
export MOTD="${MOTD:="Greg Tech New Horizons $GTNH_PACK_VERSION"}"
|
||||
debug "Set MOTD=$MOTD, ENABLE_COMMAND_BLOCK=$ENABLE_COMMAND_BLOCK, DIFFICULTY=$DIFFICULTY, LEVEL_TYPE=$LEVEL_TYPE, ALLOW_FLIGHT=$ALLOW_FLIGHT"
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
ensureRemoveAllModsOff "MODPACK_PLATFORM=GTNH"
|
||||
|
||||
java_version=$(mc-image-helper java-release)
|
||||
if (( java_version == 8 )); then
|
||||
export SERVER=/data/forge-1.7.10-10.13.4.1614-1.7.10-universal.jar
|
||||
elif (( java_version >= 17 )); then
|
||||
export SERVER=/data/lwjgl3ify-forgePatches.jar
|
||||
else
|
||||
logError "Greg Tech New Horizons only supports the following Java versions: 8, 17 or later"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "TYPE=GTNH, setting Minecraft version to 1.7.10"
|
||||
export VERSION=1.7.10
|
||||
|
||||
# Start setup gtnh server files
|
||||
handleGTNH
|
||||
|
||||
export USES_MODS=true
|
||||
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
0
scripts/start-deployLeaf
Normal file → Executable file
0
scripts/start-deployLeaf
Normal file → Executable file
@@ -8,18 +8,14 @@ isDebugging && set -x
|
||||
|
||||
resolveVersion
|
||||
|
||||
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VERSION}/latest/${MAGMA_VERSION}"); then
|
||||
logError "Failed to locate latest Magma download for ${VERSION}. Is that version supported?"
|
||||
exit 1
|
||||
# Neo Magma currently supports just 1.21.x
|
||||
if [[ ! $VERSION = 1.21.* ]]; then
|
||||
logError "Magma does not support $VERSION (expected 1.21.x)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl == null ]]; then
|
||||
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
|
||||
logError "Failed to download Magma server jar from $downloadUrl"
|
||||
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "https://magmafoundation.org/api/versions/${MAGMA_VERSION}/download"); then
|
||||
logError "Failed to download Magma server jar for $MAGMA_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
0
scripts/start-deployModrinth
Normal file → Executable file
0
scripts/start-deployModrinth
Normal file → Executable file
@@ -14,11 +14,12 @@ if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
fi
|
||||
|
||||
: "${SERVER_PORT:=25565}"
|
||||
cat <<EOF > /data/settings.yml
|
||||
|
||||
if [ ! -f /data/settings.yml ]; then
|
||||
cat <<EOF > /data/settings.yml
|
||||
#
|
||||
# NanoLimbo configuration
|
||||
#
|
||||
|
||||
# Server's host address and port. Set ip empty to use public address
|
||||
bind:
|
||||
ip: '0.0.0.0'
|
||||
@@ -157,8 +158,11 @@ traffic:
|
||||
# Ignored if -1.0
|
||||
maxPacketBytesRate: 2048.0
|
||||
EOF
|
||||
fi
|
||||
|
||||
mc-image-helper patch --patch-env-prefix "" /image/nanolimbo-settings-patch.json
|
||||
|
||||
export SERVER
|
||||
export FAMILY=LIMBO
|
||||
|
||||
exec "$(dirname "$0")/start-setupMounts" "$@"
|
||||
exec "$(dirname "$0")/start-setupMounts" "$@"
|
||||
12
scripts/start-deployNeoForge
Normal file → Executable file
12
scripts/start-deployNeoForge
Normal file → Executable file
@@ -2,6 +2,7 @@
|
||||
|
||||
: "${NEOFORGE_VERSION:=latest}"
|
||||
: "${NEOFORGE_FORCE_REINSTALL:=false}}"
|
||||
: "${NEOFORGE_INSTALLER:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
@@ -9,14 +10,19 @@ isDebugging && set -x
|
||||
|
||||
resultsFile=/data/.run-neoforge.env
|
||||
|
||||
if ! mc-image-helper install-neoforge \
|
||||
if [[ ${NEOFORGE_INSTALLER} ]]; then
|
||||
if ! mc-image-helper install-neoforge --neoforge-installer="${NEOFORGE_INSTALLER}" --output-directory=/data --results-file=${resultsFile} --minecraft-version="${VERSION}" --force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
|
||||
logError "Failed to installForge given installer ${NEOFORGE_INSTALLER}"
|
||||
exit 1
|
||||
fi
|
||||
elif ! mc-image-helper install-neoforge \
|
||||
--output-directory=/data \
|
||||
--results-file=${resultsFile} \
|
||||
--minecraft-version="${VERSION}" \
|
||||
--neoforge-version="${NEOFORGE_VERSION}" \
|
||||
--force-reinstall="${NEOFORGE_FORCE_REINSTALL}"; then
|
||||
logError "Failed to install NeoForge"
|
||||
exit 1
|
||||
logError "Failed to install NeoForge"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
0
scripts/start-deployPoseidon
Normal file → Executable file
0
scripts/start-deployPoseidon
Normal file → Executable file
@@ -41,6 +41,11 @@ if [[ ! -f "$SERVER" ]] || isTrue "${FORCE_REDOWNLOAD:-false}"; then
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
if [[ "${PUFFERFISH_CONFIG_REPO}" ]]; then
|
||||
defaultTopLevelConfigs=(bukkit.yml spigot.yml pufferfish.yml)
|
||||
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PUFFERFISH_CONFIG_REPO" "$VERSION" "${defaultTopLevelConfigs[@]}")
|
||||
export DOWNLOAD_DEFAULTS
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
@@ -4,6 +4,7 @@ IFS=$'\n\t'
|
||||
|
||||
: "${PURPUR_BUILD:=LATEST}"
|
||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||
: "${PURPUR_CONFIG_REPO:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
@@ -36,6 +37,12 @@ fi
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
if [[ "${PURPUR_CONFIG_REPO}" ]]; then
|
||||
defaultTopLevelConfigs=(bukkit.yml spigot.yml purpur.yml)
|
||||
DOWNLOAD_DEFAULTS=$(buildDownloadList "$PURPUR_CONFIG_REPO" "$VERSION" "${defaultTopLevelConfigs[@]}")
|
||||
export DOWNLOAD_DEFAULTS
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ if [ -n "$ICON" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
canUseRollingLogs=true
|
||||
useGeneratedLogs=${GENERATE_LOG4J2_CONFIG:-${ENABLE_ROLLING_LOGS:-false}}
|
||||
useFallbackJvmFlag=false
|
||||
|
||||
SERVER_DIR="$baseDataDir"
|
||||
@@ -65,7 +65,7 @@ patchLog4jConfig() {
|
||||
return 1
|
||||
fi
|
||||
JVM_OPTS="-Dlog4j.configurationFile=${file} ${JVM_OPTS}"
|
||||
canUseRollingLogs=false
|
||||
useGeneratedLogs=false
|
||||
}
|
||||
|
||||
# Temporarily disable debugging output
|
||||
@@ -103,20 +103,77 @@ elif versionLessThan 1.18.1; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_ROLLING_LOGS:-false}"; then
|
||||
if ! ${canUseRollingLogs}; then
|
||||
logError "Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
|
||||
exit 1
|
||||
# Set up log4j2 configuration with templating support
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
if ${useGeneratedLogs}; then
|
||||
# Set up log configuration defaults
|
||||
: "${LOG_LEVEL:=info}"
|
||||
: "${ROLLING_LOG_MAX_FILES:=1000}"
|
||||
# Note: Can't use ${VAR:=default} syntax for values containing } as it breaks parsing
|
||||
if [ -z "${ROLLING_LOG_FILE_PATTERN}" ]; then
|
||||
ROLLING_LOG_FILE_PATTERN='logs/%d{yyyy-MM-dd}-%i.log.gz'
|
||||
fi
|
||||
# Set up log configuration
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
if [ ! -e "$LOGFILE" ]; then
|
||||
log "Creating log4j2.xml in ${LOGFILE}"
|
||||
cp /image/log4j2.xml "$LOGFILE"
|
||||
|
||||
# Pattern format defaults (compatible with vanilla Minecraft)
|
||||
# Note: Can't use ${VAR:=default} syntax because } in the value breaks parsing
|
||||
if [ -z "${LOG_CONSOLE_FORMAT}" ]; then
|
||||
LOG_CONSOLE_FORMAT='[%d{HH:mm:ss}] [%t/%level]: %msg%n'
|
||||
fi
|
||||
if [ -z "${LOG_TERMINAL_FORMAT}" ]; then
|
||||
LOG_TERMINAL_FORMAT='[%d{HH:mm:ss} %level]: %msg%n'
|
||||
fi
|
||||
if [ -z "${LOG_FILE_FORMAT}" ]; then
|
||||
LOG_FILE_FORMAT='[%d{HH:mm:ss}] [%t/%level]: %msg%n'
|
||||
fi
|
||||
|
||||
export LOG_LEVEL ROLLING_LOG_FILE_PATTERN ROLLING_LOG_MAX_FILES
|
||||
export LOG_CONSOLE_FORMAT LOG_TERMINAL_FORMAT LOG_FILE_FORMAT
|
||||
|
||||
|
||||
# Always regenerate if file doesn't exist
|
||||
if [ ! -e "$LOGFILE" ] || isTrue "${REGENERATE_LOG4J2:-true}"; then
|
||||
log "Generating log4j2.xml from template in ${LOGFILE}"
|
||||
|
||||
# Generate log4j2.xml using heredoc for reliable variable substitution
|
||||
cat > "$LOGFILE" <<EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="WARN">
|
||||
<Appenders>
|
||||
<Console name="SysOut" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="${LOG_CONSOLE_FORMAT}" />
|
||||
</Console>
|
||||
<Queue name="TerminalConsole">
|
||||
<PatternLayout pattern="${LOG_TERMINAL_FORMAT}" />
|
||||
</Queue>
|
||||
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="${ROLLING_LOG_FILE_PATTERN}">
|
||||
<PatternLayout pattern="${LOG_FILE_FORMAT}" />
|
||||
<Policies>
|
||||
<TimeBasedTriggeringPolicy />
|
||||
<OnStartupTriggeringPolicy />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy max="${ROLLING_LOG_MAX_FILES}"/>
|
||||
</RollingRandomAccessFile>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="${LOG_LEVEL}">
|
||||
<filters>
|
||||
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
|
||||
</filters>
|
||||
<AppenderRef ref="SysOut"/>
|
||||
<AppenderRef ref="File"/>
|
||||
<AppenderRef ref="TerminalConsole"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
EOF
|
||||
else
|
||||
log "log4j2.xml already created, skipping"
|
||||
log "log4j2.xml already exists and is up to date, skipping generation"
|
||||
fi
|
||||
|
||||
# Apply the log4j2 configuration
|
||||
JVM_OPTS="-Dlog4j.configurationFile=log4j2.xml ${JVM_OPTS}"
|
||||
else
|
||||
rm -f "${LOGFILE}"
|
||||
fi
|
||||
|
||||
# Optional disable console
|
||||
@@ -349,12 +406,34 @@ if isTrue "${USE_SIMD_FLAGS}"; then
|
||||
"
|
||||
fi
|
||||
|
||||
# Handle GTNH args
|
||||
if isType "GTNH"; then
|
||||
expandedDOpts="${expandedDOpts} -Dfml.readTimeout=180"
|
||||
java_major_version=$(mc-image-helper java-release)
|
||||
if (( java_major_version == 8 )); then
|
||||
debug "Setting GTNH java8 args."
|
||||
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||
-XX:+UseStringDeduplication
|
||||
-XX:+UseCompressedOops
|
||||
-XX:+UseCodeCacheFlushing
|
||||
"
|
||||
elif (( java_major_version >= 17 )); then
|
||||
debug "Setting GTNH java17+ args."
|
||||
expandedDOpts="${expandedDOpts} @java9args.txt"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${INIT_MEMORY} || ${MAX_MEMORY} ]]; then
|
||||
log "Setting initial memory to ${INIT_MEMORY:=${MEMORY}} and max to ${MAX_MEMORY:=${MEMORY}}"
|
||||
if [[ ${INIT_MEMORY} ]]; then
|
||||
if isPercentage "$INIT_MEMORY"; then
|
||||
JVM_OPTS="-XX:InitialRAMPercentage=$(getPercentageValue "${INIT_MEMORY}") ${JVM_OPTS}"
|
||||
elif [[ ${INIT_MEMORY} ]]; then
|
||||
JVM_OPTS="-Xms${INIT_MEMORY} ${JVM_OPTS}"
|
||||
fi
|
||||
if [[ ${MAX_MEMORY} ]]; then
|
||||
|
||||
if isPercentage "$MAX_MEMORY"; then
|
||||
JVM_OPTS="-XX:MaxRAMPercentage=$(getPercentageValue "${MAX_MEMORY}") ${JVM_OPTS}"
|
||||
elif [[ ${MAX_MEMORY} ]]; then
|
||||
JVM_OPTS="-Xmx${MAX_MEMORY} ${JVM_OPTS}"
|
||||
fi
|
||||
fi
|
||||
@@ -371,6 +450,12 @@ if versionLessThan 'b1.8'; then
|
||||
echo "
|
||||
DISABLE_HEALTHCHECK=true
|
||||
" > "$mcHealthEnvPath"
|
||||
elif versionLessThan 1.3; then
|
||||
echo "
|
||||
MC_HEALTH_EXTRA_ARGS=(
|
||||
--use-old-server-list-ping
|
||||
)
|
||||
" > "$mcHealthEnvPath"
|
||||
elif versionLessThan 1.7; then
|
||||
echo "
|
||||
MC_HEALTH_EXTRA_ARGS=(
|
||||
@@ -414,15 +499,34 @@ elif [[ ${TYPE} == "CURSEFORGE" ]]; then
|
||||
|
||||
copyFilesForCurseForge
|
||||
|
||||
if isPercentage "$INIT_MEMORY" || isPercentage "$MAX_MEMORY"; then
|
||||
# Convert to bytes
|
||||
NORM_INIT_MEM=$(normalizeMemSize "$INIT_MEMORY")
|
||||
NORM_MAX_MEM=$(normalizeMemSize "$MAX_MEMORY")
|
||||
# Convert to MB
|
||||
((NORM_INIT_MEM*=1048576))
|
||||
((NORM_MAX_MEM*=1048576))
|
||||
|
||||
cat > "${FTB_DIR}/settings-local.sh" <<EOF
|
||||
export MIN_RAM="${NORM_INIT_MEM}M"
|
||||
export MAX_RAM="${NORM_MAX_MEM}M"
|
||||
export JAVA_PARAMETERS="${JVM_XX_OPTS} ${JVM_OPTS} $expandedDOpts"
|
||||
EOF
|
||||
else
|
||||
cat > "${FTB_DIR}/settings-local.sh" <<EOF
|
||||
export MIN_RAM="${INIT_MEMORY}"
|
||||
export MAX_RAM="${MAX_MEMORY}"
|
||||
export JAVA_PARAMETERS="${JVM_XX_OPTS} ${JVM_OPTS} $expandedDOpts"
|
||||
EOF
|
||||
fi
|
||||
|
||||
# patch CurseForge cfg file, if present
|
||||
if [ -f "${FTB_DIR}/settings.cfg" ] && [[ ${MAX_MEMORY} ]]; then
|
||||
sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg"
|
||||
if isPercentage "$MAX_MEMORY"; then
|
||||
sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${NORM_MAX_MEM}M/" "${FTB_DIR}/settings.cfg"
|
||||
else
|
||||
sed -i "s/MAX_RAM=[^;]*/MAX_RAM=${MAX_MEMORY}/" "${FTB_DIR}/settings.cfg"
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${FTB_DIR}" || (logError "Can't go into ${FTB_DIR}"; exit 1)
|
||||
@@ -438,16 +542,12 @@ EOF
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
if isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
"${finalArgs[@]}"
|
||||
else
|
||||
if [ -f "${FTB_DIR}/variables.txt" ]; then
|
||||
JVM_ARGS="${JVM_XX_OPTS} ${JVM_OPTS} $expandedDOpts"
|
||||
JVM_ARGS=${JVM_ARGS//$'\n'/}
|
||||
sed -i "s~JAVA_ARGS=.*~JAVA_ARGS=\"${JVM_ARGS}\"~" "${FTB_DIR}/variables.txt"
|
||||
fi
|
||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" "${finalArgs[@]}"
|
||||
if [ -f "${FTB_DIR}/variables.txt" ]; then
|
||||
JVM_ARGS="${JVM_XX_OPTS} ${JVM_OPTS} $expandedDOpts"
|
||||
JVM_ARGS=${JVM_ARGS//$'\n'/}
|
||||
sed -i "s~JAVA_ARGS=.*~JAVA_ARGS=\"${JVM_ARGS}\"~" "${FTB_DIR}/variables.txt"
|
||||
fi
|
||||
exec mc-server-runner "${mcServerRunnerArgs[@]}" "${finalArgs[@]}"
|
||||
elif [[ $SERVER =~ run.sh ]]; then
|
||||
log "Using Forge supplied run.sh script..."
|
||||
echo $JVM_XX_OPTS $JVM_OPTS $expandedDOpts > user_jvm_args.txt
|
||||
@@ -496,9 +596,5 @@ else
|
||||
set -x
|
||||
fi
|
||||
|
||||
if isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
exec java "${finalArgs[@]}"
|
||||
else
|
||||
exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java "${finalArgs[@]}"
|
||||
fi
|
||||
exec mc-server-runner ${bootstrapArgs} "${mcServerRunnerArgs[@]}" java "${finalArgs[@]}"
|
||||
fi
|
||||
|
||||
0
scripts/start-rconcmds
Normal file → Executable file
0
scripts/start-rconcmds
Normal file → Executable file
@@ -11,7 +11,10 @@ set -e -o pipefail
|
||||
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
|
||||
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
|
||||
: "${MODRINTH_LOADER:=}"
|
||||
sum_file=/data/.generic_pack.sum
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if [[ -n ${CF_API_KEY_FILE} ]]; then
|
||||
if [[ -r "${CF_API_KEY_FILE}" ]]; then
|
||||
@@ -23,13 +26,7 @@ if [[ -n ${CF_API_KEY_FILE} ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
# CURSE_URL_BASE used in manifest downloads below
|
||||
CURSE_URL_BASE=${CURSE_URL_BASE:-https://minecraft.curseforge.com/projects}
|
||||
|
||||
sum_file=/data/.generic_pack.sum
|
||||
# Remove old mods/plugins
|
||||
if isTrue "${REMOVE_OLD_MODS}" && [ -z "${MODS_FILE}" ]; then
|
||||
removeOldMods "$MODS_OUT_DIR"
|
||||
|
||||
0
scripts/start-setupRbac
Normal file → Executable file
0
scripts/start-setupRbac
Normal file → Executable file
@@ -134,6 +134,22 @@ if [[ ${TYPE} == "CURSEFORGE" ]]; then
|
||||
fi
|
||||
|
||||
if ! isTrue "${SKIP_SERVER_PROPERTIES}"; then
|
||||
if [ ! -e "$SERVER_PROPERTIES" ] && [[ "${SERVER_PROPERTIES_REPO_URL:-}" ]]; then
|
||||
# Helper to support base URLs (like the config repos)
|
||||
# If the URL doesn't end in .properties, assume it is a base and append version/file
|
||||
if [[ "${SERVER_PROPERTIES_REPO_URL}" != *".properties" ]]; then
|
||||
SERVER_PROPERTIES_REPO_URL=$(buildDownloadList "$SERVER_PROPERTIES_REPO_URL" "$VERSION" server.properties)
|
||||
fi
|
||||
|
||||
if ! mc-image-helper mcopy \
|
||||
--to "$(dirname "$SERVER_PROPERTIES")" \
|
||||
--skip-existing \
|
||||
--ignore-missing-sources \
|
||||
"$SERVER_PROPERTIES_REPO_URL"; then
|
||||
logWarning "Failed to download server.properties from ${SERVER_PROPERTIES_REPO_URL}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -e "$SERVER_PROPERTIES" ]; then
|
||||
log "Creating server properties in ${SERVER_PROPERTIES}"
|
||||
|
||||
|
||||
@@ -39,6 +39,23 @@ function get_major_version() {
|
||||
echo "$version" | cut -d. -f 1-2
|
||||
}
|
||||
|
||||
function isPercentage() {
|
||||
local value=$1
|
||||
|
||||
[[ $value =~ ^[0-9]+(\.[0-9]+)?\s*%$ ]]
|
||||
}
|
||||
|
||||
function getPercentageValue() {
|
||||
local value=$1
|
||||
if [[ "$value" =~ ^([0-9]+(\.[0-9]+)?)\s*%$ ]]; then
|
||||
echo "${BASH_REMATCH[1]}"
|
||||
return 0
|
||||
else
|
||||
logError "Value '$value' is not a valid percentage."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function isURL() {
|
||||
local value=$1
|
||||
|
||||
@@ -229,6 +246,7 @@ function logRcon() {
|
||||
|
||||
function normalizeMemSize() {
|
||||
local scale=1
|
||||
local mem=1
|
||||
case ${1,,} in
|
||||
*k)
|
||||
scale=1024
|
||||
@@ -239,10 +257,20 @@ function normalizeMemSize() {
|
||||
*g)
|
||||
scale=1073741824
|
||||
;;
|
||||
*%)
|
||||
# Get system memory
|
||||
if [ -f "/sys/fs/cgroup/memory/memory.limit_in_bytes" ]; then
|
||||
mem=$( cat /sys/fs/cgroup/memory/memory.limit_in_bytes )
|
||||
elif [ -f "/sys/fs/cgroup/memory.max" ]; then
|
||||
mem=$( cat /sys/fs/cgroup/memory.max )
|
||||
fi
|
||||
# Scale is used to transform percentages into decimals (eg. 60 -> 0.6)
|
||||
scale=0.01
|
||||
;;
|
||||
esac
|
||||
|
||||
val=${1:0:-1}
|
||||
echo $((val * scale))
|
||||
echo $((val * scale * mem))
|
||||
}
|
||||
|
||||
function compare_version() {
|
||||
@@ -261,22 +289,23 @@ function compare_version() {
|
||||
fi
|
||||
|
||||
# Handle version channels ('a', 'b', or numeric)
|
||||
if [[ $left_version == a* || $left_version == b* ]]; then
|
||||
if [[ $left_version == a* ]]; then
|
||||
left_version=${left_version:1}
|
||||
left_version_channel=1
|
||||
elif [[ $left_version == b* ]]; then
|
||||
left_version=${left_version:1}
|
||||
left_version_channel=2
|
||||
else
|
||||
left_version_channel=3
|
||||
fi
|
||||
|
||||
if [[ $right_version == a* || $right_version == b* ]]; then
|
||||
if [[ $right_version == a* ]]; then
|
||||
right_version=${right_version:1}
|
||||
fi
|
||||
|
||||
local left_version_channel=${left_version:0:1}
|
||||
if [[ $left_version_channel =~ [0-9] ]]; then
|
||||
left_version_channel='r'
|
||||
fi
|
||||
|
||||
local right_version_channel=${right_version:0:1}
|
||||
if [[ $right_version_channel =~ [0-9] ]]; then
|
||||
right_version_channel='r'
|
||||
right_version_channel=1
|
||||
elif [[ $right_version == b* ]]; then
|
||||
right_version=${right_version:1}
|
||||
right_version_channel=2
|
||||
else
|
||||
right_version_channel=3
|
||||
fi
|
||||
|
||||
if [[ $comparison == "lt" && $left_version_channel < $right_version_channel ]]; then
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
services:
|
||||
monitor:
|
||||
depends_on:
|
||||
- mc
|
||||
mc:
|
||||
condition: service_started
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
entrypoint: mc-monitor
|
||||
command: status --host mc --retry-interval 1s --timeout 1s --retry-limit 60
|
||||
restart: no
|
||||
mc:
|
||||
restart: "no"
|
||||
restart: no
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
@@ -14,4 +16,3 @@ services:
|
||||
TYPE: PAPER
|
||||
# regression tests https://github.com/itzg/docker-minecraft-server/issues/2545
|
||||
MOTD: "Foo§rBar"
|
||||
|
||||
|
||||
28
tests/fulltests/test.sh
Normal file → Executable file
28
tests/fulltests/test.sh
Normal file → Executable file
@@ -3,24 +3,28 @@
|
||||
# go to script root directory
|
||||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
down() {
|
||||
docker compose -f "$1" down -v --remove-orphans
|
||||
}
|
||||
|
||||
# tests to completely spin up Minecraft and use the monitor to validate the service is running.
|
||||
fullMinecraftUpTest(){
|
||||
file="$1"
|
||||
failed=false
|
||||
result=0
|
||||
|
||||
echo "Testing with images:"
|
||||
docker compose -f "$file" config --images
|
||||
|
||||
# run the monitor to validate the Minecraft image is healthy
|
||||
docker compose -f "$file" run monitor || failed=true
|
||||
echo "$(dirname "$file") Result: failed=$failed"
|
||||
if $failed; then
|
||||
docker compose logs mc
|
||||
down "$file"
|
||||
return 1
|
||||
upArgs=(
|
||||
--attach-dependencies
|
||||
--always-recreate-deps
|
||||
--abort-on-container-failure
|
||||
)
|
||||
if ! docker compose -f "$file" up "${upArgs[@]}" monitor; then
|
||||
echo "$(dirname "$file") Result: failed"
|
||||
result=1
|
||||
else
|
||||
down "$file"
|
||||
echo "$(dirname "$file") Result: success"
|
||||
fi
|
||||
docker compose -f "$file" down -v --remove-orphans
|
||||
return $result
|
||||
}
|
||||
|
||||
# go through each folder in fulltests and run fullbuilds
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
services:
|
||||
monitor:
|
||||
depends_on:
|
||||
- mc
|
||||
mc:
|
||||
condition: service_started
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
entrypoint: mc-monitor
|
||||
command: status --host mc --retry-interval 1s --timeout 1s --retry-limit 300
|
||||
restart: no
|
||||
mc:
|
||||
restart: "no"
|
||||
restart: no
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
|
||||
@@ -3,9 +3,15 @@ services:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./web:/usr/share/nginx/html
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost/configs.zip"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
mc:
|
||||
depends_on:
|
||||
- web
|
||||
web:
|
||||
condition: service_healthy
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
@@ -3,9 +3,16 @@ services:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./web:/usr/share/nginx/html
|
||||
healthcheck:
|
||||
test:
|
||||
["CMD", "curl", "--fail", "http://localhost/motion-tween-example.gif"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
mc:
|
||||
depends_on:
|
||||
- web
|
||||
web:
|
||||
condition: service_healthy
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
@@ -3,9 +3,21 @@ services:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./web:/usr/share/nginx/html
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"curl",
|
||||
"--fail",
|
||||
"http://localhost/4737386_minecraft_squircle_icon.png",
|
||||
]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
mc:
|
||||
depends_on:
|
||||
- web
|
||||
web:
|
||||
condition: service_healthy
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
@@ -3,9 +3,21 @@ services:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./web:/usr/share/nginx/html
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"curl",
|
||||
"--fail",
|
||||
"http://localhost/4737386_minecraft_squircle_icon.png",
|
||||
]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
mc:
|
||||
depends_on:
|
||||
- web
|
||||
web:
|
||||
condition: service_healthy
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
@@ -3,9 +3,15 @@ services:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./web:/usr/share/nginx/html
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost/pack.toml"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
mc:
|
||||
depends_on:
|
||||
- web
|
||||
web:
|
||||
condition: service_healthy
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
41
zensical.toml
Normal file
41
zensical.toml
Normal file
@@ -0,0 +1,41 @@
|
||||
[project]
|
||||
site_name = "Minecraft Server on Docker (Java Edition)"
|
||||
site_url = "https://docker-minecraft-server.readthedocs.io/en/latest/"
|
||||
site_description = "Documentation for Minecraft Server on Docker"
|
||||
repo_name = "itzg/docker-minecraft-server"
|
||||
repo_url = "https://github.com/itzg/docker-minecraft-server"
|
||||
site_author = "itzg"
|
||||
copyright = "Copyright © itzg 2026."
|
||||
docs_dir = "docs"
|
||||
site_dir = "site"
|
||||
|
||||
[project.theme]
|
||||
features = [
|
||||
"navigation.tracking",
|
||||
"navigation.tabs",
|
||||
"navigation.tabs.sticky",
|
||||
"navigation.sections",
|
||||
"navigation.top",
|
||||
"navigation.indexes"
|
||||
]
|
||||
language = "en"
|
||||
|
||||
[project.theme.icon]
|
||||
repo = "fontawesome/brands/github"
|
||||
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme)"
|
||||
toggle.icon = "lucide/sun-moon"
|
||||
toggle.name = "Switch to light mode"
|
||||
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme: light)"
|
||||
scheme = "default"
|
||||
toggle.icon = "lucide/sun"
|
||||
toggle.name = "Switch to dark mode"
|
||||
|
||||
[[project.theme.palette]]
|
||||
media = "(prefers-color-scheme: dark)"
|
||||
scheme = "slate"
|
||||
toggle.icon = "lucide/moon"
|
||||
toggle.name = "Switch to light mode"
|
||||
Reference in New Issue
Block a user