x-webui-port: &webui-port 15555 services: webui: build: . ports: - target: *webui-port published: *webui-port protocol: tcp environment: WEBUI_HOST: 0.0.0.0 WEBUI_PORT: *webui-port WEBUI_ACCESS_PASSWORD: admin123 DEBUG: 0 LOG_LEVEL: info volumes: # 挂载数据目录以持久化数据库和日志 - ./data:/app/data - ./logs:/app/logs healthcheck: test: - CMD-SHELL - python -c "import os, urllib.request; urllib.request.urlopen('http://127.0.0.1:' + os.environ['WEBUI_PORT'] + '/', timeout=5).read()" interval: 10s timeout: 5s retries: 5 start_period: 20s restart: unless-stopped