I try to build EMQX cluster by Docker Compose file. When excute compose file ,container successfully created with environment variable. I can see Environment varibales in container inspect but In emqx.conf file did’t updated which i mentioned environment variable in compose file.
Here is emqx docker compose file:
version: '3' services: emqx1: image: emqx:latest container_name: emqx1 environment: - "EMQX_NODE_NAMEfirstname.lastname@example.org" - "EMQX_CLUSTER__DISCOVERY_STRATEGY=static" - "EMQX_CLUSTER__STATIC__SEEDS=[email@example.com,firstname.lastname@example.org]" - "EMQX_LISTENER__SSL__EXTERNAL__CERTFILE=etc/certs/emqx.pem" - "EMQX_LISTENER__SSL__EXTERNAL__CACERTFILE=etc/certs/ca.pem" - "EMQX_LISTENER__SSL__EXTERNAL__KEYFILE=etc/certs/emqx.key" healthcheck: test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"] interval: 5s timeout: 25s retries: 5 networks: emqx-bridge: aliases: - node1.emqx.io ports: - 8883:8883 - 18083:18083 # volumes: # - $PWD/emqx1_data:/opt/emqx/data volumes: - ./certs:/opt/emqx/etc/certs networks: emqx-bridge: driver: bridge
I attached container inspect and emqx.conf file. Please have a look