mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-09-03 20:55:05 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78ecbb5749 | ||
|
|
e992e71988 | ||
|
|
3cc2e64163 | ||
|
|
f1dd0f3d71 | ||
|
|
292b2f757e | ||
|
|
82043d556e | ||
|
|
d9bf26cc17 |
+1
-1
@@ -43,7 +43,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
||||
ARG MC_MONITOR_VERSION=0.16.7
|
||||
ARG MC_MONITOR_VERSION=0.16.8
|
||||
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
|
||||
|
||||
@@ -26,7 +26,10 @@ docker run -d --pull=always \
|
||||
|
||||
By default, supported server types remove stale server libraries during installation by setting `CLEAN_SERVER_LIBRARIES` to `true`. Set `CLEAN_SERVER_LIBRARIES` to `false` to disable this cleanup if it causes unexpected behavior.
|
||||
|
||||
Currently, library cleanup is supported by `TYPE=PAPER`. Other server jar types are not yet supported.
|
||||
Currently, library cleanup is supported by
|
||||
|
||||
- `TYPE=PAPER`
|
||||
- `TYPE=PURPUR`
|
||||
|
||||
## Running as alternate user/group ID
|
||||
|
||||
@@ -244,4 +247,4 @@ To also include the timestamp with each log, set `LOG_TIMESTAMP` to "true". The
|
||||
|
||||
```
|
||||
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
|
||||
```
|
||||
```
|
||||
|
||||
@@ -42,6 +42,19 @@ There are optional volume paths that can be attached to supply content to be cop
|
||||
`/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`.
|
||||
|
||||
!!! example "Loading mods from a local directory"
|
||||
|
||||
This is the most basic example, where `./mods` is mounted as `/mods`. If the directory with the server's mods is located somewhere else, `./mods` can be modified accordingly.
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: "NEOFORGE"
|
||||
volumes:
|
||||
- "./data:/data"
|
||||
- "./mods:/mods"
|
||||
```
|
||||
|
||||
`/config`
|
||||
: contents are synchronized into `/data/config` by default, but can be changed with `COPY_CONFIG_DEST`. For example, `-v ./config:/config -e COPY_CONFIG_DEST=/data` will allow you to copy over files like `bukkit.yml` and so on directly into the server directory. The source can be changed by setting `COPY_CONFIG_SRC`. Set `SYNC_SKIP_NEWER_IN_DESTINATION=false` if you want files from `/config` to take precedence over newer files in `/data/config`.
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ docker run -d --pull=always \
|
||||
|
||||
packwiz modpack definitions are processed before other mod definitions (`MODPACK`, `MODS`, etc.) to allow for additional processing/overrides you may want to perform (in case of mods not available via Modrinth/CurseForge, or you do not maintain the pack).
|
||||
|
||||
If the pack ships a `.env` file that you reference with `LOAD_ENV_FROM_FILE`, that file is re-loaded immediately after the packwiz installer runs, so the freshly downloaded values are applied to the remaining startup stages. Note that `TYPE` and `VERSION` are resolved earlier (before the deploy is dispatched), so a pack-provided `.env` cannot change those from within packwiz; use `LOAD_ENV_FROM_GENERIC_PACK` or `LOAD_ENV_FROM_ARCHIVE` for those.
|
||||
|
||||
!!! note
|
||||
|
||||
packwiz is pre-configured to only download server mods. If client-side mods are downloaded and cause issues, check your pack.toml configuration, and make sure any client-only mods are not set to `"both"`, but rather `"client"` for the side configuration item.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
click==8.4.1
|
||||
click==8.4.2
|
||||
colorama==0.4.6
|
||||
deepmerge==2.1.0
|
||||
ghp-import==2.1.0
|
||||
|
||||
@@ -31,7 +31,7 @@ function getGTNHdownloadPath(){
|
||||
else
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r --arg USRIN $GTNH_PACK_VERSION '.versions|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
||||
| jq -r --arg USRIN "$GTNH_PACK_VERSION" '.versions|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
@@ -160,7 +160,7 @@ function handleGTNH() {
|
||||
deleteGTNHbackup
|
||||
fi
|
||||
|
||||
if [[ -n $GTNH_PACK_VERSION ]] && isFalse "$SKIP_GTNH_UPDATE_CHECK" ; then
|
||||
if [[ -n "$GTNH_PACK_VERSION" ]] && isFalse "$SKIP_GTNH_UPDATE_CHECK" ; then
|
||||
|
||||
getGTNHdownloadPath
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ elif [[ $PAPER_DOWNLOAD_URL ]]; then
|
||||
--url="$PAPER_DOWNLOAD_URL"
|
||||
)
|
||||
|
||||
if [[ $CLEAN_SERVER_LIBRARIES ]]; then
|
||||
if isTrue $CLEAN_SERVER_LIBRARIES; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
|
||||
@@ -45,7 +45,7 @@ else
|
||||
args+=(--build="$PAPER_BUILD")
|
||||
fi
|
||||
|
||||
if [[ $CLEAN_SERVER_LIBRARIES ]]; then
|
||||
if isTrue $CLEAN_SERVER_LIBRARIES; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ IFS=$'\n\t'
|
||||
: "${PURPUR_BUILD:=LATEST}"
|
||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||
: "${PURPUR_CONFIG_REPO:=}"
|
||||
: "${CLEAN_SERVER_LIBRARIES:=true}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
@@ -13,10 +14,15 @@ isDebugging && set -x
|
||||
resultsFile=/data/.purpur.env
|
||||
|
||||
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
||||
if ! mc-image-helper install-purpur \
|
||||
--output-directory=/data \
|
||||
--results-file="$resultsFile" \
|
||||
--url="${PURPUR_DOWNLOAD_URL}"; then
|
||||
args=(
|
||||
--output-directory=/data
|
||||
--results-file="$resultsFile"
|
||||
--url="${PURPUR_DOWNLOAD_URL}"
|
||||
)
|
||||
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||
logError "Failed to download from custom Purpur URL"
|
||||
exit 1
|
||||
fi
|
||||
@@ -29,6 +35,9 @@ else
|
||||
if [[ $PURPUR_BUILD ]]; then
|
||||
args+=(--build="$PURPUR_BUILD")
|
||||
fi
|
||||
if isTrue "$CLEAN_SERVER_LIBRARIES"; then
|
||||
args+=(--clean-libraries)
|
||||
fi
|
||||
if ! mc-image-helper install-purpur "${args[@]}"; then
|
||||
logError "Failed to download Purpur"
|
||||
exit 1
|
||||
|
||||
@@ -50,6 +50,16 @@ function handlePackwiz() {
|
||||
logError "Failed to run packwiz installer"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# packwiz may have just downloaded/updated the env file referenced by
|
||||
# LOAD_ENV_FROM_FILE. The initial load in start-configuration happened
|
||||
# before this point, so re-load it now to pick up the pack's values for
|
||||
# the remaining setup stages (server.properties, JVM args, etc.).
|
||||
if [[ ${LOAD_ENV_FROM_FILE:-} ]]; then
|
||||
if ! loadEnvFromFile "${LOAD_ENV_FROM_FILE}"; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user