1 Star 0 Fork 3

silence/docker-compose

forked from fly-iot/docker-compose 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker-compose-postgres.yml 2.13 KB
一键复制 编辑 原始数据 按行查看 历史
freegolang 提交于 2024-01-02 09:14 . add all
version: "3"
networks:
iot-network:
driver: bridge
services:
############### 使用 postgres:13-alpine 版本 ###############
emqx:
image: emqx/emqx:latest
#image: emqx/emqx:v3.1.0
container_name: emqx
environment:
- "EMQX_NODE_NAME=emqx@node.emqx.io"
- "EMQX_CLUSTER__DISCOVERY_STRATEGY=static"
- "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node.emqx.io]"
healthcheck:
test: ["CMD", "/opt/emqx/bin/emqx ctl", "status"]
interval: 5s
timeout: 25s
retries: 5
networks:
iot-network: {}
ports:
- 1883:1883
- 8083:8083
- 8084:8084
- 8883:8883
- 18083:18083
#volumes:
# - ./data/emqx:/opt/emqx/data
postgres:
image: postgres:13-alpine
container_name: postgres
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "postgres", "-U", "root" ]
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
- POSTGRES_USER=actorcloud
- POSTGRES_PASSWORD=public
- APP_DB_USER=actorcloud
- APP_DB_PASS=public
- APP_DB_NAME=actorcloud
# 设置 postgres data 文件存储路径。
volumes:
- ./data/postgres:/var/lib/postgresql/data
networks:
iot-network: {}
ports:
- 5432:5432
############### 使用 iot-backend-python 版本 ###############
iot-backend-python:
image: flyiotadm/fly-iot-backend-python:v1.0
container_name: fly-iot-backend-python
networks:
iot-network: {}
ports:
- "7000:7000"
- "7001:7001"
- "7002:7002"
volumes:
- "./python-conf/config-postgres.yml:/data/config/config.yml"
depends_on:
- emqx
- postgres
restart: always
############### 使用 iot-backend-python 版本 ###############
iot-frontend:
image: flyiotadm/fly-iot-frontend:v1.0
container_name: fly-iot-frontend
networks:
iot-network: {}
ports:
- "8080:8080"
environment:
- VUE_APP_SERVER=http://iot-backend-python:7000
#volumes:
# - "../fly-iot-frontend/default.conf:/etc/nginx/conf.d/default.conf"
depends_on:
- iot-backend-python
restart: always
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/silencegwc/docker-compose.git
git@gitee.com:silencegwc/docker-compose.git
silencegwc
docker-compose
docker-compose
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385