mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-08 15:35:24 +02:00
* feat: template for emqx * chore: process meta * fix: use websocket on port 443 instead of 8084 * docs: improve comments for emqx template * fix: use emqx service name * fix: use dummy domain instead of traefik * fix: explicitly list dokplok-network * fix(emqx): restart unless stopped * fix(emqx): add healthcheck
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
# This templates requires additional traefik port mapping and entry point
|
|
# for port 8883 (mqtts over TCP)
|
|
#
|
|
# For the full instructions, refer to:
|
|
# - https://github.com/Dokploy/dokploy/discussions/3126
|
|
#
|
|
# The initial login credentials are:
|
|
# - USERNAME: admin
|
|
# - PASSWORD: public
|
|
|
|
services:
|
|
emqx:
|
|
image: emqx/emqx-enterprise:6.0.1
|
|
hostname: node1.emqx.com
|
|
environment:
|
|
EMQX_NODE_NAME: emqx@node1.emqx.com
|
|
expose:
|
|
- 1883 # MQTT
|
|
- 8083 # WS
|
|
- 18083 # Dashboard
|
|
volumes:
|
|
- emqx_data:/opt/emqx/data
|
|
- emqx_log:/opt/emqx/log
|
|
networks:
|
|
dokploy-network:
|
|
aliases:
|
|
- emqx-service
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
labels:
|
|
# MQTT over TLS
|
|
- "traefik.tcp.routers.emqx-mqtts.entrypoints=mqtts"
|
|
- "traefik.tcp.routers.emqx-mqtts.rule=HostSNI(`broker.yourdomain.com`)" # Change domain
|
|
- "traefik.tcp.routers.emqx-mqtts.tls.certresolver=letsencrypt"
|
|
- "traefik.tcp.routers.emqx-mqtts.service=emqx-service"
|
|
- "traefik.tcp.services.emqx-service.loadbalancer.server.port=1883"
|
|
|
|
#
|
|
# Optional Web UI:
|
|
# - https://github.com/emqx/MQTTX/tree/main/web
|
|
#
|
|
# mqttx-web:
|
|
# image: emqx/mqttx-web:latest
|
|
# expose:
|
|
# - 80
|
|
#
|
|
|
|
volumes:
|
|
emqx_data:
|
|
emqx_log:
|
|
|
|
networks:
|
|
dokploy-network:
|
|
external: true
|