代码拉取完成,页面将自动刷新
同步操作将从 ThingsPanel/thingspanel-docker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
version: "3.9"
services:
frontend: # 前端
image: thingspanel/thingspanel-vue:v0.5.4.1
ports:
- "8080:8080"
expose:
- 8080
environment:
- "BACKEND_HOST=172.19.0.2:9999" #后端接口代理地址
- "TZ=Asia/Shanghai"
depends_on: # 隐式地创建了一个依赖关系
- backend
- rule-engine
networks:
extnetwork:
ipv4_address: 172.19.0.3
volumes:
- nginx:/etc/nginx
restart: unless-stopped
rule-engine:
image: thingspanel/rule-engine:v0.4.5
ports:
- "1880:1880"
environment:
- "TZ=Asia/Shanghai"
expose:
- 1880
networks:
extnetwork:
ipv4_address: 172.19.0.7
restart: unless-stopped
postgres:
image: timescale/timescaledb:latest-pg12
privileged: true
volumes: # 注意!如果在win系统上运行,可能会有权限问题,可更改为卷映射(去掉文件末尾的卷注释,将下方./data/timescaleDB改为卷timescaleDB即可)
- ./data/timescaleDB:/var/lib/postgresql/data
ports: # 如不需要从外部访问可删除端口映射
- "5555:5432"
environment:
- "TZ=Asia/Shanghai"
- "LC_ALL=C.UTF-8"
- "POSTGRES_DB=ThingsPanel"
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=ThingsPanel2023"
- "POSTGRES_HOST_AUTH_METHOD=trust"
networks:
extnetwork:
ipv4_address: 172.19.0.4
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
gmqtt:
image: thingspanel/thingspanel-gmqtt:v0.5.3
volumes:
- gmqtt:/gmqttd
ports:
- "1883:1883"
- "8083:8083"
environment:
- "TZ=Asia/Shanghai"
- "GMQTT_DB_REDIS_CONN=172.19.0.6:6379"
- "GMQTT_DB_PSQL_PSQLADDR=172.19.0.4"
- "GMQTT_DB_PSQL_PSQLPORT=5432"
hostname: gmqtt
networks:
extnetwork:
ipv4_address: 172.19.0.5
restart: unless-stopped
redis:
image: redis:6.2.7
command: redis-server --requirepass redis2022
volumes:
- ./data/redis/data:/data
- ./data/redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
- ./data/redis/logs:/logs
ports: # 如不需要从外部访问可删除端口映射
- "6379:6379"
environment:
- "TZ=Asia/Shanghai"
networks:
extnetwork:
ipv4_address: 172.19.0.6
restart: unless-stopped
backend:
image: thingspanel/thingspanel-go:v0.5.4.1
ports: # 如不需要从外部访问可删除端口映射
- "9999:9999"
environment:
- "TZ=Asia/Shanghai"
- "GOTP_DB_PSQL_PSQLADDR=172.19.0.4"
- "GOTP_DB_PSQL_PSQLPORT=5432"
- "GOTP_MQTT_BROKER=172.19.0.5:1883"
- "GOTP_DB_REDIS_CONN=172.19.0.6:6379"
- "GOTP_API_HTTP_HOST=172.19.0.5:8083"
- "GOTP_DB_PSQL_DBTYPE=timescaledb"
- "GOTP_MQTT_SERVER=gmqtt"
networks:
extnetwork:
ipv4_address: 172.19.0.2
depends_on:
- gmqtt
- postgres
- redis
volumes:
- go:/go/src/app/files
- go:/go/src/app/conf
restart: unless-stopped
ulimits:
nproc: 524288
nofile:
soft: 20000
hard: 40000
modbus-plugin:
image: thingspanel/modbus-protocol-plugin:v0.5.3
ports:
- "502:502"
- "503:503"
environment:
- "TZ=Asia/Shanghai"
hostname: modbus-plugin
networks:
extnetwork:
ipv4_address: 172.19.0.8
depends_on:
- backend
- gmqtt
restart: unless-stopped
ulimits:
nproc: 524288
nofile:
soft: 20000
hard: 40000
volumes:
go:
gmqtt:
nginx:
# timescaleDB:
networks:
extnetwork:
ipam:
config:
- subnet: 172.19.0.0/16
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。