From aabdbdf4215d4f1107f54f80f8a9a0cb3153e877 Mon Sep 17 00:00:00 2001 From: Teck Meng Date: Tue, 23 Apr 2024 22:26:46 +0800 Subject: [PATCH] Update Docker compose command to include EMQX services --- README.md | 4 +- production.yml | 119 +++++++++++++++++++++++++------------------------ 2 files changed, 62 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 517f816..89e53bc 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ This simple project uses Traefik as a reverse proxy to a Streamlit application a ## Production Deployment 1. In `compose/traefik/traefik.yml`, change `example@test.com` to your email. 2. In `compose/traefik/traefik.yml`, change `example.com` to your domain. -3. `docker compose -f production.yml -f ./flarum/docker-compose.yml -f ./LibreChat/docker-compose.yml -f ./LibreChat/docker-compose.override.yml up --build -d` -4. `docker compose -f production.yml -f ./flarum/docker-compose.yml -f ./LibreChat/docker-compose.yml -f ./LibreChat/docker-compose.override.yml down --remove-orphans` +3. `docker compose -f production.yml -f ./flarum/docker-compose.yml -f ./emqx-docker/docker-compose.yml -f ./LibreChat/docker-compose.yml -f ./LibreChat/docker-compose.override.yml up --build -d` +4. `docker compose -f production.yml -f ./flarum/docker-compose.yml -f ./emqx-docker/docker-compose.yml -f ./LibreChat/docker-compose.yml -f ./LibreChat/docker-compose.override.yml down --remove-orphans` ### Notes: ```yaml diff --git a/production.yml b/production.yml index 0bbb6f1..d8cb511 100644 --- a/production.yml +++ b/production.yml @@ -11,10 +11,10 @@ x-environment: &default-environment volumes: production_traefik: {} portainer_data: {} - vol-emqx-data1: - name: foo-emqx-data1 - vol-emqx-data2: - name: foo-emqx-data2 + # vol-emqx-data1: + # name: foo-emqx-data1 + # vol-emqx-data2: + # name: foo-emqx-data2 services: osrm-backend: @@ -36,61 +36,62 @@ services: networks: - net - default - emqx1: - image: emqx:latest - container_name: emqx1 - environment: - - "EMQX_NODE_NAME=emqx@node1.emqx.io" - - "EMQX_CLUSTER__DISCOVERY_STRATEGY=static" - - "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]" - healthcheck: - test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"] - interval: 5s - timeout: 25s - retries: 5 - networks: - net: - emqx-bridge: - aliases: - - node1.emqx.io - ports: - - 1883:1883 - - 8083:8083 - - 8084:8084 - - 8883:8883 - - 18083:18083 - volumes: - - vol-emqx-data1:/opt/emqx/data - emqx2: - image: emqx:latest - container_name: emqx2 - environment: - - "EMQX_NODE_NAME=emqx@node2.emqx.io" - - "EMQX_CLUSTER__DISCOVERY_STRATEGY=static" - - "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]" - healthcheck: - test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"] - interval: 5s - timeout: 25s - retries: 5 - networks: - emqx-bridge: - aliases: - - node2.emqx.io - volumes: - - vol-emqx-data2:/opt/emqx/data + # emqx1: + # image: emqx:latest + # container_name: emqx1 + # environment: + # - "EMQX_NODE_NAME=emqx@node1.emqx.io" + # - "EMQX_CLUSTER__DISCOVERY_STRATEGY=static" + # - "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]" + # healthcheck: + # test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"] + # interval: 5s + # timeout: 25s + # retries: 5 + # networks: + # net: + # emqx-bridge: + # aliases: + # - node1.emqx.io + # ports: + # - 1883:1883 + # - 8083:8083 + # - 8084:8084 + # - 8883:8883 + # - 18083:18083 + # volumes: + # - vol-emqx-data1:/opt/emqx/data - mqttx-web: - image: emqx/mqttx-web:latest - container_name: mqttx_web - restart: unless-stopped - expose: - - 80 - networks: - - emqx-bridge - - net - - default + # emqx2: + # image: emqx:latest + # container_name: emqx2 + # environment: + # - "EMQX_NODE_NAME=emqx@node2.emqx.io" + # - "EMQX_CLUSTER__DISCOVERY_STRATEGY=static" + # - "EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.io,emqx@node2.emqx.io]" + # healthcheck: + # test: ["CMD", "/opt/emqx/bin/emqx", "ctl", "status"] + # interval: 5s + # timeout: 25s + # retries: 5 + # networks: + # emqx-bridge: + # aliases: + # - node2.emqx.io + # volumes: + # - vol-emqx-data2:/opt/emqx/data + + # mqttx-web: + # image: emqx/mqttx-web:latest + # container_name: mqttx_web + # restart: unless-stopped + # expose: + # - 80 + # networks: + # - emqx-bridge + # - net + # - default heynote-app: image: furyhawk/heynote:${HEYNOTETAG:-latest} @@ -224,8 +225,8 @@ services: - "443:443" networks: - emqx-bridge: - driver: bridge + # emqx-bridge: + # driver: bridge net: external: true name: ${NETWORK:-web} \ No newline at end of file