mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 07:03:57 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32b343840f | ||
|
|
0a98bee40e | ||
|
|
93d94f5ba8 | ||
|
|
f3ed09882b | ||
|
|
7325baf750 | ||
|
|
c23654008b | ||
|
|
f8ff8a7b8a | ||
|
|
9c01462c0c | ||
|
|
21c5c980d5 | ||
|
|
4458908a44 | ||
|
|
c9094063d3 | ||
|
|
320ad0906f | ||
|
|
128bbff3d7 | ||
|
|
82aafd5f5e | ||
|
|
f746162360 | ||
|
|
0131f66e46 |
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -108,7 +108,7 @@ jobs:
|
||||
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
|
||||
@@ -175,6 +175,7 @@ jobs:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
|
||||
|
||||
9
.github/workflows/verify-pr.yml
vendored
9
.github/workflows/verify-pr.yml
vendored
@@ -19,14 +19,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
|
||||
@@ -92,5 +92,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/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -68,6 +68,7 @@ dnf clean all
|
||||
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
|
||||
ls -l /usr/local/sbin/knockd
|
||||
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
||||
|
||||
# Set git credentials globally
|
||||
|
||||
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"]
|
||||
@@ -81,6 +81,8 @@ The openj9 image tags include specific variables to simplify configuration:
|
||||
|
||||
The image now uses 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.
|
||||
|
||||
Set the environment variable `GENERATE_LOG4J2_CONFIG` to "true" to enable the following features.
|
||||
|
||||
### Customization via environment variables
|
||||
|
||||
You can customize various aspects of the logging behavior using environment variables:
|
||||
|
||||
@@ -238,15 +238,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
|
||||
|
||||
@@ -444,4 +475,4 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
||||
| 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) |
|
||||
|
||||
@@ -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>.
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
mkdocs-material == 9.7.0
|
||||
mkdocs-autorefs == 1.4.3
|
||||
mkdocstrings[python] == 0.30.1
|
||||
mkdocs-literate-nav == 0.6.2
|
||||
mdx-gh-links == 0.4
|
||||
# need to pin for auto reload to work
|
||||
# see https://github.com/mkdocs/mkdocs/issues/4032
|
||||
click==8.2.1
|
||||
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==1.15.0
|
||||
Jinja2==3.1.6
|
||||
Markdown==3.10
|
||||
MarkupSafe==3.0.3
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.6.1
|
||||
mkdocs-autorefs==1.4.3
|
||||
mkdocs-get-deps==0.2.0
|
||||
mkdocstrings==1.0.0
|
||||
mkdocstrings-python==2.0.1
|
||||
packaging==25.0
|
||||
pathspec==1.0.3
|
||||
platformdirs==4.5.1
|
||||
Pygments==2.19.2
|
||||
pymdown-extensions==10.20
|
||||
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:///
|
||||
|
||||
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
|
||||
```
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: With websocket
|
||||
title: With WebSocket
|
||||
---
|
||||
|
||||
With `WEBSOCKET_CONSOLE` set to `true`, logs can be streamed, and commands sent, over a websocket connection.
|
||||
With `WEBSOCKET_CONSOLE` set to `true`, logs can be streamed, and commands sent, over a WebSocket connection.
|
||||
The API is available on `/console`.
|
||||
|
||||
## Password
|
||||
@@ -21,7 +21,16 @@ The listen address and port can be set with `WEBSOCKET_ADDRESS` (defaults to `0.
|
||||
## 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"
|
||||
??? 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:
|
||||
@@ -34,12 +43,12 @@ When a connection is established, the last 50 (by default, configurable with `WE
|
||||
## 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_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_DISABLE_AUTHENTICATION` | Disable WebSocket authentication | `false` |
|
||||
| `WEBSOCKET_LOG_BUFFER_SIZE` | Number of log lines to save and send to connecting clients | `50` |
|
||||
|
||||
## API Schema
|
||||
|
||||
@@ -12,8 +12,8 @@ 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-jdk | 25 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
|
||||
| java25-graalvm | 25 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (5) |
|
||||
|
||||
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:
|
||||
@@ -35,6 +35,7 @@
|
||||
"controllable",
|
||||
"controlling",
|
||||
"craftpresence",
|
||||
"crash-assistant",
|
||||
"cull-less-leaves",
|
||||
"ctm",
|
||||
"custom-main-menu",
|
||||
@@ -100,6 +101,7 @@
|
||||
"lootbeams",
|
||||
"magnesium-extras",
|
||||
"make-bubbles-pop",
|
||||
"mekalus-oculus-fork-with-fixed-mekanism-mekasuit",
|
||||
"menumobs",
|
||||
"minecraft-rich-presence",
|
||||
"mining-speed-tooltips",
|
||||
@@ -183,7 +185,10 @@
|
||||
"forceIncludes": ["just-enough-resources-jer"]
|
||||
},
|
||||
"ftb-stoneblock-4": {
|
||||
"forceIncludes": ["particular-reforged"]
|
||||
"forceIncludes": [
|
||||
"particular-reforged",
|
||||
"ctm"
|
||||
]
|
||||
},
|
||||
"mc-eternal-2": {
|
||||
"forceIncludes": [
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"continuity",
|
||||
"controlling",
|
||||
"craftpresence",
|
||||
"CrashAssistant",
|
||||
"Cull Less Leaves",
|
||||
"cwb",
|
||||
"DisableCustomWorldsAdvice",
|
||||
|
||||
95
mkdocs.yml
95
mkdocs.yml
@@ -1,95 +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 2025.
|
||||
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
|
||||
@@ -321,7 +321,7 @@ case "${TYPE^^}" in
|
||||
logError "Invalid TYPE: '$TYPE'"
|
||||
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
|
||||
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, GTNH, AIRPLANE, PUFFERFISH,"
|
||||
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER"
|
||||
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER, NEOFORGE"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${FOLIA_CHANNEL:=experimental}"
|
||||
: "${FOLIA_CHANNEL:=default}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
@@ -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
|
||||
@@ -104,7 +104,8 @@ elif versionLessThan 1.18.1; then
|
||||
fi
|
||||
|
||||
# Set up log4j2 configuration with templating support
|
||||
if ${canUseRollingLogs}; then
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
if ${useGeneratedLogs}; then
|
||||
# Set up log configuration defaults
|
||||
: "${LOG_LEVEL:=info}"
|
||||
: "${ROLLING_LOG_MAX_FILES:=1000}"
|
||||
@@ -128,10 +129,9 @@ if ${canUseRollingLogs}; then
|
||||
export LOG_LEVEL ROLLING_LOG_FILE_PATTERN ROLLING_LOG_MAX_FILES
|
||||
export LOG_CONSOLE_FORMAT LOG_TERMINAL_FORMAT LOG_FILE_FORMAT
|
||||
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
|
||||
# Always regenerate if file doesn't exist or REGENERATE_LOG4J2 is set
|
||||
if [ ! -e "$LOGFILE" ] || isTrue "${REGENERATE_LOG4J2:-false}"; then
|
||||
# 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
|
||||
@@ -142,6 +142,9 @@ if ${canUseRollingLogs}; then
|
||||
<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>
|
||||
@@ -169,10 +172,8 @@ EOF
|
||||
|
||||
# Apply the log4j2 configuration
|
||||
JVM_OPTS="-Dlog4j.configurationFile=log4j2.xml ${JVM_OPTS}"
|
||||
elif isTrue "${ENABLE_ROLLING_LOGS:-false}"; then
|
||||
# Legacy behavior: error if rolling logs explicitly requested but not possible
|
||||
logError "Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
|
||||
exit 1
|
||||
else
|
||||
rm -f "${LOGFILE}"
|
||||
fi
|
||||
|
||||
# Optional disable console
|
||||
|
||||
42
zensical.toml
Normal file
42
zensical.toml
Normal file
@@ -0,0 +1,42 @@
|
||||
[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.expand",
|
||||
"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