mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-06 08:49:22 +00:00
Fix NanoLimbo port not applying to an existing settings.yml (#4201)
This commit is contained in:
1 parent
8fde0cac2a
commit
749f8f635f
5 files changed
+45
-10
No files matched your search
@@ -1,12 +1,16 @@
|
|||||||
{
|
{
|
||||||
"file": "/data/settings.yml",
|
"patches": [
|
||||||
"ops": [
|
|
||||||
{
|
{
|
||||||
"$set": {
|
"file": "/data/settings.yml",
|
||||||
"path": "$.bind.port",
|
"ops": [
|
||||||
"value": "${SERVER_PORT}",
|
{
|
||||||
"value-type": "int"
|
"$set": {
|
||||||
}
|
"path": "$.bind.port",
|
||||||
|
"value": "${SERVER_PORT}",
|
||||||
|
"value-type": "int"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -158,10 +158,10 @@ traffic:
|
|||||||
# Ignored if -1.0
|
# Ignored if -1.0
|
||||||
maxPacketBytesRate: 2048.0
|
maxPacketBytesRate: 2048.0
|
||||||
EOF
|
EOF
|
||||||
|
else
|
||||||
|
mc-image-helper patch --patch-env-prefix "" /image/nanolimbo-settings-patch.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mc-image-helper patch --patch-env-prefix "" /image/nanolimbo-settings-patch.json
|
|
||||||
|
|
||||||
export SERVER
|
export SERVER
|
||||||
export FAMILY=LIMBO
|
export FAMILY=LIMBO
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
services:
|
||||||
|
# copies seed/ into /data before mc starts, so the NanoLimbo setup takes its
|
||||||
|
# "settings.yml already exists" path instead of writing the template
|
||||||
|
seed:
|
||||||
|
restart: "no"
|
||||||
|
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||||
|
entrypoint: ["bash", "-c", "cp /seed/settings.yml /data/ && chown -R 1000:1000 /data"]
|
||||||
|
volumes:
|
||||||
|
- ./seed:/seed
|
||||||
|
- ./data:/data
|
||||||
|
|
||||||
|
mc:
|
||||||
|
restart: "no"
|
||||||
|
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||||
|
depends_on:
|
||||||
|
seed:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
environment:
|
||||||
|
EULA: "TRUE"
|
||||||
|
TYPE: NANOLIMBO
|
||||||
|
SERVER_PORT: "25599"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
bind:
|
||||||
|
ip: '0.0.0.0'
|
||||||
|
port: 25565
|
||||||
|
maxPlayers: 100
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
set -e
|
||||||
|
# SERVER_PORT must have been applied to the settings.yml that was already there
|
||||||
|
port=$(mc-image-helper yaml-path --file /data/settings.yml .bind.port)
|
||||||
|
[ "$port" = 25599 ] || { echo "expected bind.port 25599 but was '$port'"; exit 1; }
|
||||||
Reference in new issue
Block a user