version: '3.8' services: mc-webui: build: context: .. dockerfile: docker/Dockerfile container_name: mc-webui restart: unless-stopped ports: - "${FLASK_PORT:-5000}:5000" devices: - "${MC_SERIAL_PORT}:${MC_SERIAL_PORT}" volumes: - "${MC_CONFIG_DIR}:/root/.config/meshcore:rw" environment: - MC_SERIAL_PORT=${MC_SERIAL_PORT} - MC_DEVICE_NAME=${MC_DEVICE_NAME} - MC_CONFIG_DIR=/root/.config/meshcore - MC_REFRESH_INTERVAL=${MC_REFRESH_INTERVAL:-60} - MC_INACTIVE_HOURS=${MC_INACTIVE_HOURS:-48} - FLASK_HOST=${FLASK_HOST:-0.0.0.0} - FLASK_PORT=${FLASK_PORT:-5000} - FLASK_DEBUG=${FLASK_DEBUG:-false} env_file: - ../.env healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/status')"] interval: 30s timeout: 10s retries: 3 start_period: 10s