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