-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker_compose_production.yml
116 lines (88 loc) · 2.78 KB
/
docker_compose_production.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: "3.8"
volumes:
vol-emqx-data:
name: foo-emqx-data
vol-emqx-log:
name: foo-emqx-log
services:
node:
container_name: node
image: "node:14"
restart: always
working_dir: /home/node/app
volumes:
- ./app/:/home/node/app
ports:
- "3000:3000"
- "3001:3001"
- "80:3002"
links:
- emqx
- mongo
command: sh -c "echo 'delaying 30 seconds' && sleep 30 && npm run start"
#command: sh -c "npm install"
mongo:
container_name: mongo
image: mongo:4.4
restart: always
logging:
driver: "none"
environment:
TZ: "${TZ}"
MONGO_INITDB_ROOT_USERNAME: "${MONGO_USERNAME}"
MONGO_INITDB_ROOT_PASSWORD: "${MONGO_PASSWORD}"
volumes:
- ./mongodata:/data/db
ports:
- ${MONGO_EXT_PORT}:27017
emqx:
container_name: emqx
image: emqx/emqx:4.2.3
restart: always
ports:
- 18083:18083
- 1883:1883
- 8083:8083
- 8085:8081
volumes:
- vol-emqx-data:/opt/emqx/data
- vol-emqx-log:/opt/emqx/log
links:
- mongo
extra_hosts:
- "localhost:192.168.0.6"
environment:
EMQX_NAME: ioticos-gl
EMQX_HOST: 127.0.0.1
TZ: "${TZ}"
# DEFAULT DASH PASS
EMQX_DASHBOARD__DEFAULT_USER__PASSWORD: "${EMQX_DEFAULT_USER_PASSWORD}"
# DEFAULT APP SECRET
EMQX_MANAGEMENT__DEFAULT_APPLICATION__SECRET: "${EMQX_DEFAULT_APPLICATION_SECRET}"
EMQX_ALLOW_ANONYMOUS: "false"
EMQX_NOMATCH: "deny"
# MONGO CONNECTION
EMQX_AUTH__MONGO__TYPE: single
EMQX_AUTH__MONGO__TOPOLOGY__POOL_SIZE: 1
EMQX_AUTH__MONGO__TOPOLOGY__MAX_OVERFLOW: 0
EMQX_AUTH__MONGO__SERVER: "mongo:${MONGO_EXT_PORT}"
EMQX_AUTH__MONGO__POOL: 8
EMQX_AUTH__MONGO__LOGIN: "${MONGO_USERNAME}"
EMQX_AUTH__MONGO__PASSWORD: "${MONGO_PASSWORD}"
EMQX_AUTH__MONGO__AUTH_SOURCE: admin
EMQX_AUTH__MONGO__DATABASE: "ioticos_god_level"
EMQX_AUTH__MONGO__AUTH_QUERY__COLLECTION: "emqxauthrules"
EMQX_AUTH__MONGO__SUPER_QUERY__COLLECTION: "emqxauthrules"
EMQX_AUTH__MONGO__SUPER_QUERY__SUPER_FIELD: "is_superuser"
EMQX_AUTH__MONGO__SUPER_QUERY__SELECTOR: "username=%u"
EMQX_AUTH__MONGO__SUPER_QUERY: "off"
EMQX_AUTH__MONGO__AUTH_QUERY__PASSWORD_HASH: plain
EMQX_AUTH__MONGO__AUTH_QUERY__PASSWORD_FIELD: "password"
EMQX_AUTH__MONGO__AUTH_QUERY__SELECTOR: "username=%u"
## Enable ACL query.
#Access control list
EMQX_AUTH__MONGO__ACL_QUERY: "on"
EMQX_AUTH__MONGO__ACL_QUERY__COLLECTION: "emqxauthrules"
EMQX_AUTH__MONGO__ACL_QUERY__SELECTOR: "username=%u"
EMQX_LOADED_PLUGINS: "emqx_recon,emqx_retainer,emqx_management,emqx_dashboard,emqx_auth_mongo"
EMQX_LISTENER__TCP__EXTERNAL__MAX_CONNECTIONS: 1000