1 Star 0 Fork 20

szf3/thingspanel-docker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker-compose.yml 3.70 KB
一键复制 编辑 原始数据 按行查看 历史
hezhuozhuo 提交于 2023-12-14 11:39 . 增加环境变量配置
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/szf3/thingspanel-docker.git
git@gitee.com:szf3/thingspanel-docker.git
szf3
thingspanel-docker
thingspanel-docker
main

搜索帮助