chore(docker compose): update emqx cluster compose file

This commit is contained in:
zhanghongtong 2021-04-19 17:27:20 +08:00 committed by Rory Z
parent ad630f49ef
commit 48b0cc37ed
4 changed files with 18 additions and 20 deletions

View File

@ -0,0 +1,6 @@
EMQX_NAME=emqx
EMQX_CLUSTER__DISCOVERY=static
EMQX_CLUSTER__STATIC__SEEDS="emqx@node1.emqx.io, emqx@node2.emqx.io"
EMQX_LISTENER__TCP__EXTERNAL__PROXY_PROTOCOL=on
EMQX_LISTENER__WS__EXTERNAL__PROXY_PROTOCOL=on
EMQX_LOG__LEVEL=debug

View File

@ -10,7 +10,8 @@ services:
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
- ../../etc/certs:/usr/local/etc/haproxy/certs
# ports:
ports:
- "18083:18083"
# - "1883:1883"
# - "8883:8883"
# - "8083:8083"
@ -28,16 +29,10 @@ services:
emqx1:
container_name: node1.emqx.io
image: $TARGET:$EMQX_TAG
env_file:
- conf.cluster.env
environment:
- "EMQX_NAME=emqx"
- "EMQX_HOST=node1.emqx.io"
- "EMQX_CLUSTER__DISCOVERY=static"
- "EMQX_CLUSTER__STATIC__SEEDS=emqx@node1.emqx.io, emqx@node2.emqx.io"
- "EMQX_LISTENER__TCP__EXTERNAL__PROXY_PROTOCOL=on"
- "EMQX_LISTENER__WS__EXTERNAL__PROXY_PROTOCOL=on"
- "EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s"
- "EMQX_MQTT__MAX_TOPIC_ALIAS=10"
- "EMQX_LOG__LEVEL=debug"
command:
- /bin/sh
- -c
@ -58,16 +53,10 @@ services:
emqx2:
container_name: node2.emqx.io
image: $TARGET:$EMQX_TAG
env_file:
- conf.cluster.env
environment:
- "EMQX_NAME=emqx"
- "EMQX_HOST=node2.emqx.io"
- "EMQX_CLUSTER__DISCOVERY=static"
- "EMQX_CLUSTER__STATIC__SEEDS=emqx@node1.emqx.io, emqx@node2.emqx.io"
- "EMQX_LISTENER__TCP__EXTERNAL__PROXY_PROTOCOL=on"
- "EMQX_LISTENER__WS__EXTERNAL__PROXY_PROTOCOL=on"
- "EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s"
- "EMQX_MQTT__MAX_TOPIC_ALIAS=10"
- "EMQX_LOG__LEVEL=debug"
command:
- /bin/sh
- -c

View File

@ -2,7 +2,7 @@
## global 2021/04/05
##----------------------------------------------------------------
global
log 127.0.0.1:514 local0 notice
log stdout format raw daemon debug
# Replace 1024000 with deployment connections
maxconn 1000
nbproc 1

View File

@ -35,6 +35,9 @@ jobs:
timeout-minutes: 5
run: |
set -e -u -x
echo "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" >> .ci/docker-compose-file/conf.cluster.env
echo "EMQX_ZONE__EXTERNAL__RETRY_INTERVAL=2s" >> .ci/docker-compose-file/conf.cluster.env
echo "EMQX_MQTT__MAX_TOPIC_ALIAS=10" >> .ci/docker-compose-file/conf.cluster.env
docker-compose \
-f .ci/docker-compose-file/docker-compose-emqx-cluster.yaml \
-f .ci/docker-compose-file/docker-compose-python.yaml \