Spaces:
Sleeping
Sleeping
Download docker-compose.yml from dauphinking/pump: direct link, hf CLI and curl.
- Browser
- Download file 2.5 kB
-
https://huggingface.co/spaces/dauphinking/pump/resolve/main/docker-compose.yml
- Command line
-
hf download hf://spaces/dauphinking/pump/docker-compose.yml
-
curl -L -o docker-compose.yml https://huggingface.co/spaces/dauphinking/pump/resolve/main/docker-compose.yml
2.5 kB
| # 提升泵站 AI 节能优化 — 一键部署(干净 Ubuntu:装 docker + compose 后 `docker compose up -d`) | |
| # | |
| # 前端展示大屏 http://<服务器IP>:8080 | |
| # 优化后端 API http://<服务器IP>:8077 (/api/config, /api/optimization/suggestion, /api/pump/{id}/curve/...) | |
| # Node-RED http://<服务器IP>:1880 (OPC 采集编排;默认跑仿真分支,可切 OPC) | |
| # OPC UA 仿真 opc.tcp://<服务器IP>:4840/biditech/server/ (UaExpert/现场联调用) | |
| # | |
| # 前端浏览器按所在主机名访问 8077/1880,故在服务器上打开 :8080 即整套连通。 | |
| services: | |
| backend: | |
| build: ./backend | |
| image: biditech-pump-backend | |
| container_name: pump-backend | |
| command: uvicorn app.main:app --host 0.0.0.0 --port 8077 | |
| ports: | |
| - "8077:8077" | |
| volumes: | |
| - pump-data:/data # 曲线上传持久化(curve_overrides.json) | |
| environment: | |
| BIDITECH_INTEGRATION_CONFIG: /data/integration_config.json | |
| BIDITECH_OPCUA_SECRET: /data/opcua_secret.json | |
| INTEGRATION_INTERNAL_TOKEN: ${INTEGRATION_INTERNAL_TOKEN:-} | |
| NODERED_URL: http://nodered:1880 | |
| extra_hosts: | |
| - "host.docker.internal:host-gateway" | |
| healthcheck: | |
| test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8077/api/health', timeout=2)"] | |
| interval: 10s | |
| timeout: 3s | |
| retries: 5 | |
| start_period: 15s | |
| restart: unless-stopped | |
| opcua-sim: | |
| build: ./backend # 与 backend 同镜像(compose 去重构建) | |
| image: biditech-pump-backend | |
| container_name: pump-opcua-sim | |
| command: python -m app.opcua_sim_server --host 0.0.0.0 --port 4840 | |
| depends_on: | |
| - backend | |
| ports: | |
| - "4840:4840" | |
| restart: unless-stopped | |
| frontend: | |
| build: ./frontend | |
| image: biditech-pump-frontend | |
| container_name: pump-frontend | |
| depends_on: | |
| - backend | |
| - nodered | |
| ports: | |
| - "8080:80" | |
| restart: unless-stopped | |
| nodered: | |
| build: ./node-red | |
| image: biditech-pump-nodered | |
| container_name: pump-nodered | |
| depends_on: | |
| - opcua-sim | |
| ports: | |
| - "1880:1880" | |
| volumes: | |
| - nodered-data:/data | |
| - ./node-red/flows-configurable.json:/data/flows.json | |
| environment: | |
| INTEGRATION_INTERNAL_TOKEN: ${INTEGRATION_INTERNAL_TOKEN:-} | |
| TZ: Asia/Shanghai | |
| extra_hosts: | |
| - "host.docker.internal:host-gateway" | |
| restart: unless-stopped | |
| volumes: | |
| pump-data: | |
| nodered-data: | |