Compare commits

..

10 Commits

Author SHA1 Message Date
Geoff Bourne
fc96723db1 Auto-merging via docker-versions-create 2020-06-19 13:27:05 -05:00
Geoff Bourne
8d3e461b4c Auto-merging via docker-versions-create 2020-05-20 08:15:12 -05:00
Geoff Bourne
fd73417411 Auto-merging via docker-versions-create 2020-05-02 09:34:30 -05:00
Geoff Bourne
1207b9a685 Auto-merging via docker-versions-create 2020-04-25 12:11:09 -05:00
Geoff Bourne
e6259bfd9d Auto-merging via docker-versions-create 2020-04-17 21:29:12 -05:00
Geoff Bourne
b5e7b952e4 Auto-merging via docker-versions-create 2020-04-11 08:51:52 -05:00
Geoff Bourne
ac5b960182 Auto-merging via docker-versions-create 2020-04-10 11:08:59 -05:00
Geoff Bourne
3299dec733 Auto-merging via docker-versions-create 2020-04-03 13:31:44 -05:00
Geoff Bourne
578f06087f Changed JVM_XX_OPTS to use default GC 2020-03-13 10:55:19 -05:00
Geoff Bourne
fb364e8301 Prepared adopt13 branch 2020-03-02 21:08:22 -06:00
19 changed files with 119 additions and 217 deletions

View File

@@ -1,4 +1,6 @@
name: Build and Publish # This is a basic workflow to help you get started with Actions
name: Build non-multiarch branches/tags
on: on:
push: push:
@@ -14,6 +16,8 @@ on:
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly" - "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
- "[0-9]+.[0-9]+.[0-9]+-adopt11" - "[0-9]+.[0-9]+.[0-9]+-adopt11"
- "[0-9]+.[0-9]+.[0-9]+-adopt13" - "[0-9]+.[0-9]+.[0-9]+-adopt13"
pull_request:
branches: [ master ]
jobs: jobs:
build: build:
@@ -29,7 +33,7 @@ jobs:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
tag_with_ref: true tag_with_ref: true
tag_with_sha: false tag_with_sha: true
cache_froms: itzg/minecraft-server:latest cache_froms: itzg/minecraft-server:latest
add_git_labels: true add_git_labels: true
push: true push: false

View File

@@ -1,19 +0,0 @@
name: PR validation
on:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Docker image
uses: docker/build-push-action@v1.1.0
with:
tag_with_sha: true
cache_froms: itzg/minecraft-server:latest
push: false

View File

@@ -1,17 +1,4 @@
## Adding a server type Individual scripts can be iteratively developed and tested using the following procedure.
Adding a new server `TYPE` can vary due to the complexity of obtaining and configuring each type; however, the addition of any server type includes at least the following steps:
1. Copy an existing "start-deploy*" script, such as [start-deployMohist](start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix
2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-finalSetup01World` at the end of the script
3. Develop and test the changes using the [iterative process described below](#iterative-script-development)
4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](start-configuration)
5. Add a section to the [README](README.md). It is recommended to copy-modify an existing section to retain a similar wording and level of detail
6. [Submit a pull request](https://github.com/itzg/docker-minecraft-server/pulls)
## 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: First, build a baseline of the image to include the packages needed by existing or new scripts:
@@ -39,36 +26,3 @@ VANILLA_VERSION=1.12.2 /scripts/start-magma
``` ```
> 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. > 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.
## Multi-base-image variants
Several base-image variants are maintained in order to offer choices in JDK provider and version. The variants are maintained in their respective branches:
- openj9
- openj9-nightly
- adopt11
- adopt13
- multiarch
The [docker-versions-create.sh](docker-versions-create.sh) script is configured with the branches to maintain and is used to merge changes from the master branch into the mulit-base variant branches. The script also manages git tagging the master branch along with the merged branches. So a typical use of the script would be like:
```shell script
./docker-versions-create.sh -s -t 1.2.0
```
> Most often the major version will be bumped unless a bug or hotfix needs to be published in which case the patch version should be incremented.
> The build and publishing of those branches and their tags is currently performed within Docker Hub.
## multiarch support
The [multiarch branch](https://github.com/itzg/docker-minecraft-server/tree/multiarch) supports running the image on amd64, arm64, and armv7 (aka RaspberryPi). Unlike the mainline branches, it is based on Ubuntu 18.04 since the openjdk package provided by Ubuntu includes full JIT support on all of the processor types.
The multiarch images are built and published by [a Github action](https://github.com/itzg/docker-minecraft-server/actions?query=workflow%3A%22Build+and+publish+multiarch%22), which [is configured in that branch](https://github.com/itzg/docker-minecraft-server/blob/multiarch/.github/workflows/build-multiarch.yml).
## Generating release notes
The following git command can be used to provide the bulk of release notes content:
```shell script
git log --invert-grep --grep "^ci:" --grep "^misc:" --pretty="- %s" 1.1.0..1.2.0
```

View File

@@ -1,4 +1,4 @@
FROM openjdk:8u212-jre-alpine FROM adoptopenjdk/openjdk13:alpine-jre
LABEL maintainer "itzg" LABEL maintainer "itzg"
@@ -67,7 +67,7 @@ COPY log4j2.xml /tmp/log4j2.xml
WORKDIR /data WORKDIR /data
ENV UID=1000 GID=1000 \ ENV UID=1000 GID=1000 \
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \ MEMORY="1G" \
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \ TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \ PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \ LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \

View File

@@ -2,13 +2,16 @@
[![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?maxAge=2592000)](https://hub.docker.com/r/itzg/minecraft-server/) [![Docker Stars](https://img.shields.io/docker/stars/itzg/minecraft-server.svg?maxAge=2592000)](https://hub.docker.com/r/itzg/minecraft-server/)
[![GitHub Issues](https://img.shields.io/github/issues-raw/itzg/docker-minecraft-server.svg)](https://github.com/itzg/docker-minecraft-server/issues) [![GitHub Issues](https://img.shields.io/github/issues-raw/itzg/docker-minecraft-server.svg)](https://github.com/itzg/docker-minecraft-server/issues)
[![Discord](https://img.shields.io/discord/660567679458869252)](https://discord.gg/DXfKpjB) [![Discord](https://img.shields.io/discord/660567679458869252)](https://discord.gg/DXfKpjB)
[![Build and Publish](https://github.com/itzg/docker-minecraft-server/workflows/Build%20and%20Publish/badge.svg)](https://github.com/itzg/docker-minecraft-server/actions)
[![](https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-orange.svg)](https://www.buymeacoffee.com/itzg) [![](https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-orange.svg)](https://www.buymeacoffee.com/itzg)
This docker image provides a Minecraft Server that will automatically download the latest stable This docker image provides a Minecraft Server that will automatically download the latest stable
version at startup. You can also run/upgrade to any specific version or the version at startup. You can also run/upgrade to any specific version or the
latest snapshot. See the _Versions_ section below for more information. latest snapshot. See the _Versions_ section below for more information.
[![Click for more docs](https://i.imgur.com/jS02ebD.png)](https://github.com/itzg/docker-minecraft-server/blob/master/README.md)
[Full docs available in Github](https://github.com/itzg/docker-minecraft-server/blob/master/README.md)
To simply use the latest stable version, run To simply use the latest stable version, run
docker run -d -p 25565:25565 --name mc itzg/minecraft-server docker run -d -p 25565:25565 --name mc itzg/minecraft-server
@@ -176,13 +179,11 @@ You can also query the container's health in a script friendly way:
healthy healthy
``` ```
## Autopause (experimental) ## Autopause
### Description ### Description
> EXPERIMENTAL: this feature only works with default bridge networking using official Docker distributions. Host networking and container management software, such as Portainer, and NAS solutions do not seem to provide compatible networking. > There are various bug reports on [Mojang](https://bugs.mojang.com) about high CPU usage of servers with newer versions, even with few or no clients connected (e.g. [this one](https://bugs.mojang.com/browse/MC-149018), in fact the functionality is based on [this comment in the thread](https://bugs.mojang.com/browse/MC-149018?focusedCommentId=593606&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-593606)).
There are various bug reports on [Mojang](https://bugs.mojang.com) about high CPU usage of servers with newer versions, even with few or no clients connected (e.g. [this one](https://bugs.mojang.com/browse/MC-149018), in fact the functionality is based on [this comment in the thread](https://bugs.mojang.com/browse/MC-149018?focusedCommentId=593606&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-593606)).
An autopause functionality has been added to this image to monitor whether clients are connected to the server. If for a specified time no client is connected, the Java process is stopped. When knocking on the server port (e.g. by the ingame Multiplayer server overview), the process is resumed. The experience for the client does not change. An autopause functionality has been added to this image to monitor whether clients are connected to the server. If for a specified time no client is connected, the Java process is stopped. When knocking on the server port (e.g. by the ingame Multiplayer server overview), the process is resumed. The experience for the client does not change.
@@ -192,7 +193,7 @@ From the server's point of view, the pausing causes a single tick to take as lon
On startup the `server.properties` file is checked and, if applicable, a warning is printed to the terminal. When the server is created (no data available in the persistent directory), the properties file is created with the Watchdog disabled. On startup the `server.properties` file is checked and, if applicable, a warning is printed to the terminal. When the server is created (no data available in the persistent directory), the properties file is created with the Watchdog disabled.
A starting, example compose file has been provided in [examples/docker-compose-autopause.yml](examples/docker-compose-autopause.yml). The autopause functionality is not compatible with docker's host network_mode, as the `knockd` utility cannot properly listen for connections in that mode.
### Enabling Autopause ### Enabling Autopause
@@ -396,6 +397,13 @@ If you are hosting your own copy of Bukkit/Spigot you can override the download
You can build spigot from source by adding `-e BUILD_FROM_SOURCE=true` You can build spigot from source by adding `-e BUILD_FROM_SOURCE=true`
**NOTE: to avoid pegging the CPU when running Spigot,** you will need to
pass `--noconsole` at the very end of the command line and not use `-it`. For example,
docker run -d -v /path/on/host:/data \
-e TYPE=SPIGOT \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server --noconsole
You can install Bukkit plugins in two ways... You can install Bukkit plugins in two ways...
### Using the /data volume ### Using the /data volume
@@ -447,6 +455,13 @@ but you can also choose to run a specific build with `-e PAPERBUILD=205`.
-e TYPE=PAPER \ -e TYPE=PAPER \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server -p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
**NOTE: to avoid pegging the CPU when running PaperSpigot,** you will need to
pass `--noconsole` at the very end of the command line and not use `-it`. For example,
docker run -d -v /path/on/host:/data \
-e TYPE=PAPER \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server --noconsole
If you are hosting your own copy of PaperSpigot you can override the download URL with: If you are hosting your own copy of PaperSpigot you can override the download URL with:
- -e PAPER_DOWNLOAD_URL=<url> - -e PAPER_DOWNLOAD_URL=<url>
@@ -519,15 +534,6 @@ A [Mohist](https://github.com/Mohist-Community/Mohist) server can be used with
> **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2" > **NOTE** there are limited base versions supported, so you will also need to set `VERSION`, such as "1.12.2"
## Running a Catserver type server
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
## Running a server with a Feed the Beast modpack ## Running a server with a Feed the Beast modpack
> **NOTE** requires `itzg/minecraft-server:multiarch` image > **NOTE** requires `itzg/minecraft-server:multiarch` image
@@ -747,13 +753,9 @@ The server name (e.g. for bungeecord) can be set like:
### Server port ### Server port
> **WARNING:** 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. Use `-p` port mappings instead. The server port can be set like:
If you must, the server port can be set like: docker run -d -e SERVER_PORT=25565 ...
docker run -d -e SERVER_PORT=25566 ...
**however**, be sure to change your port mapping accordingly and be prepared for some features to break.
### Difficulty ### Difficulty
@@ -1056,21 +1058,9 @@ Allows users to use flight on your server while in Survival mode, if they have a
### Other server property mappings ### Other server property mappings
| Environment Variable | Server Property | Environment Variable | Server Property
| --------------------------------- | --------------------------------- | ---------------------|-----------------
| PLAYER_IDLE_TIMEOUT | player-idle-timeout | PLAYER_IDLE_TIMEOUT | player-idle-timeout
| BROADCAST_CONSOLE_TO_OPS | broadcast-console-to-ops |
| BROADCAST_RCON_TO_OPS | broadcast-rcon-to-ops |
| ENABLE_JMX | enable-jmx-monitoring |
| SYNC_CHUNK_WRITES | sync-chunk-writes |
| ENABLE_STATUS | enable-status |
| ENTITY_BROADCAST_RANGE_PERCENTAGE | entity-broadcast-range-percentage |
| FUNCTION_PERMISSION_LEVEL | function-permission-level |
| NETWORK_COMPRESSION_THRESHOLD | network-compression-threshold |
| OP_PERMISSION_LEVEL | op-permission-level |
| PREVENT_PROXY_CONNECTIONS | prevent-proxy-connections |
| USE_NATIVE_TRANSPORT | use-native-transport |
| ENFORCE_WHITELIST | enforce-whitelist |
## Miscellaneous Options ## Miscellaneous Options
@@ -1137,7 +1127,8 @@ a companion squid proxy by setting the equivalent of
### Using "noconsole" option ### Using "noconsole" option
Some older versions (pre-1.14) of Spigot required `--noconsole` to be passed when detaching stdin, which can be done by setting `-e CONSOLE=FALSE`. Some older versions of Spigot required `--noconsole` to be passed when detaching stdin. You can
pass that at the end of `docker run` after the image name or set `-e CONSOLE=FALSE`.
### Explicitly disable GUI ### Explicitly disable GUI
@@ -1148,6 +1139,6 @@ disable that by passing `-e GUI=FALSE`.
To run this image on a RaspberryPi 3 B+, 4, or newer, use the image tag To run this image on a RaspberryPi 3 B+, 4, or newer, use the image tag
itzg/minecraft-server:multiarch itzg/minecraft-server:armv7
> NOTE: you may need to lower the memory allocation, such as `-e MEMORY=750m` > NOTE: you may need to lower the memory allocation, such as `-e MEMORY=750m`

34
build-multiarch.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# manually purge any pre-existing manifest list
# since docker manifest command lacks a "remove" operation
rm -rf ~/.docker/manifests/docker.io_itzg_minecraft-server-multiarch
export DOCKER_BUILDKIT=1
docker build --platform linux/arm64 -t itzg/minecraft-server:arm64 .
docker push itzg/minecraft-server:arm64
armv7tag=armv7-buildkit
armv7workDir=/tmp/armv7-$$
git worktree add $armv7workDir armv7
# sub-shell for build of armv7
(
cd $armv7workDir
docker build --platform linux/arm/v7 -t itzg/minecraft-server:$armv7tag .
docker push itzg/minecraft-server:$armv7tag
)
git worktree remove $armv7workDir
docker pull itzg/minecraft-server
# use the rpi build one for now since armv7-buildkit is giving ABI mismatch on curl
docker pull itzg/minecraft-server:armv7
docker manifest create itzg/minecraft-server:multiarch \
itzg/minecraft-server \
itzg/minecraft-server:armv7 \
itzg/minecraft-server:arm64
docker manifest inspect itzg/minecraft-server:multiarch
docker manifest push -p itzg/minecraft-server:multiarch

18
development/update-multiarch.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
manifest="itzg/minecraft-server:multiarch"
for t in latest rpi3 aarch64; do
docker pull itzg/minecraft-server:$t
done
docker manifest create --amend ${manifest} \
itzg/minecraft-server:aarch64 \
itzg/minecraft-server:latest \
itzg/minecraft-server:rpi3
docker manifest annotate --os linux --arch amd64 ${manifest} itzg/minecraft-server:latest
docker manifest annotate --os linux --arch arm64 ${manifest} itzg/minecraft-server:aarch64
docker manifest annotate --os linux --arch arm --variant v7 ${manifest} itzg/minecraft-server:rpi3
docker manifest push ${manifest}

View File

@@ -10,7 +10,19 @@ services:
- "mc:/data" - "mc:/data"
environment: environment:
EULA: "TRUE" EULA: "TRUE"
CONSOLE: "false"
ENABLE_RCON: "true"
RCON_PASSWORD: "testing"
RCON_PORT: 28016
restart: always restart: always
rcon:
image: itzg/rcon
ports:
- "4326:4326"
- "4327:4327"
volumes:
- "rcon:/opt/rcon-web-admin/db"
volumes: volumes:
mc: {} mc:
rcon:

View File

@@ -10,7 +10,7 @@ function TrapExit {
batchMode=false batchMode=false
while getopts "hbt:s" arg while getopts "hbt:" arg
do do
case $arg in case $arg in
b) b)
@@ -19,9 +19,6 @@ do
t) t)
tag=${OPTARG} tag=${OPTARG}
;; ;;
s)
tagArgs="-s -m 'Signed during docker-versions-create"
;;
h) h)
echo " echo "
Usage $0 [options] Usage $0 [options]
@@ -31,7 +28,6 @@ Options:
when any merge fails when any merge fails
-t TAG tag and push the current revision on master with the given tag -t TAG tag and push the current revision on master with the given tag
and apply respective tags to each branch and apply respective tags to each branch
-s enable signed tags
-h display this help and exit -h display this help and exit
" "
exit exit

View File

@@ -1,18 +0,0 @@
version: '3.8'
services:
minecraft:
image: itzg/minecraft-server
ports:
- "25565:25565"
volumes:
- "mc:/data"
environment:
EULA: "TRUE"
ENABLE_AUTOPAUSE: "TRUE"
OVERRIDE_SERVER_PROPERTIES: "TRUE"
MAX_TICK_TIME: "-1"
restart: always
volumes:
mc: {}

View File

@@ -7,8 +7,7 @@ services:
EULA: "true" EULA: "true"
TYPE: PAPER TYPE: PAPER
VERSION: 1.9.4 VERSION: 1.9.4
# needed for Paper versions before 1.14 command: --noconsole
CONSOLE: "false"
ports: ports:
- 25565:25565 - 25565:25565
volumes: volumes:

View File

@@ -37,15 +37,3 @@ motd=A Minecraft Server powered by Docker
generator-settings= generator-settings=
rcon.password= rcon.password=
max-world-size=29999984 max-world-size=29999984
broadcast-console-to-ops=true
broadcast-rcon-to-ops=true
enable-jmx-monitoring=false
sync-chunk-writes=true
enable-status=true
entity-broadcast-range-percentage=100
function-permission-level=2
network-compression-threshold=256
op-permission-level=4
prevent-proxy-connections=false
use-native-transport=true
enforce-whitelist=false

View File

@@ -40,7 +40,6 @@ rm /data/.verify_access || true
if [[ $PROXY ]]; then if [[ $PROXY ]]; then
export http_proxy="$PROXY" export http_proxy="$PROXY"
export https_proxy="$PROXY" export https_proxy="$PROXY"
export JAVA_TOOL_OPTIONS+="-Djava.net.useSystemProxies=true"
log "INFO: Giving proxy time to startup..." log "INFO: Giving proxy time to startup..."
sleep 5 sleep 5
fi fi
@@ -116,21 +115,16 @@ case "${TYPE^^}" in
;; ;;
MAGMA) MAGMA)
exec ${SCRIPTS:-/}start-deployMagma "$@" exec ${SCRIPTS:-/}start-magma "$@"
;; ;;
MOHIST) MOHIST)
exec ${SCRIPTS:-/}start-deployMohist "$@" exec ${SCRIPTS:-/}start-mohist "$@"
;;
CATSERVER)
exec ${SCRIPTS:-/}start-deployCatserver "$@"
;; ;;
*) *)
log "Invalid type: '$TYPE'" log "Invalid type: '$TYPE'"
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA, CURSEFORGE, SPONGEVANILLA," log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTB, CURSEFORGE, SPONGEVANILLA"
log " CUSTOM, CURSE_INSTANCE, MAGMA, MOHIST, CATSERVER"
exit 1 exit 1
;; ;;

View File

@@ -1,32 +0,0 @@
#!/bin/bash
. ${SCRIPTS:-/}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
log "ERROR: 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 SKIP_LOG4J_CONFIG=true
# Continue to Final Setup
exec ${SCRIPTS:-/}start-finalSetup01World "$@"

View File

@@ -5,7 +5,7 @@ set -e
isDebugging && set -x isDebugging && set -x
if [ $TYPE = "FEED-THE-BEAST" ]; then if [ $TYPE = "FEED-THE-BEAST" ]; then
worldDest=$FTB_DIR/$LEVEL worldDest=$FTB_BASE_DIR/$LEVEL
else else
worldDest=/data/$LEVEL worldDest=/data/$LEVEL
fi fi

View File

@@ -77,18 +77,6 @@ function customizeServerProps {
setServerProp "resource-pack" "$RESOURCE_PACK" setServerProp "resource-pack" "$RESOURCE_PACK"
setServerProp "resource-pack-sha1" "$RESOURCE_PACK_SHA1" setServerProp "resource-pack-sha1" "$RESOURCE_PACK_SHA1"
setServerProp "player-idle-timeout" "$PLAYER_IDLE_TIMEOUT" setServerProp "player-idle-timeout" "$PLAYER_IDLE_TIMEOUT"
setServerProp "broadcast-console-to-ops" "$BROADCAST_CONSOLE_TO_OPS"
setServerProp "broadcast-rcon-to-ops" "$BROADCAST_RCON_TO_OPS"
setServerProp "enable-jmx-monitoring" "$ENABLE_JMX"
setServerProp "sync-chunk-writes" "$SYNC_CHUNK_WRITES"
setServerProp "enable-status" "$ENABLE_STATUS"
setServerProp "entity-broadcast-range-percentage" "$ENTITY_BROADCAST_RANGE_PERCENTAGE"
setServerProp "function-permission-level" "$FUNCTION_PERMISSION_LEVEL"
setServerProp "network-compression-threshold" "$NETWORK_COMPRESSION_THRESHOLD"
setServerProp "op-permission-level" "$OP_PERMISSION_LEVEL"
setServerProp "prevent-proxy-connections" "$PREVENT_PROXY_CONNECTIONS"
setServerProp "use-native-transport" "$USE_NATIVE_TRANSPORT"
setServerProp "enforce-whitelist" "$ENFORCE_WHITELIST"
if [ -n "$DIFFICULTY" ]; then if [ -n "$DIFFICULTY" ]; then
case $DIFFICULTY in case $DIFFICULTY in

0
start-deployMagma → start-magma Normal file → Executable file
View File

View File

@@ -190,10 +190,6 @@ elif [[ ${TYPE} == "FEED-THE-BEAST" ]]; then
cp -f /data/white-list.txt ${FTB_DIR}/ cp -f /data/white-list.txt ${FTB_DIR}/
fi fi
if [ ! -e "${FTB_DIR}/server-icon.png" -a -e /data/server-icon.png ]; then
cp -f /data/server-icon.png ${FTB_DIR}/
fi
cp -f /data/eula.txt "${FTB_DIR}/" cp -f /data/eula.txt "${FTB_DIR}/"
cat > "${FTB_DIR}/settings-local.sh" <<EOF cat > "${FTB_DIR}/settings-local.sh" <<EOF

9
start-deployMohist → start-mohist Normal file → Executable file
View File

@@ -1,19 +1,17 @@
#!/bin/bash #!/bin/bash
. ${SCRIPTS:-/}start-utils . ${SCRIPTS:-/}start-utils
requireVar VANILLA_VERSION
set -o pipefail set -o pipefail
set -e set -e
isDebugging && set -x isDebugging && set -x
requireVar VANILLA_VERSION
mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/ mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/
mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/ mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/
if ! curl -X HEAD -o /dev/null -fsSL "${mohistJob}"; then if ! curl -X HEAD -o /dev/null -fsSL "${mohistJob}"; then
log "ERROR: mohist builds do not exist for ${VANILLA_VERSION}" log "ERROR: mohist builds do not exist for ${VANILLA_VERSION}"
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions" log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
log " and set VERSION accordingly"
exit 1 exit 1
fi fi
@@ -26,18 +24,17 @@ baseName=$(basename "${latestBuildRelPath}")
if [[ ${baseName} != *-server.jar* ]]; then if [[ ${baseName} != *-server.jar* ]]; then
log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}" log "ERROR: mohist build for ${VANILLA_VERSION} is not a valid server jar, found ${baseName}"
log " check https://ci.codemc.io/job/Mohist-Community/ for available versions" log " check https://ci.codemc.io/job/Mohist-Community/ for available versions"
log " and set VERSION accordingly"
exit 1 exit 1
fi fi
export SERVER="/data/${baseName}" export SERVER="/data/${baseName}"
if [ ! -f ${SERVER} ]; then if [ ! -f ${SERVER} ]; then
log "Downloading ${baseName}" log "Downloading ${SERVER}"
curl -o "${SERVER}" -fsSL "${mohistJob}lastSuccessfulBuild/artifact/${latestBuildRelPath}" curl -o "${SERVER}" -fsSL "${mohistJob}lastSuccessfulBuild/artifact/${latestBuildRelPath}"
fi fi
export SKIP_LOG4J_CONFIG=true export SKIP_LOG4J_CONFIG=true
# Continue to Final Setup # Continue to Final Setup
exec ${SCRIPTS:-/}start-finalSetup01World "$@" exec ${SCRIPTS:-/}start-finalSetup01World $@