mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0a3ee3b64 | ||
|
|
6683c91b74 | ||
|
|
a0e274a7b7 | ||
|
|
5d8a152db2 | ||
|
|
df8f8f1716 | ||
|
|
295996b033 | ||
|
|
5ac7b1d108 | ||
|
|
f420b92d05 | ||
|
|
96019b02ee | ||
|
|
c271ad99e0 | ||
|
|
222b522bc1 | ||
|
|
dd3c7a4b77 | ||
|
|
5340121d37 | ||
|
|
9546dd322d | ||
|
|
739cd5a320 | ||
|
|
09b716dd6b | ||
|
|
a7ecd92244 | ||
|
|
8685cc05c7 | ||
|
|
235141fcf3 | ||
|
|
cea839aa67 | ||
|
|
6d9c6d64e2 | ||
|
|
5d8b99c454 | ||
|
|
5113afccb5 | ||
|
|
0a7b1ed817 | ||
|
|
4fe1c2c7b4 | ||
|
|
8c0c27aef9 | ||
|
|
e9d7668cd8 | ||
|
|
06190ef9d0 | ||
|
|
1c780ff655 | ||
|
|
866f9c9d45 | ||
|
|
4da0e93c0f | ||
|
|
5415879cd2 | ||
|
|
28737a99bc | ||
|
|
f4634c3fd9 | ||
|
|
46ee2331bf | ||
|
|
edffc58589 | ||
|
|
be846dd369 | ||
|
|
de1d7f422c |
15
.github/workflows/build-multiarch.yml
vendored
15
.github/workflows/build-multiarch.yml
vendored
@@ -11,6 +11,7 @@ on:
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -97,7 +98,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.0
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
@@ -132,13 +133,13 @@ jobs:
|
||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.4.0
|
||||
uses: docker/setup-buildx-action@v3.6.1
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3.1.0
|
||||
uses: docker/setup-qemu-action@v3.2.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v6.3.0
|
||||
uses: docker/build-push-action@v6.8.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
@@ -161,14 +162,14 @@ jobs:
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3.2.0
|
||||
uses: docker/login-action@v3.3.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3.2.0
|
||||
uses: docker/login-action@v3.3.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
with:
|
||||
registry: ghcr.io
|
||||
@@ -176,7 +177,7 @@ jobs:
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6.3.0
|
||||
uses: docker/build-push-action@v6.8.0
|
||||
if: github.actor == github.repository_owner
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
|
||||
9
.github/workflows/verify-pr.yml
vendored
9
.github/workflows/verify-pr.yml
vendored
@@ -8,6 +8,7 @@ on:
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
- "notes/**"
|
||||
- "kustomize/**"
|
||||
- "docker-compose*.yml"
|
||||
- "mkdocs.yml"
|
||||
|
||||
@@ -46,16 +47,16 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.7
|
||||
uses: actions/checkout@v4.2.0
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.4.0
|
||||
uses: docker/setup-buildx-action@v3.6.1
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v6.3.0
|
||||
uses: docker/build-push-action@v6.8.0
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
# ensure latest base image is used
|
||||
@@ -65,7 +66,7 @@ jobs:
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v6.3.0
|
||||
uses: docker/build-push-action@v6.8.0
|
||||
with:
|
||||
# Only build single platform since loading multi-arch image into daemon fails with
|
||||
# "docker exporter does not currently support exporting manifest lists"
|
||||
|
||||
23
Dockerfile
23
Dockerfile
@@ -1,5 +1,3 @@
|
||||
# syntax = docker/dockerfile:1.3
|
||||
|
||||
ARG BASE_IMAGE=eclipse-temurin:21-jre
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
@@ -9,9 +7,14 @@ ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
# The following three arg/env vars get used by the platform specific "install-packages" script
|
||||
ARG EXTRA_DEB_PACKAGES=""
|
||||
ARG EXTRA_DNF_PACKAGES=""
|
||||
ARG EXTRA_ALPINE_PACKAGES=""
|
||||
ARG FORCE_INSTALL_PACKAGES=1
|
||||
RUN --mount=target=/build,source=build \
|
||||
TARGET=${TARGETARCH}${TARGETVARIANT} /build/run.sh install-packages
|
||||
TARGET=${TARGETARCH}${TARGETVARIANT} \
|
||||
/build/run.sh install-packages
|
||||
|
||||
RUN --mount=target=/build,source=build \
|
||||
/build/run.sh setup-user
|
||||
@@ -23,31 +26,31 @@ EXPOSE 25565
|
||||
ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
ARG EASY_ADD_VERSION=0.8.7
|
||||
ARG EASY_ADD_VERSION=0.8.8
|
||||
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
ARG RESTIFY_VERSION=1.7.4
|
||||
ARG RESTIFY_VERSION=1.7.5
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG RCON_CLI_VERSION=1.6.7
|
||||
ARG RCON_CLI_VERSION=1.6.9
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_MONITOR_VERSION=0.12.13
|
||||
ARG MC_MONITOR_VERSION=0.14.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.12.2
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.12.3
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.39.9
|
||||
ARG MC_HELPER_VERSION=1.39.12
|
||||
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
|
||||
@@ -74,4 +77,4 @@ RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPa
|
||||
RUN dos2unix /start* /auto/*
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m --interval=5s --retries=24 CMD mc-health
|
||||
HEALTHCHECK --start-period=30s --retries=24 --interval=60s CMD mc-health
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
# Install necessary packages
|
||||
# shellcheck disable=SC2086
|
||||
apk add --no-cache -U \
|
||||
openssl \
|
||||
imagemagick \
|
||||
@@ -14,7 +16,8 @@ apk add --no-cache -U \
|
||||
procps \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils \
|
||||
curl \
|
||||
iputils \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
@@ -27,13 +30,18 @@ apk add --no-cache -U \
|
||||
nfs-utils \
|
||||
libpcap \
|
||||
libwebp \
|
||||
libcap
|
||||
libcap \
|
||||
${EXTRA_ALPINE_PACKAGES}
|
||||
|
||||
# Patched knockd
|
||||
# Download and install patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-alpine-amd64.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
# Set Git credentials globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
@@ -1,12 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname -m) == "aarch64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-arm64
|
||||
chmod +x /bin/gosu
|
||||
elif [[ $(uname -m) == "x86_64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64
|
||||
chmod +x /bin/gosu
|
||||
else
|
||||
echo "Not supported!"
|
||||
exit 1
|
||||
fi
|
||||
set -euo pipefail
|
||||
|
||||
GOSU_VERSION="1.16"
|
||||
GOSU_BASE_URL="https://github.com/tianon/gosu/releases/download/$GOSU_VERSION"
|
||||
|
||||
case $(uname -m) in
|
||||
"aarch64")
|
||||
GOSU_ARCH="gosu-arm64"
|
||||
;;
|
||||
"x86_64")
|
||||
GOSU_ARCH="gosu-amd64"
|
||||
;;
|
||||
*)
|
||||
echo "Architecture not supported!"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -sL -o /bin/gosu "${GOSU_BASE_URL}/${GOSU_ARCH}"
|
||||
chmod +x /bin/gosu
|
||||
|
||||
@@ -4,20 +4,26 @@ export TARGET
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Install and configure dnf
|
||||
microdnf install dnf -y
|
||||
|
||||
dnf install 'dnf-command(config-manager)' -y
|
||||
dnf config-manager --set-enabled ol8_codeready_builder
|
||||
tee /etc/yum.repos.d/ol8-epel.repo<<EOF
|
||||
|
||||
# Add EPEL repository
|
||||
tee /etc/yum.repos.d/ol8-epel.repo <<EOF
|
||||
[ol8_developer_EPEL]
|
||||
name= Oracle Linux \$releasever EPEL (\$basearch)
|
||||
name=Oracle Linux \$releasever EPEL (\$basearch)
|
||||
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
EOF
|
||||
|
||||
# Update system
|
||||
dnf update -y
|
||||
|
||||
# Install necessary packages
|
||||
# shellcheck disable=SC2086
|
||||
dnf install -y \
|
||||
ImageMagick \
|
||||
file \
|
||||
@@ -26,7 +32,6 @@ dnf install -y \
|
||||
iputils \
|
||||
curl \
|
||||
git \
|
||||
git-lfs \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql \
|
||||
@@ -40,20 +45,29 @@ dnf install -y \
|
||||
libpcap \
|
||||
libwebp \
|
||||
findutils \
|
||||
which
|
||||
which \
|
||||
${EXTRA_DNF_PACKAGES}
|
||||
|
||||
# Install Git LFS
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
|
||||
dnf update -y
|
||||
dnf install -y \
|
||||
git-lfs
|
||||
dnf install -y git-lfs
|
||||
|
||||
# Clean up DNF when done
|
||||
dnf clean all
|
||||
|
||||
# Install gosu (assuming the script /build/ol/install-gosu.sh exists and is executable)
|
||||
bash /build/ol/install-gosu.sh
|
||||
|
||||
# Patched knockd
|
||||
# Download and install patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
# Set git credentials globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
|
||||
@@ -4,8 +4,9 @@ export TARGET
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Update and install packages
|
||||
apt-get update
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
@@ -27,21 +28,26 @@ apt-get install -y \
|
||||
lbzip2 \
|
||||
nfs-common \
|
||||
libpcap0.8 \
|
||||
webp
|
||||
${EXTRA_DEB_PACKAGES}
|
||||
|
||||
# Install Git LFS
|
||||
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
git-lfs
|
||||
apt-get install -y git-lfs
|
||||
|
||||
# Clean up APT when done
|
||||
apt-get clean
|
||||
|
||||
# Patched knockd
|
||||
# Download and install patched knockd
|
||||
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
||||
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
||||
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
find /usr/lib -name 'libpcap.so.0.8' -execdir cp '{}' libpcap.so.1 \;
|
||||
|
||||
# Set git credentials
|
||||
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|
||||
# Set git credentials globally
|
||||
cat <<EOF >> /etc/gitconfig
|
||||
[user]
|
||||
name = Minecraft Server on Docker
|
||||
email = server@example.com
|
||||
EOF
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
|
||||
set -e
|
||||
|
||||
if id ubuntu > /dev/null 2>&1; then
|
||||
deluser ubuntu
|
||||
fi
|
||||
|
||||
addgroup --gid 1000 minecraft
|
||||
adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
@@ -128,7 +128,7 @@ When either is set, [whitelisting of connecting users](https://minecraft.wiki/w/
|
||||
|
||||
To change the behavior when the whitelist file already exists, set the variable `EXISTING_WHITELIST_FILE` to one of the following options:
|
||||
|
||||
`SKIP` (default)
|
||||
`SKIP`
|
||||
: Skip processing of the whitelist file when one is already present. This is the same as setting the legacy variable `OVERRIDE_WHITELIST` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
@@ -137,7 +137,7 @@ To change the behavior when the whitelist file already exists, set the variable
|
||||
`MERGE`
|
||||
: Merge the list of users from `WHITELIST` into the existing file. `WHITELIST_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
`SYNC_FILE_MERGE_LIST` (default)
|
||||
: When `WHITELIST_FILE` is provided it will overwrite an existing whitelist file. Also, if `WHITELIST` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
@@ -171,7 +171,7 @@ Similar to the whitelist, users can be provisioned as operators (aka administrat
|
||||
|
||||
To change the behavior when the ops file already exists, set the variable `EXISTING_OPS_FILE` to one of the following options:
|
||||
|
||||
`SKIP` (default)
|
||||
`SKIP`
|
||||
: Skip processing of the ops file when one is already present. This is the same as setting the legacy variable `OVERRIDE_OPS` to "false".
|
||||
|
||||
`SYNCHRONIZE`
|
||||
@@ -180,7 +180,7 @@ To change the behavior when the ops file already exists, set the variable `EXIST
|
||||
`MERGE`
|
||||
: Merge the list of users from `OPS` into the existing file. `OPS_FILE` cannot be used with this option.
|
||||
|
||||
`SYNC_FILE_MERGE_LIST`
|
||||
`SYNC_FILE_MERGE_LIST` (default)
|
||||
: When `OPS_FILE` is provided it will overwrite an existing ops file. Also, if `OPS` is provided, then those users will be merged into the newly copied file.
|
||||
|
||||
!!! note
|
||||
@@ -495,4 +495,11 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| SIMULATION_DISTANCE | simulation-distance |
|
||||
| SYNC_CHUNK_WRITES | sync-chunk-writes |
|
||||
| USE_NATIVE_TRANSPORT | use-native-transport |
|
||||
|
||||
| HIDE_ONLINE_PLAYERS | hide-online-players |
|
||||
| RESOURCE_PACK_ID | resource-pack-id |
|
||||
| RESOURCE_PACK_PROMPT | resource-pack-prompt |
|
||||
| MAX_CHAINED_NEIGHBOR_UPDATES | max-chained-neighbor-updates |
|
||||
| LOG_IPS | log-ips |
|
||||
| REGION_FILE_COMPRESSION | region-file-compression |
|
||||
| BUG_REPORT_LINK | bug-report-link |
|
||||
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
|
||||
@@ -26,3 +26,11 @@ or just a plain build
|
||||
```shell
|
||||
docker build -t IMG_PREFIX/minecraft-server .
|
||||
```
|
||||
|
||||
## Installing extra packages
|
||||
|
||||
The following build args can be set to install additional packages for the respective base image distro:
|
||||
|
||||
- `EXTRA_DEB_PACKAGES`
|
||||
- `EXTRA_DNF_PACKAGES`
|
||||
- `EXTRA_ALPINE_PACKAGES`
|
||||
|
||||
@@ -26,6 +26,54 @@ services:
|
||||
|
||||
[Source](https://github.com/itzg/docker-minecraft-server/blob/master/examples/geyser/docker-compose.yml)
|
||||
|
||||
## Lazymc - Put your Minecraft server to rest when idle
|
||||
|
||||
With [lazymc-docker-proxy](https://github.com/joesturge/lazymc-docker-proxy) you are able to use [lazymc](https://github.com/timvisee/lazymc) with the minecraft container.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
- data:/server:ro
|
||||
# you need to supply the docker socket, so that the container can run docker command
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
# lazymc-docker-proxy acts as a proxy, so there is
|
||||
# no need to expose the server port on the Minecraft container
|
||||
- "25565:25565"
|
||||
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
- lazymc.group=mc
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
# so set restart to no, or else the container will start again...
|
||||
restart: no
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data:
|
||||
```
|
||||
[Source](https://github.com/joesturge/lazymc-docker-proxy/blob/master/docker-compose.yaml)
|
||||
|
||||
## Lazytainer - Stop Minecraft container based on traffic
|
||||
Monitors network traffic to the Minecraft containers. If there is traffic, the container runs, otherwise the container is stopped/paused.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
mkdocs-material == 9.5.29
|
||||
mkdocs-autorefs == 1.0.1
|
||||
mkdocstrings == 0.25.1
|
||||
mkdocs-material == 9.5.39
|
||||
mkdocs-autorefs == 1.2.0
|
||||
mkdocstrings == 0.26.1
|
||||
mkdocs-literate-nav == 0.6.1
|
||||
mdx-gh-links == 0.4
|
||||
mkdocs-click == 0.8.1
|
||||
|
||||
@@ -32,7 +32,7 @@ A [Ketting](https://github.com/kettingpowered/Ketting-1-20-x) server, which is a
|
||||
There are limited base versions supported, so you will also need to set `VERSION`, such as "1.20.1" or later.
|
||||
|
||||
`FORGE_VERSION` and `KETTING_VERSION` may be specified; however, they will be defaulted by the [Ketting launcher](https://github.com/kettingpowered/kettinglauncher) otherwise.
|
||||
Available Ketting Versions may be found at [https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions](https://github.com/kettingpowered/Ketting-1-20-x/packages/2041866/versions).
|
||||
Available Ketting Versions may be found at [https://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge](https://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge).
|
||||
The Version structure is `MinecraftVersion-ForgeVersion-KettingVersion` (e.g. `1.20.1-47.2.20-0.1.4` is for Minecraft `1.20.1`, Forge `47.2.20` and Ketting `0.1.4`).
|
||||
|
||||
### Mohist
|
||||
|
||||
@@ -65,13 +65,19 @@ Extra variables:
|
||||
|
||||
### Folia
|
||||
|
||||
Enable Folia server mode by adding a `-e TYPE=FOLIA` to your command-line.
|
||||
A [Folia server](https://papermc.io/software/folia) can be used by setting the environment variable `TYPE` to "FOLIA".
|
||||
|
||||
By default, the container will run the latest build of [Folia server](https://papermc.io/downloads), but you can also choose to run a specific build with `-e FOLIABUILD=26`.
|
||||
By default, the container will run the latest experimental build of [Folia server](https://papermc.io/downloads), but you can also choose to run a specific build with `-e FOLIABUILD=26`. The release channel can be changed with the variable `FOLIA_CHANNEL`; however, only experimental builds are available at this time.
|
||||
|
||||
!!! example
|
||||
|
||||
Using `docker run`
|
||||
|
||||
```
|
||||
docker run -d -v /path/on/host:/data \
|
||||
-e TYPE=FOLIA \
|
||||
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
|
||||
```
|
||||
|
||||
If you are hosting your own copy of Folia you can override the download URL with `FOLIA_DOWNLOAD_URL=<url>`.
|
||||
|
||||
|
||||
@@ -563,35 +563,35 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_CONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_DISCONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_LAST_DISCONNECT</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands can be configured to execute when the server starts, a client connects, or a client disconnects</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<td><code>RCON_CMDS_STARTUP</code></td>
|
||||
<td>RCON commands to execute when the server starts.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_CONNECT</code></td>
|
||||
<td>RCON commands to execute whenever a client connects to the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_FIRST_CONNECT</code></td>
|
||||
<td>RCON commands to execute on the first client connection to the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_ON_DISCONNECT</code></td>
|
||||
<td>RCON commands to execute whenever a client disconnects from the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RCON_CMDS_LAST_DISCONNECT</code></td>
|
||||
<td>RCON commands to execute when the last client disconnects from the server.</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -2,11 +2,8 @@ services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java17
|
||||
environment:
|
||||
DEBUG: true
|
||||
SETUP_ONLY: true
|
||||
EULA: true
|
||||
TYPE: MODRINTH
|
||||
VERSION: 1.20.1
|
||||
MEMORY: 4G
|
||||
MODRINTH_MODPACK: better-mc-forge-bmc4
|
||||
MODRINTH_VERSION: v28
|
||||
|
||||
40
examples/lazymc/docker_compose.yml
Normal file
40
examples/lazymc/docker_compose.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
lazymc:
|
||||
container_name: lazymc
|
||||
image: ghcr.io/joesturge/lazymc-docker-proxy:latest
|
||||
environment:
|
||||
# Point to the service name of the Minecraft server
|
||||
SERVER_ADDRESS: mc:25565
|
||||
# Required to find the container to manage it
|
||||
LAZYMC_GROUP: mc
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
# you should mount the minecraft server dir under /server, using read only.
|
||||
- data:/server:ro
|
||||
# you need to supply the docker socket, so that the container can run docker command
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
# lazymc-docker-proxy acts as a proxy, so there is
|
||||
# no need to expose the server port on the Minecraft container
|
||||
- "25565:25565"
|
||||
|
||||
# Standard Docker Minecraft server, also works with other server types
|
||||
mc:
|
||||
image: itzg/minecraft-server:java21
|
||||
container_name: minecraft-server
|
||||
# We need to add a label here so that lazymc-docker-proxy knows which
|
||||
# container to manage
|
||||
labels:
|
||||
- lazymc.group=mc
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# This container should be managed solely by the lazymc container
|
||||
# so set restart to no, or else the container will start again...
|
||||
restart: no
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data:
|
||||
60
examples/optimized-paper-config/README.md
Normal file
60
examples/optimized-paper-config/README.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# A Form to Load New Config Files to Paper MC
|
||||
|
||||
In this example, we illustrate how to efficiently load and manage different configuration files to optimize a Paper Minecraft server. To implement this, it is necessary to create a dedicated repository where the configuration files can be stored and later retrieved. The repository should adhere to a specific structure to facilitate seamless integration with your Docker setup. Notably, the configurations must be organized into a folder named after the version of Minecraft you are using.
|
||||
|
||||
For reference, I have provided this [repository](https://github.com/Alpha018/paper-config-optimized), which contains optimized configuration files for the latest version of Minecraft. You can use this repository by linking directly to the configuration files in your Docker file, as demonstrated in the example below.
|
||||
|
||||
## Usage
|
||||
|
||||
You can directly use the optimized configuration files from this repository by accessing them through the GitHub raw URLs. Simply replace the env var like the docker compose with any other repo with different configurations.
|
||||
|
||||
To use the raw files, you can download or link to them using the following pattern:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/[your-username]/[your-repository]/main/[file-path]"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
```
|
||||
|
||||
Feel free to explore and use the configurations in this repo to enhance your Minecraft server's performance.
|
||||
|
||||
## Contribution
|
||||
|
||||
If you'd like to improve or suggest changes to these configurations, feel free to submit a pull request in this [repository](https://github.com/Alpha018/paper-config-optimized). We welcome contributions from the community!
|
||||
|
||||
17
examples/optimized-paper-config/docker-compose.yml
Normal file
17
examples/optimized-paper-config/docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "PAPER"
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
PAPER_CONFIG_REPO: "https://raw.githubusercontent.com/Alpha018/paper-config-optimized/main"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc-paper: {}
|
||||
21
examples/simple-voice-chat/fabric-compose.yaml
Normal file
21
examples/simple-voice-chat/fabric-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "FABRIC"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
21
examples/simple-voice-chat/neoforge-compose.yaml
Normal file
21
examples/simple-voice-chat/neoforge-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "NEOFORGE"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
21
examples/simple-voice-chat/paper-compose.yaml
Normal file
21
examples/simple-voice-chat/paper-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
# Game port
|
||||
- "25565:25565/tcp"
|
||||
# Voice chat port
|
||||
- "24454:24454/udp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "PAPER"
|
||||
VERSION: "1.21.1"
|
||||
# This will select the latest version of simple voice chat for 1.21.1.
|
||||
# You can specify a version by appending :versionID (e.g. simple-voice-chat:anabvqRL)
|
||||
MODRINTH_PROJECTS: "simple-voice-chat"
|
||||
MEMORY: 8G
|
||||
volumes:
|
||||
# attach the relative directory 'data' to the container's /data path
|
||||
- ./data:/data
|
||||
@@ -1,23 +1,24 @@
|
||||
{
|
||||
"globalExcludes": [
|
||||
"ambientsounds",
|
||||
"auudio-forge",
|
||||
"ambience-music-mod",
|
||||
"ambientsounds",
|
||||
"appleskin",
|
||||
"armor-chroma",
|
||||
"armor-toughness-bar",
|
||||
"auudio-forge",
|
||||
"beehivetooltips",
|
||||
"better-advancements",
|
||||
"betterf3",
|
||||
"betterfps",
|
||||
"better-foliage",
|
||||
"better-placement",
|
||||
"better-sprinting",
|
||||
"better-tips-nbt-tag",
|
||||
"better-third-person",
|
||||
"better-tips-nbt-tag",
|
||||
"betterf3",
|
||||
"betterfps",
|
||||
"biomeinfo",
|
||||
"block-drops-jei-addon",
|
||||
"blur-forge",
|
||||
"cartography",
|
||||
"cherished-worlds",
|
||||
"chunk-animator",
|
||||
"clickable-advancements",
|
||||
@@ -28,14 +29,15 @@
|
||||
"defensive-measures",
|
||||
"ding",
|
||||
"drippy-loading-screen",
|
||||
"dynamiclights-reforged",
|
||||
"dynamic-surroundings",
|
||||
"dynamiclights-reforged",
|
||||
"easiervillagertrading",
|
||||
"effective-forge",
|
||||
"embeddium",
|
||||
"embeddium-extension",
|
||||
"embeddium-extras",
|
||||
"enchantment-descriptions",
|
||||
"enhancedvisuals",
|
||||
"entity-collision-fps-fix",
|
||||
"entity-texture-features-fabric",
|
||||
"entityculling",
|
||||
@@ -46,21 +48,25 @@
|
||||
"fancymenu",
|
||||
"faster-ladder-climbing",
|
||||
"foamfix-optimization-mod",
|
||||
"fps-reducer",
|
||||
"free-cam",
|
||||
"ftb-backups-2",
|
||||
"fullscreen-windowed-borderless-for-minecraft",
|
||||
"hwyla",
|
||||
"ignitioncoil",
|
||||
"inmisaddon",
|
||||
"irisshaders",
|
||||
"iris-flywheel-compat",
|
||||
"irisshaders",
|
||||
"item-obliterator",
|
||||
"itemphysic-lite",
|
||||
"itemzoom",
|
||||
"just-enough-harvestcraft",
|
||||
"just-enough-resources-jer",
|
||||
"just-zoom",
|
||||
"konkrete",
|
||||
"legendary-tooltips",
|
||||
"lootbeams",
|
||||
"loot-capacitor-tooltips",
|
||||
"lootbeams",
|
||||
"magnesium-extras",
|
||||
"menumobs",
|
||||
"minecraft-rich-presence",
|
||||
@@ -68,19 +74,23 @@
|
||||
"mouse-tweaks",
|
||||
"neat",
|
||||
"nekos-enchanted-books",
|
||||
"no-recipe-book",
|
||||
"no-nv-flash",
|
||||
"no-recipe-book",
|
||||
"not-enough-animations",
|
||||
"oculus",
|
||||
"oldjavawarning",
|
||||
"overloaded-armor-bar",
|
||||
"packmodemenu",
|
||||
"reauth",
|
||||
"reblured",
|
||||
"reforgium",
|
||||
"resource-reloader",
|
||||
"rubidium",
|
||||
"rubidium-extra",
|
||||
"ryoamiclights",
|
||||
"schematica",
|
||||
"seamless-loading-screen",
|
||||
"seamless-loading-screen-forge",
|
||||
"searchables",
|
||||
"shulkerboxviewer",
|
||||
"skin-layers-3d",
|
||||
@@ -88,6 +98,7 @@
|
||||
"smooth-font",
|
||||
"smoothwater",
|
||||
"sodium",
|
||||
"sodium-rubidium-occlusion-culling-fix",
|
||||
"sound-filters",
|
||||
"sound-physics-remastered",
|
||||
"stellar-sky",
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
"iris-flywheel",
|
||||
"ItemBorders",
|
||||
"ItemLocks",
|
||||
"justzoom",
|
||||
"language-reload",
|
||||
"lazy-language-loader",
|
||||
"LegendaryTooltips",
|
||||
|
||||
@@ -1,58 +1,66 @@
|
||||
{
|
||||
"motd": {"env": "MOTD"},
|
||||
"gamemode": {"env": "MODE"},
|
||||
"difficulty": {"env": "DIFFICULTY"},
|
||||
"white-list": {"env": "WHITELIST_PROP"},
|
||||
"enforce-whitelist": {"env": "ENFORCE_WHITELIST"},
|
||||
"level-type": {"env": "LEVEL_TYPE"},
|
||||
"server-name": {"env": "SERVER_NAME"},
|
||||
"server-ip": {"env": "SERVER_IP"},
|
||||
"server-port": {"env": "SERVER_PORT"},
|
||||
"allow-flight": {"env": "ALLOW_FLIGHT"},
|
||||
"allow-nether": {"env": "ALLOW_NETHER"},
|
||||
"bug-report-link": {"env": "BUG_REPORT_LINK"},
|
||||
"announce-player-achievements": {"env": "ANNOUNCE_PLAYER_ACHIEVEMENTS"},
|
||||
"broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"},
|
||||
"broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"},
|
||||
"difficulty": {"env": "DIFFICULTY"},
|
||||
"enable-command-block": {"env": "ENABLE_COMMAND_BLOCK"},
|
||||
"enable-jmx-monitoring": {"env": "ENABLE_JMX"},
|
||||
"enable-query": {"env": "ENABLE_QUERY"},
|
||||
"enable-rcon": {"env": "ENABLE_RCON"},
|
||||
"enable-status": {"env": "ENABLE_STATUS"},
|
||||
"enforce-secure-profile": {"env": "ENFORCE_SECURE_PROFILE"},
|
||||
"enforce-whitelist": {"env": "ENFORCE_WHITELIST"},
|
||||
"entity-broadcast-range-percentage": {"env": "ENTITY_BROADCAST_RANGE_PERCENTAGE"},
|
||||
"force-gamemode": {"env": "FORCE_GAMEMODE"},
|
||||
"function-permission-level": {"env": "FUNCTION_PERMISSION_LEVEL"},
|
||||
"gamemode": {"env": "MODE"},
|
||||
"generate-structures": {"env": "GENERATE_STRUCTURES"},
|
||||
"generator-settings": {"env": "GENERATOR_SETTINGS"},
|
||||
"hardcore": {"env": "HARDCORE"},
|
||||
"hide-online-players": {"env": "HIDE_ONLINE_PLAYERS"},
|
||||
"initial-disabled-packs": {"env": "INITIAL_DISABLED_PACKS"},
|
||||
"initial-enabled-packs": {"env": "INITIAL_ENABLED_PACKS"},
|
||||
"level-name": {"env": "LEVEL"},
|
||||
"level-seed": {"env": "SEED"},
|
||||
"level-type": {"env": "LEVEL_TYPE"},
|
||||
"log-ips": {"env": "LOG_IPS"},
|
||||
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
|
||||
"max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"},
|
||||
"max-players": {"env": "MAX_PLAYERS"},
|
||||
"max-tick-time": {"env": "MAX_TICK_TIME"},
|
||||
"max-world-size": {"env": "MAX_WORLD_SIZE"},
|
||||
"motd": {"env": "MOTD"},
|
||||
"network-compression-threshold": {"env": "NETWORK_COMPRESSION_THRESHOLD"},
|
||||
"online-mode": {"env": "ONLINE_MODE"},
|
||||
"op-permission-level": {"env": "OP_PERMISSION_LEVEL"},
|
||||
"pause-when-empty-seconds": {"env": "PAUSE_WHEN_EMPTY_SECONDS"},
|
||||
"player-idle-timeout": {"env": "PLAYER_IDLE_TIMEOUT"},
|
||||
"prevent-proxy-connections": {"env": "PREVENT_PROXY_CONNECTIONS"},
|
||||
"previews-chat": {"env": "PREVIEWS_CHAT"},
|
||||
"pvp": {"env": "PVP"},
|
||||
"query.port": {"env": "QUERY_PORT"},
|
||||
"rcon.password": {"env": "RCON_PASSWORD"},
|
||||
"rcon.port": {"env": "RCON_PORT"},
|
||||
"region-file-compression": {"env": "REGION_FILE_COMPRESSION"},
|
||||
"resource-pack": {"env": "RESOURCE_PACK"},
|
||||
"resource-pack-id": {"env": "RESOURCE_PACK_ID"},
|
||||
"resource-pack-prompt": {"env": "RESOURCE_PACK_PROMPT"},
|
||||
"resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"},
|
||||
"require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"},
|
||||
"server-ip": {"env": "SERVER_IP"},
|
||||
"server-name": {"env": "SERVER_NAME"},
|
||||
"server-port": {"env": "SERVER_PORT"},
|
||||
"simulation-distance": {"env": "SIMULATION_DISTANCE"},
|
||||
"snooper-enabled": {"env": "SNOOPER_ENABLED"},
|
||||
"spawn-animals": {"env": "SPAWN_ANIMALS"},
|
||||
"spawn-monsters": {"env": "SPAWN_MONSTERS"},
|
||||
"spawn-npcs": {"env": "SPAWN_NPCS"},
|
||||
"spawn-protection": {"env": "SPAWN_PROTECTION"},
|
||||
"generate-structures": {"env": "GENERATE_STRUCTURES"},
|
||||
"view-distance": {"env": "VIEW_DISTANCE"},
|
||||
"hardcore": {"env": "HARDCORE"},
|
||||
"snooper-enabled": {"env": "SNOOPER_ENABLED"},
|
||||
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
|
||||
"force-gamemode": {"env": "FORCE_GAMEMODE"},
|
||||
"max-tick-time": {"env": "MAX_TICK_TIME"},
|
||||
"enable-query": {"env": "ENABLE_QUERY"},
|
||||
"query.port": {"env": "QUERY_PORT"},
|
||||
"enable-rcon": {"env": "ENABLE_RCON"},
|
||||
"rcon.password": {"env": "RCON_PASSWORD"},
|
||||
"rcon.port": {"env": "RCON_PORT"},
|
||||
"max-players": {"env": "MAX_PLAYERS"},
|
||||
"max-world-size": {"env": "MAX_WORLD_SIZE"},
|
||||
"level-name": {"env": "LEVEL"},
|
||||
"level-seed": {"env": "SEED"},
|
||||
"pvp": {"env": "PVP"},
|
||||
"generator-settings": {"env": "GENERATOR_SETTINGS"},
|
||||
"online-mode": {"env": "ONLINE_MODE"},
|
||||
"allow-flight": {"env": "ALLOW_FLIGHT"},
|
||||
"resource-pack": {"env": "RESOURCE_PACK"},
|
||||
"resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"},
|
||||
"require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"},
|
||||
"player-idle-timeout": {"env": "PLAYER_IDLE_TIMEOUT"},
|
||||
"broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"},
|
||||
"broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"},
|
||||
"enable-jmx-monitoring": {"env": "ENABLE_JMX"},
|
||||
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
|
||||
"enable-status": {"env": "ENABLE_STATUS"},
|
||||
"entity-broadcast-range-percentage": {"env": "ENTITY_BROADCAST_RANGE_PERCENTAGE"},
|
||||
"function-permission-level": {"env": "FUNCTION_PERMISSION_LEVEL"},
|
||||
"network-compression-threshold": {"env": "NETWORK_COMPRESSION_THRESHOLD"},
|
||||
"op-permission-level": {"env": "OP_PERMISSION_LEVEL"},
|
||||
"prevent-proxy-connections": {"env": "PREVENT_PROXY_CONNECTIONS"},
|
||||
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
|
||||
"simulation-distance": {"env": "SIMULATION_DISTANCE"},
|
||||
"previews-chat": {"env": "PREVIEWS_CHAT"},
|
||||
"enforce-secure-profile": {"env": "ENFORCE_SECURE_PROFILE"},
|
||||
"initial-enabled-packs": {"env": "INITIAL_ENABLED_PACKS"},
|
||||
"initial-disabled-packs": {"env": "INITIAL_DISABLED_PACKS"}
|
||||
"view-distance": {"env": "VIEW_DISTANCE"},
|
||||
"white-list": {"env": "WHITELIST_PROP"}
|
||||
}
|
||||
@@ -13,10 +13,24 @@ configMapGenerator:
|
||||
- name: mc
|
||||
envs:
|
||||
- mc.env
|
||||
patches:
|
||||
# Example of using a patch to set external service name for mc-router to pick up
|
||||
- path: set-external-servername.yml
|
||||
```
|
||||
|
||||
### mc.env
|
||||
```
|
||||
EULA=true
|
||||
TYPE=FORGE
|
||||
```
|
||||
|
||||
###
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mc
|
||||
annotations:
|
||||
mc-router.itzg.me/externalServerName: forge.example.com
|
||||
```
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${FOLIA_CHANNEL:=experimental}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
set -o pipefail
|
||||
handleDebugMode
|
||||
|
||||
if [[ $FOLIA_DOWNLOAD_URL ]]; then
|
||||
export PAPER_DOWNLOAD_URL="$FOLIA_DOWNLOAD_URL"
|
||||
fi
|
||||
@@ -8,4 +15,7 @@ if [[ $FOLIABUILD ]]; then
|
||||
export PAPERBUILD="$FOLIABUILD"
|
||||
fi
|
||||
|
||||
PAPER_PROJECT="folia" PAPER_NAME="FoliaMC" exec "${SCRIPTS:-/}start-deployPaper" "$@"
|
||||
PAPER_PROJECT="folia" \
|
||||
PAPER_NAME="FoliaMC" \
|
||||
PAPER_CHANNEL="${FOLIA_CHANNEL}" \
|
||||
exec "${SCRIPTS:-/}start-deployPaper" "$@"
|
||||
|
||||
@@ -10,7 +10,7 @@ handleDebugMode
|
||||
: "${PAPER_CHANNEL:=default}"
|
||||
: "${PAPER_DOWNLOAD_URL:=}"
|
||||
: "${PAPER_CUSTOM_JAR:=}"
|
||||
: "${PAPER_CONFIG_DEFAULTS_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}"
|
||||
: "${PAPER_CONFIG_DEFAULTS_REPO:=${PAPER_CONFIG_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}}"
|
||||
|
||||
resultsFile=/data/.paper.env
|
||||
if [[ $PAPER_CUSTOM_JAR ]]; then
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
: "${EXISTING_OPS_FILE:=SKIP}"
|
||||
: "${EXISTING_WHITELIST_FILE:=SKIP}"
|
||||
: "${EXISTING_OPS_FILE:=SYNC_FILE_MERGE_LIST}"
|
||||
: "${EXISTING_WHITELIST_FILE:=SYNC_FILE_MERGE_LIST}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
Reference in New Issue
Block a user