Auto-merging via docker-versions-create

This commit is contained in:
Geoff Bourne 2021-09-20 12:31:17 -05:00
commit a3972d83bb
33 changed files with 57 additions and 101 deletions

View file

@ -60,7 +60,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.2.0
ARG MC_HELPER_VERSION=1.3.0
RUN curl -fsSL https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf - \
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin

View file

@ -43,10 +43,8 @@ By default, the container will download the latest version of the "vanilla" [Min
* [Running a Forge Server](#running-a-forge-server)
* [Running a Bukkit/Spigot server](#running-a-bukkitspigot-server)
* [Running a Paper server](#running-a-paper-server)
* [Running a Tuinity server](#running-a-tuinity-server)
* [Running an Airplane server](#running-an-airplane-server)
* [Running a Purpur server](#running-a-purpur-server)
* [Running a Yatopia server](#running-a-yatopia-server)
* [Running a Magma server](#running-a-magma-server)
* [Running a Mohist server](#running-a-mohist-server)
* [Running a Catserver type server](#running-a-catserver-type-server)
@ -108,6 +106,7 @@ By default, the container will download the latest version of the "vanilla" [Min
* [Other server property mappings](#other-server-property-mappings)
* [Miscellaneous Options](#miscellaneous-options)
* [Replacing variables inside configs](#replacing-variables-inside-configs)
* [Patching existing files](#patching-existing-files)
* [Running with a custom server JAR](#running-with-a-custom-server-jar)
* [Force re-download of the server file](#force-re-download-of-the-server-file)
* [Running as alternate user/group ID](#running-as-alternate-usergroup-id)
@ -130,7 +129,7 @@ By default, the container will download the latest version of the "vanilla" [Min
* [Enabling Autopause](#enabling-autopause)
* [Running on RaspberryPi](#running-on-raspberrypi)
<!-- Added by: runner, at: Thu Sep 16 02:28:01 UTC 2021 -->
<!-- Added by: runner, at: Mon Sep 20 02:33:20 UTC 2021 -->
<!--te-->
@ -430,17 +429,9 @@ If you have attached a host directory to the `/data` volume, then you can instal
[You can also auto-download plugins using `SPIGET_RESOURCES`.](#auto-downloading-spigotmcbukkitpapermc-plugins)
### Running a Tuinity server
A [Tuinity](https://github.com/Spottedleaf/Tuinity) server, which is a fork of Paper aimed at improving server performance at high playercounts.
-e TYPE=TUINITY
> **NOTE** only `VERSION=LATEST` is supported
### Running an Airplane server
An [Airplane](https://github.com/TECHNOVE/Airplane) server, which is a fork of Tuinity aimed at further improving server performance at high playercounts.
An [Airplane](https://airplane.gg) server, which is "a stable, optimized, well supported 1.17 Paper fork."
-e TYPE=AIRPLANE
@ -453,7 +444,7 @@ Extra variables:
### Running a Purpur server
A [Purpur](https://purpur.pl3x.net/) server, which is "a drop-in replacement for Paper servers designed for configurability, new fun and exciting gameplay features, and high performance built on top of Tuinity."
A [Purpur](https://purpur.pl3x.net/) server, which is "drop-in replacement for Paper servers designed for configurability, new fun and exciting gameplay features, and performance built on top of Airplane."
-e TYPE=PURPUR
@ -462,18 +453,6 @@ A [Purpur](https://purpur.pl3x.net/) server, which is "a drop-in replacement for
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
### Running a Yatopia server
A [Yatopia](https://github.com/YatopiaMC/Yatopia) server, which is a "blazing fast Tuinity fork with best in class performance".
-e TYPE=YATOPIA
> NOTE: the `VERSION` variable is used to locate the Yatopia version to download
Extra variables:
- `RELEASE=stable` : set to `stable` or `latest`
- `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 [Flare](https://blog.airplane.gg/flare) profiler
### Running a Magma server
@ -1146,14 +1125,6 @@ services:
CFG_DB_HOST: "http://localhost:3306"
CFG_DB_NAME: "minecraft"
CFG_DB_PASSWORD_FILE: "/run/secrets/db_password"
restart: always
rcon:
image: itzg/rcon
ports:
- "4326:4326"
- "4327:4327"
volumes:
- "rcon:/opt/rcon-web-admin/db"
volumes:
mc:
@ -1164,9 +1135,47 @@ secrets:
file: ./db_password
```
The content of `db_password`:
### Patching existing files
ug23u3bg39o-ogADSs
JSON path based patches can be applied to one or more existing files by setting the variable `PATCH_DEFINITIONS` to the path of a directory that contains one or more [patch definition json files](https://github.com/itzg/mc-image-helper#patchdefinition) or a [patch set json file](https://github.com/itzg/mc-image-helper#patchset).
Variable placeholders in the patch values can be restricted by setting `REPLACE_ENV_VARIABLE_PREFIX`, which defaults to "CFG_".
The following example shows a patch-set file were various fields in the `paper.yaml` configuration file can be modified and added:
```json
{
"patches": [
{
"file": "/data/paper.yml",
"ops": [
{
"$set": {
"path": "$.verbose",
"value": true
}
},
{
"$set": {
"path": "$.settings['velocity-support'].enabled",
"value": "${CFG_VELOCITY_ENABLED}",
"value-type": "bool"
}
},
{
"$put": {
"path": "$.settings",
"key": "my-test-setting",
"value": "testing"
}
}
]
}
]
}
```
> **NOTES:** Only JSON and Yaml files can be patched at this time. TOML support is planned to be added next. Removal of comments and other cosmetic changes will occur when patched files are processed.
### Running with a custom server JAR

0
files/autopause/autopause-daemon.sh Normal file → Executable file
View file

0
files/autopause/autopause-fcns.sh Normal file → Executable file
View file

0
health.sh Normal file → Executable file
View file

0
start Normal file → Executable file
View file

12
start-configuration Normal file → Executable file
View file

@ -93,10 +93,6 @@ case "${TYPE^^}" in
exec ${SCRIPTS:-/}start-deployPaper "$@"
;;
TUINITY)
exec ${SCRIPTS:-/}start-deployTuinity "$@"
;;
FORGE)
log "**********************************************************************"
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
@ -157,10 +153,6 @@ case "${TYPE^^}" in
exec ${SCRIPTS:-/}start-deployPurpur "$@"
;;
YATOPIA)
exec ${SCRIPTS:-/}start-deployYatopia "$@"
;;
AIRPLANE)
exec ${SCRIPTS:-/}start-deployAirplane "$@"
;;
@ -176,8 +168,8 @@ case "${TYPE^^}" in
*)
log "Invalid type: '$TYPE'"
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON, LIMBO"
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, PURPUR, CUSTOM,"
log " MAGMA, MOHIST, CATSERVER, AIRPLANE, CANYON, LIMBO"
exit 1
;;

0
start-deployAirplane Normal file → Executable file
View file

0
start-deployBukkitSpigot Normal file → Executable file
View file

0
start-deployCF Normal file → Executable file
View file

0
start-deployCanyon Normal file → Executable file
View file

0
start-deployCatserver Normal file → Executable file
View file

0
start-deployCustom Normal file → Executable file
View file

0
start-deployFTBA Normal file → Executable file
View file

0
start-deployFabric Normal file → Executable file
View file

0
start-deployForge Normal file → Executable file
View file

0
start-deployLimbo Normal file → Executable file
View file

0
start-deployMagma Normal file → Executable file
View file

0
start-deployMohist Normal file → Executable file
View file

0
start-deployPaper Normal file → Executable file
View file

0
start-deploySpongeVanilla Normal file → Executable file
View file

View file

@ -1,26 +0,0 @@
#!/bin/bash
. ${SCRIPTS:-/}start-utils
if [ "${VERSION}" != "LATEST" ]; then
log "ERROR: Tuinity server type only supports VERSION=LATEST"
exit 1
fi
: ${TUINITY_BUILD:=lastSuccessfulBuild}
export SERVER=tuinity-${VANILLA_VERSION}-${TUINITY_BUILD}.jar
if [ ! -f "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
downloadUrl="https://ci.codemc.io/job/Spottedleaf/job/Tuinity/${TUINITY_BUILD}/artifact/tuinity-paperclip.jar"
log "Downloading Tuinity (build $TUINITY_BUILD) from $downloadUrl ..."
curl -fsSL -o "$SERVER" "$downloadUrl"
if [ ! -f "$SERVER" ]; then
log "ERROR: failed to download from $downloadUrl (status=$?)"
exit 3
fi
fi
# Normalize on Spigot for later operations
export TYPE=SPIGOT
exec ${SCRIPTS:-/}start-spiget "$@"

0
start-deployVanilla Normal file → Executable file
View file

View file

@ -1,29 +0,0 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
. ${SCRIPTS:-/}start-utils
isDebugging && set -x
: ${VANILLA_VERSION:?}
: ${RELEASE:=latest}
: ${FORCE_REDOWNLOAD:=false}
requireEnum RELEASE stable latest
export SERVER="yatopia-${RELEASE}-${VANILLA_VERSION}.jar"
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
downloadUrl="https://api.yatopiamc.org/v2/${RELEASE}Build/download?branch=ver/${VANILLA_VERSION}"
log "Downloading Yatopia from $downloadUrl ..."
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
log "ERROR: failed to download from $downloadUrl (status=$?)"
exit 3
fi
fi
# Normalize on Spigot for later operations
export TYPE=SPIGOT
export SKIP_LOG4J_CONFIG=true
exec ${SCRIPTS:-/}start-setupWorld $@

0
start-finalExec Normal file → Executable file
View file

10
start-setupEnvVariables Normal file → Executable file
View file

@ -2,12 +2,15 @@
. ${SCRIPTS:-/}start-utils
set -e
: ${REPLACE_ENV_IN_PLACE:=${REPLACE_ENV_VARIABLES:-false}}
: ${REPLACE_ENV_PATHS:=/data}
: ${REPLACE_ENV_SUFFIXES:=yml,yaml,txt,cfg,conf,properties,hjson,json,tml,toml}
: ${REPLACE_ENV_VARIABLE_PREFIX:=${ENV_VARIABLE_PREFIX:-CFG_}}
: ${REPLACE_ENV_VARIABLES_EXCLUDES:=}
: ${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}
: ${PATCH_DEFINITIONS:=}
: ${DEBUG:=false}
if isTrue "${REPLACE_ENV_IN_PLACE}"; then
@ -21,4 +24,11 @@ if isTrue "${REPLACE_ENV_IN_PLACE}"; then
"${REPLACE_ENV_PATHS[@]}"
fi
if [[ ${PATCH_DEFINITIONS} ]]; then
log "Applying patch definitions from ${PATCH_DEFINITIONS}"
mc-image-helper --debug=${DEBUG} patch \
--patch-env-prefix=${REPLACE_ENV_VARIABLE_PREFIX} \
"${PATCH_DEFINITIONS}"
fi
exec ${SCRIPTS:-/}start-finalExec $@

0
start-setupModconfig Normal file → Executable file
View file

0
start-setupModpack Normal file → Executable file
View file

0
start-setupMounts Normal file → Executable file
View file

0
start-setupServerProperties Normal file → Executable file
View file

0
start-setupWorld Normal file → Executable file
View file

0
start-spiget Normal file → Executable file
View file

0
start-utils Normal file → Executable file
View file