From 000c4f688409f1f4f97eaa891cae4813ec28c2fb Mon Sep 17 00:00:00 2001 From: MarekWo Date: Mon, 23 Feb 2026 08:01:12 +0100 Subject: [PATCH] fix: Make container port match FLASK_PORT for custom port configurations Previously, the internal container port was hardcoded to 5000, so setting FLASK_PORT to a different value would break the port mapping and healthcheck. Credit: Tymo3 Co-Authored-By: Claude Opus 4.6 --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e768692..0f77e6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,7 @@ services: container_name: mc-webui restart: unless-stopped ports: - - "${FLASK_PORT:-5000}:5000" + - "${FLASK_PORT:-5000}:${FLASK_PORT:-5000}" volumes: - "${MC_CONFIG_DIR}:/root/.config/meshcore:rw" - "${MC_ARCHIVE_DIR:-./archive}:/root/.archive/meshcore:rw" @@ -60,7 +60,7 @@ services: networks: - meshcore-net healthcheck: - test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/status')"] + test: ["CMD", "python", "-c", "import urllib.request, os; urllib.request.urlopen(f'http://localhost:{os.environ.get(\"FLASK_PORT\", \"5000\")}/api/status')"] interval: 30s timeout: 10s retries: 3