mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-01 05:02:17 +00:00
Fix NanoLimbo port not applying to an existing settings.yml (#4201)
This commit is contained in:
@@ -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