加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose-dockerhub.yml 3.02 KB
一键复制 编辑 原始数据 按行查看 历史
hezhuozhuo 提交于 2024-09-30 10:11 . fix 文件命名修改
version: "3.9"
services:
frontend:
image: thingspanel/thingspanel-vue:v1.1.2
ports:
- "8080:8080"
environment:
- "TZ=Asia/Shanghai"
- "BACKEND_HOST=http://backend:9999"
depends_on:
backend:
condition: service_started
volumes:
- nginx:/etc/nginx
restart: unless-stopped
networks:
- thingspanel_network
postgres:
image: timescale/timescaledb:2.8.1-pg14
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5555:5432"
environment:
- "TZ=Asia/Shanghai"
- "LC_ALL=C.UTF-8"
- "POSTGRES_DB=ThingsPanel"
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=postgresThingsPanel"
- "POSTGRES_HOST_AUTH_METHOD=md5"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d ThingsPanel"]
interval: 10s
timeout: 5s
retries: 5
start_period: 40s
restart: unless-stopped
networks:
- thingspanel_network
gmqtt:
image: thingspanel/thingspanel-gmqtt:v1.1.1
volumes:
- gmqtt:/gmqttd
ports:
- "1883:1883"
environment:
- "TZ=Asia/Shanghai"
- "GMQTT_DB_REDIS_CONN=redis:6379"
- "GMQTT_DB_REDIS_PASSWORD=redis"
- "GMQTT_DB_PSQL_PSQLADDR=postgres"
- "GMQTT_DB_PSQL_PSQLPORT=5432"
- "GMQTT_DB_PSQL_PSQLDB=ThingsPanel"
- "GMQTT_DB_PSQL_PSQLUSER=postgres"
- "GMQTT_DB_PSQL_PSQLPASSWORD=postgresThingsPanel"
hostname: gmqtt
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
networks:
- thingspanel_network
redis:
image: redis:6.2.7
command: redis-server --requirepass redis
volumes:
- redis_data:/data
ports:
- "6379:6379"
environment:
- "TZ=Asia/Shanghai"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- thingspanel_network
backend:
image: thingspanel/thingspanel-go:v1.1.2
ports:
- "9999:9999"
environment:
- "TZ=Asia/Shanghai"
- "GOTP_DB_PSQL_HOST=postgres"
- "GOTP_DB_PSQL_PORT=5432"
- "GOTP_DB_PSQL_USERNAME=postgres"
- "GOTP_DB_PSQL_PASSWORD=postgresThingsPanel"
- "GOTP_DB_PSQL_DBNAME=ThingsPanel"
- "GOTP_DB_PSQL_LOG_LEVEL=3"
- "GOTP_DB_REDIS_ADDR=redis:6379"
- "GOTP_DB_REDIS_PASSWORD=redis"
- "GOTP_MQTT_SERVER=gmqtt"
- "GOTP_MQTT_ACCESS_ADDRESS=gmqtt:1883"
- "GOTP_MQTT_BROKER=gmqtt:1883"
- "GOTP_LOG_LEVEL=error"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
gmqtt:
condition: service_started
volumes:
- go_files:/go/src/app/files
- go_configs:/go/src/app/configs
restart: unless-stopped
networks:
- thingspanel_network
volumes:
go_files:
go_configs:
gmqtt:
nginx:
postgres_data:
redis_data:
networks:
thingspanel_network:
driver: bridge
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化