Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions stacks/emqx-enterprise/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
services:
emqx-core:
image: emqx/emqx-enterprise:6.1.1
deploy:
replicas: 3
endpoint_mode: dnsrr
restart_policy:
condition: any
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:18083/status"]
interval: 5s
timeout: 25s
retries: 5
networks:
emqx_bridge:
environment:
- EMQX_NODE__DB_ROLE=core
- EMQX_CLUSTER__DISCOVERY_STRATEGY=dns
- EMQX_CLUSTER__DNS__RECORD_TYPE=a
- EMQX_CLUSTER__DNS__NAME=emqx-core
- EMQX_DASHBOARD__DEFAULT_USERNAME=${EMQX_DASHBOARD__DEFAULT_USERNAME}
- EMQX_DASHBOARD__DEFAULT_PASSWORD=${EMQX_DASHBOARD__DEFAULT_PASSWORD}
- EMQX_LICENSE__KEY={{EMQX_LICENSE_KEY}}
volumes:
- emqx_core_data:/opt/emqx/data

emqx-replicant:
image: emqx/emqx-enterprise:6.1.1
deploy:
replicas: ${EMQX_REPLICANT_NODES:-3}
restart_policy:
condition: any
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:18083/status"]
interval: 5s
timeout: 25s
retries: 5
networks:
emqx_bridge:
environment:
- EMQX_NODE__DB_ROLE=replicant
- EMQX_CLUSTER__DISCOVERY_STRATEGY=dns
- EMQX_CLUSTER__DNS__RECORD_TYPE=a
- EMQX_CLUSTER__DNS__NAME=emqx-core
- EMQX_LICENSE__KEY={{EMQX_LICENSE_KEY}}
ports:
- 1883:1883
- 8083:8083
- 8084:8084
- 8883:8883
- 18083:18083
volumes:
- emqx_replicant_data:/opt/emqx/data

networks:
emqx_bridge:
driver: overlay

volumes:
emqx_core_data:
emqx_replicant_data:
34 changes: 34 additions & 0 deletions templates-1.20.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -888,5 +888,39 @@
"description": "CockroachDB cluster",
"note": "Deploys an insecure CockroachDB cluster, please refer to <a href=\"https://www.cockroachlabs.com/docs/stable/orchestrate-cockroachdb-with-docker-swarm.html\" target=\"_blank\">CockroachDB documentation</a> for production deployments.",
"stackfile": "https://raw.githubusercontent.com/portainer/templates/master/stacks/cockroachdb/edge/docker-stack.yml"
},
{
"type": 2,
"title": "EMQX Enterprise",
"description": "EMQX Enterprise MQTT broker cluster with core and replicant nodes",
"note": "Deploys an EMQX Enterprise cluster with 3 core nodes and 3 replicant nodes. Core nodes handle routing and sessions, replicant nodes handle MQTT client connections. Requires a valid EMQX license key.",
"categories": ["messaging"],
"platform": "linux",
"logo": "https://www.emqx.com/favicon.ico",
"repository": {
"url": "https://github.com/portainer/templates",
"stackfile": "stacks/emqx-enterprise/docker-compose.yml"
},
"env": [
{
"name": "EMQX_LICENSE_KEY",
"label": "EMQX License Key",
"description": "License key for EMQX Enterprise"
},
{
"name": "EMQX_DASHBOARD__DEFAULT_USERNAME",
"label": "Dashboard username",
"default": "admin"
},
{
"name": "EMQX_DASHBOARD__DEFAULT_PASSWORD",
"label": "Dashboard password"
},
{
"name": "EMQX_REPLICANT_NODES",
"label": "Number of replicant nodes",
"default": "3"
}
]
}
]
34 changes: 34 additions & 0 deletions templates-2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,40 @@
]
}
]
},
{
"type": 2,
"title": "EMQX Enterprise",
"description": "EMQX Enterprise MQTT broker cluster with core and replicant nodes",
"note": "Deploys an EMQX Enterprise cluster with 3 core nodes and 3 replicant nodes. Core nodes handle routing and sessions, replicant nodes handle MQTT client connections. Requires a valid EMQX license key.",
"categories": ["messaging"],
"platform": "linux",
"logo": "https://www.emqx.com/favicon.ico",
"repository": {
"url": "https://github.com/portainer/templates",
"stackfile": "stacks/emqx-enterprise/docker-compose.yml"
},
"env": [
{
"name": "EMQX_LICENSE_KEY",
"label": "EMQX License Key",
"description": "License key for EMQX Enterprise"
},
{
"name": "EMQX_DASHBOARD__DEFAULT_USERNAME",
"label": "Dashboard username",
"default": "admin"
},
{
"name": "EMQX_DASHBOARD__DEFAULT_PASSWORD",
"label": "Dashboard password"
},
{
"name": "EMQX_REPLICANT_NODES",
"label": "Number of replicant nodes",
"default": "3"
}
]
}
]
}
34 changes: 34 additions & 0 deletions templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -847,5 +847,39 @@
"bind": "/var/run/docker.sock"
}
]
},
{
"type": "stack",
"title": "EMQX Enterprise",
"description": "EMQX Enterprise MQTT broker cluster with core and replicant nodes",
"note": "Deploys an EMQX Enterprise cluster with 3 core nodes and 3 replicant nodes. Core nodes handle routing and sessions, replicant nodes handle MQTT client connections. Requires a valid EMQX license key.",
"categories": ["messaging"],
"platform": "linux",
"logo": "https://www.emqx.com/favicon.ico",
"repository": {
"url": "https://github.com/portainer/templates",
"stackfile": "stacks/emqx-enterprise/docker-compose.yml"
},
"env": [
{
"name": "EMQX_LICENSE_KEY",
"label": "EMQX License Key",
"description": "License key for EMQX Enterprise"
},
{
"name": "EMQX_DASHBOARD__DEFAULT_USERNAME",
"label": "Dashboard username",
"default": "admin"
},
{
"name": "EMQX_DASHBOARD__DEFAULT_PASSWORD",
"label": "Dashboard password"
},
{
"name": "EMQX_REPLICANT_NODES",
"label": "Number of replicant nodes",
"default": "3"
}
]
}
]