fix(compose): remove server.properties-aliased env vars so UI edits persist
All checks were successful
Deploy Addons / deploy (push) Successful in 16s
All checks were successful
Deploy Addons / deploy (push) Successful in 16s
The itzg/minecraft-bedrock-server entrypoint rewrites server.properties
from env vars on every start. Any property edited via mc-manager's UI was
being clobbered because those env vars were set here. Remove them so
/data/server.properties (on the named volume) is the real source of truth:
- SERVER_NAME, GAMEMODE, DIFFICULTY, ALLOW_CHEATS, ONLINE_MODE,
MAX_PLAYERS, DEFAULT_PLAYER_PERMISSION_LEVEL
- LEVEL_SEED (jamie) — world already generated
- LEVEL_NAME — moved to docker-compose.override.yml, managed by
mc-manager so UI Set Active survives future deploys
Kept: EULA, SERVER_PORT (deploy-time wiring), OP_PERMISSION_LEVEL
(not a server.properties key).
Override file is gitignored so mc-manager's writes don't leak into git.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -16,6 +16,10 @@ addon/build/
|
|||||||
# Environment
|
# Environment
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
# docker-compose override, managed by mc-manager at runtime for per-service state
|
||||||
|
# (LEVEL_NAME, etc.) that must survive deploys. Never committed.
|
||||||
|
docker-compose.override.yml
|
||||||
|
|
||||||
# Server data (Docker volumes are external, but just in case)
|
# Server data (Docker volumes are external, but just in case)
|
||||||
server-data/
|
server-data/
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,13 @@ services:
|
|||||||
container_name: mc-lobby
|
container_name: mc-lobby
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
SERVER_NAME: "SilverLABS Hub"
|
|
||||||
GAMEMODE: adventure
|
|
||||||
DIFFICULTY: peaceful
|
|
||||||
ALLOW_CHEATS: "true"
|
|
||||||
ONLINE_MODE: "false"
|
|
||||||
SERVER_PORT: "19132"
|
SERVER_PORT: "19132"
|
||||||
LEVEL_NAME: "Hub World"
|
|
||||||
MAX_PLAYERS: "10"
|
|
||||||
DEFAULT_PLAYER_PERMISSION_LEVEL: operator
|
|
||||||
OP_PERMISSION_LEVEL: "4"
|
OP_PERMISSION_LEVEL: "4"
|
||||||
|
# Other server.properties-aliased env vars (SERVER_NAME, GAMEMODE, DIFFICULTY,
|
||||||
|
# ALLOW_CHEATS, ONLINE_MODE, MAX_PLAYERS, DEFAULT_PLAYER_PERMISSION_LEVEL) are
|
||||||
|
# intentionally not set here — they're owned by /data/server.properties inside
|
||||||
|
# the named volume and edited via mc-manager's UI. LEVEL_NAME lives in
|
||||||
|
# docker-compose.override.yml on the host (managed by mc-manager, gitignored).
|
||||||
ports:
|
ports:
|
||||||
- "${LOBBY_PORT:-19132}:19132/udp"
|
- "${LOBBY_PORT:-19132}:19132/udp"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -44,17 +41,10 @@ services:
|
|||||||
container_name: mc-jamie
|
container_name: mc-jamie
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
SERVER_NAME: "Jamie's World"
|
|
||||||
GAMEMODE: survival
|
|
||||||
DIFFICULTY: normal
|
|
||||||
ALLOW_CHEATS: "true"
|
|
||||||
ONLINE_MODE: "false"
|
|
||||||
SERVER_PORT: "19132"
|
SERVER_PORT: "19132"
|
||||||
LEVEL_NAME: "Jamie World"
|
|
||||||
LEVEL_SEED: "-6717666844935858147"
|
|
||||||
MAX_PLAYERS: "10"
|
|
||||||
DEFAULT_PLAYER_PERMISSION_LEVEL: operator
|
|
||||||
OP_PERMISSION_LEVEL: "4"
|
OP_PERMISSION_LEVEL: "4"
|
||||||
|
# See lobby for rationale. LEVEL_SEED is dropped too — the world has long since
|
||||||
|
# been generated and the seed is ignored thereafter.
|
||||||
ports:
|
ports:
|
||||||
- "${JAMIE_PORT:-19133}:19132/udp"
|
- "${JAMIE_PORT:-19133}:19132/udp"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -78,15 +68,7 @@ services:
|
|||||||
container_name: mc-lyla
|
container_name: mc-lyla
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
SERVER_NAME: "Lyla's World"
|
|
||||||
GAMEMODE: survival
|
|
||||||
DIFFICULTY: normal
|
|
||||||
ALLOW_CHEATS: "true"
|
|
||||||
ONLINE_MODE: "false"
|
|
||||||
SERVER_PORT: "19132"
|
SERVER_PORT: "19132"
|
||||||
LEVEL_NAME: "Lyla World"
|
|
||||||
MAX_PLAYERS: "10"
|
|
||||||
DEFAULT_PLAYER_PERMISSION_LEVEL: operator
|
|
||||||
OP_PERMISSION_LEVEL: "4"
|
OP_PERMISSION_LEVEL: "4"
|
||||||
ports:
|
ports:
|
||||||
- "${LYLA_PORT:-19134}:19132/udp"
|
- "${LYLA_PORT:-19134}:19132/udp"
|
||||||
@@ -119,15 +101,7 @@ services:
|
|||||||
container_name: mc-mya
|
container_name: mc-mya
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
SERVER_NAME: "Mya's World"
|
|
||||||
GAMEMODE: survival
|
|
||||||
DIFFICULTY: normal
|
|
||||||
ALLOW_CHEATS: "true"
|
|
||||||
ONLINE_MODE: "false"
|
|
||||||
SERVER_PORT: "19132"
|
SERVER_PORT: "19132"
|
||||||
LEVEL_NAME: "Mya World"
|
|
||||||
MAX_PLAYERS: "10"
|
|
||||||
DEFAULT_PLAYER_PERMISSION_LEVEL: operator
|
|
||||||
OP_PERMISSION_LEVEL: "4"
|
OP_PERMISSION_LEVEL: "4"
|
||||||
ports:
|
ports:
|
||||||
- "${MYA_PORT:-19135}:19132/udp"
|
- "${MYA_PORT:-19135}:19132/udp"
|
||||||
|
|||||||
Reference in New Issue
Block a user