Skip to content

Commit d47a121

Browse files
committed
Add new environment variables to README.md
1 parent 1563507 commit d47a121

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,8 @@ services:
172172
- PUID=1000
173173
- PGID=1000
174174
- TZ=Etc/UTC
175-
- MONGO_USER=unifi
176-
- MONGO_PASS=
177-
- MONGO_HOST=unifi-db
178-
- MONGO_PORT=27017
175+
- MONGO_URI=mongodb+srv://unifi:[email protected]/unifi?retryWrites=true&w=majority&appName=unifi
176+
- STAT_MONGO_URI=mongodb+srv://unifi:[email protected]/unifi_stats?retryWrites=true&w=majority&appName=unifi
179177
- MONGO_DBNAME=unifi
180178
- MONGO_AUTHSOURCE=admin
181179
- MEM_LIMIT=1024 #optional
@@ -204,10 +202,8 @@ docker run -d \
204202
-e PUID=1000 \
205203
-e PGID=1000 \
206204
-e TZ=Etc/UTC \
207-
-e MONGO_USER=unifi \
208-
-e MONGO_PASS= \
209-
-e MONGO_HOST=unifi-db \
210-
-e MONGO_PORT=27017 \
205+
-e MONGO_URI=mongodb+srv://unifi:[email protected]/?retryWrites=true&w=majority&appName=unifi \
206+
-e STAT_MONGO_URI=mongodb+srv://unifi:[email protected]/?retryWrites=true&w=majority&appName=unifi \
211207
-e MONGO_DBNAME=unifi \
212208
-e MONGO_AUTHSOURCE=admin \
213209
-e MEM_LIMIT=1024 `#optional` \

readme-vars.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,15 @@ param_ports:
2424
- {external_port: "8080", internal_port: "8080", port_desc: "Required for device communication"}
2525
param_usage_include_env: true
2626
param_env_vars:
27-
- {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)**."}
28-
- {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)**."}
29-
- {env_var: "MONGO_HOST", env_value: "unifi-db", desc: "Mongodb Hostname. Only evaluated on first run."}
30-
- {env_var: "MONGO_PORT", env_value: "27017", desc: "Mongodb Port. Only evaluated on first run."}
31-
- {env_var: "MONGO_DBNAME", env_value: "unifi", desc: "Mongodb Database Name (stats DB is automatically suffixed with `_stat`). Only evaluated on first run."}
32-
- {env_var: "MONGO_AUTHSOURCE", env_value: "admin", desc: "Mongodb [authSource](https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.authSource). For Atlas set to `admin`. Only evaluated on first run."}
27+
- {env_var: "MONGO_URI", env_value: "unifi", desc: "MongoDB URI. Only evaluated on first run."}
28+
- {env_var: "STAT_MONGO_URI", env_value: "", desc: "MongoDB stat URI. Only evaluated on first run."}
29+
- {env_var: "MONGO_DBNAME", env_value: "unifi", desc: "MongoDB Database Name (stats DB is automatically suffixed with `_stat`). Only evaluated on first run."}
3330
# optional container parameters
3431
opt_param_usage_include_env: true
3532
opt_param_env_vars:
3633
- {env_var: "MEM_LIMIT", env_value: "1024", desc: "Optionally change the Java memory limit (in Megabytes). Set to `default` to reset to default"}
3734
- {env_var: "MEM_STARTUP", env_value: "1024", desc: "Optionally change the Java initial/minimum memory (in Megabytes). Set to `default` to reset to default"}
38-
- {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."}
35+
3936
opt_param_usage_include_ports: true
4037
opt_param_ports:
4138
- {external_port: "1900", internal_port: "1900/udp", port_desc: "Required for `Make controller discoverable on L2 network` option"}
@@ -178,6 +175,7 @@ init_diagram: |
178175
"unifi-network-application:latest" <- Base Images
179176
# changelog
180177
changelogs:
178+
- {date: "07.05.25:", desc: "Change environment variables" }
181179
- {date: "13.02.25:", desc: "Revert JRE to 17."}
182180
- {date: "12.02.25:", desc: "Bump JRE to 21."}
183181
- {date: "11.08.24:", desc: "**Important**: The mongodb init instructions have been updated to enable auth ([RBAC](https://www.mongodb.com/docs/manual/core/authorization/#role-based-access-control)). We have been notified that if RBAC is not enabled, the official mongodb container allows remote access to the db contents over port 27017 without credentials. If you set up the mongodb container with the old instructions we provided, you should not map or expose port 27017. If you would like to enable auth, the easiest way is to create new instances of both unifi and mongodb with the new instructions and restore unifi from a backup."}

0 commit comments

Comments
 (0)