You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,11 +147,12 @@ services:
147
147
- TZ=Etc/UTC
148
148
- MONGO_USER=unifi
149
149
- MONGO_PASS=
150
-
- MONGO_HOST=unifi-db
151
-
- MONGO_PORT=27017
150
+
- MONGO_HOST=unifi-db[,unifi-db2[,unifi-db3]]
151
+
- MONGO_PORT=27017[,27017[,27017]]
152
152
- MONGO_DBNAME=unifi
153
153
- MEM_LIMIT=1024 #optional
154
154
- MEM_STARTUP=1024 #optional
155
+
- MONGO_REPLICASET= #optional
155
156
- MONGO_TLS= #optional
156
157
- MONGO_AUTHSOURCE= #optional
157
158
volumes:
@@ -179,11 +180,12 @@ docker run -d \
179
180
-e TZ=Etc/UTC \
180
181
-e MONGO_USER=unifi \
181
182
-e MONGO_PASS= \
182
-
-e MONGO_HOST=unifi-db \
183
-
-e MONGO_PORT=27017 \
183
+
-e MONGO_HOST=unifi-db[,unifi-db2[,unifi-db3]] \
184
+
-e MONGO_PORT=27017[,27017[,27017]] \
184
185
-e MONGO_DBNAME=unifi \
185
186
-e MEM_LIMIT=1024 `#optional` \
186
187
-e MEM_STARTUP=1024 `#optional` \
188
+
-e MONGO_REPLICASET= `#optional` \
187
189
-e MONGO_TLS= `#optional` \
188
190
-e MONGO_AUTHSOURCE= `#optional` \
189
191
-p 8443:8443 \
@@ -220,11 +222,12 @@ Containers are configured using parameters passed at runtime (such as those abov
220
222
|`-e TZ=Etc/UTC`| specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
221
223
|`-e MONGO_USER=unifi`| Mongodb Username. Only evaluated on first run. **Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding)**. |
222
224
|`-e MONGO_PASS=`| Mongodb Password. Only evaluated on first run. **Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding)**. |
223
-
|`-e MONGO_HOST=unifi-db`| Mongodb Hostname. Only evaluated on first run. |
224
-
|`-e MONGO_PORT=27017`| Mongodb Port. Only evaluated on first run. |
225
+
|`-e MONGO_HOST=unifi-db[,unifi-db2[,unifi-db3]]`| Mongodb Hostname (multiple hosts separated with comma allowed if MONGO_REPLICASET is set). Only evaluated on first run. |
226
+
|`-e MONGO_PORT=27017[,27017[,27017]]`| Mongodb Port (multiple ports separated with comma allowed if MONGO_REPLICASET is set). Only evaluated on first run. |
225
227
|`-e MONGO_DBNAME=unifi`| Mongodb Database Name (stats DB is automatically suffixed with `_stat`). Only evaluated on first run. |
226
228
|`-e MEM_LIMIT=1024`| Optionally change the Java memory limit (in Megabytes). Set to `default` to reset to default |
227
229
|`-e MEM_STARTUP=1024`| Optionally change the Java initial/minimum memory (in Megabytes). Set to `default` to reset to default |
230
+
|`-e MONGO_REPLICASET=`| Name of Mongodb (existing) [replicaset](https://www.mongodb.com/docs/manual/reference/connection-string/#replica-set-option). Only evaluated on first run. |
228
231
|`-e MONGO_TLS=`| Mongodb enable [TLS](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.tls). Only evaluated on first run. |
229
232
|`-e MONGO_AUTHSOURCE=`| Mongodb [authSource](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource). For Atlas set to `admin`.Defaults to `MONGO_DBNAME`.Only evaluated on first run. |
230
233
|`-v /config`| All Unifi data stored here |
@@ -391,5 +394,6 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
391
394
## Versions
392
395
393
396
***04.03.24:** - Install from zip package instead of deb.
397
+
***17.02.24:** - Add environment variables for replicaSet.
394
398
***17.10.23:** - Add environment variables for TLS and authSource to support Atlas and new MongoDB versions.
Copy file name to clipboardExpand all lines: readme-vars.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,15 +33,15 @@ param_env_vars:
33
33
- { env_var: "MONGO_USER", env_value: "unifi", desc: "Mongodb Username. Only evaluated on first run. **Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding)**." }
34
34
- { env_var: "MONGO_PASS", env_value: "", desc: "Mongodb Password. Only evaluated on first run. **Special characters must be [url encoded](https://en.wikipedia.org/wiki/Percent-encoding)**." }
35
35
- { env_var: "MONGO_HOST", env_value: "unifi-db[,unifi-db2[,unifi-db3]]", desc: "Mongodb Hostname (multiple hosts separated with comma allowed if MONGO_REPLICASET is set). Only evaluated on first run." }
36
-
- { env_var: "MONGO_PORT", env_value: "27017[,unifi-db2 port[,unifi-db3 port]]", desc: "Mongodb Port (multiple ports separated with comma allowed if MONGO_REPLICASET is set). Only evaluated on first run." }
36
+
- { env_var: "MONGO_PORT", env_value: "27017[,27017[,27017]]", desc: "Mongodb Port (multiple ports separated with comma allowed if MONGO_REPLICASET is set). Only evaluated on first run." }
37
37
- { env_var: "MONGO_DBNAME", env_value: "unifi", desc: "Mongodb Database Name (stats DB is automatically suffixed with `_stat`). Only evaluated on first run." }
38
38
39
39
# optional container parameters
40
40
opt_param_usage_include_env: true
41
41
opt_param_env_vars:
42
42
- { env_var: "MEM_LIMIT", env_value: "1024", desc: "Optionally change the Java memory limit (in Megabytes). Set to `default` to reset to default" }
43
43
- { env_var: "MEM_STARTUP", env_value: "1024", desc: "Optionally change the Java initial/minimum memory (in Megabytes). Set to `default` to reset to default" }
44
-
- { env_var: "MONGO_REPLICASET", env_value: "", desc: "Name of Mongodb [replicaset](https://www.mongodb.com/docs/manual/reference/connection-string/#replica-set-option). Only evaluated on first run." }
44
+
- { env_var: "MONGO_REPLICASET", env_value: "", desc: "Name of Mongodb (existing) [replicaset](https://www.mongodb.com/docs/manual/reference/connection-string/#replica-set-option). Only evaluated on first run." }
45
45
- { env_var: "MONGO_TLS", env_value: "", desc: "Mongodb enable [TLS](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.tls). Only evaluated on first run." }
46
46
- { env_var: "MONGO_AUTHSOURCE", env_value: "", desc: "Mongodb [authSource](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource). For Atlas set to `admin`.Defaults to `MONGO_DBNAME`.Only evaluated on first run." }
0 commit comments