Add unifi-network-application
This commit is contained in:
parent
f78f1b2d37
commit
0b58ce1288
3 changed files with 82 additions and 0 deletions
30
unifi-network-application/README.md
Normal file
30
unifi-network-application/README.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# unifi-network-application
|
||||
|
||||
Powerful, enterprise wireless software engine ideal for high-density client deployments requiring low latency and high uptime performance
|
||||
|
||||
## Important step when deploying
|
||||
The user to be used by unifi has to be created by an init script.
|
||||
Use the following script mounted in the container like so:
|
||||
`/path/to/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro`
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
if which mongosh > /dev/null 2>&1; then
|
||||
mongo_init_bin='mongosh'
|
||||
else
|
||||
mongo_init_bin='mongo'
|
||||
fi
|
||||
"${mongo_init_bin}" <<EOF
|
||||
use ${MONGO_AUTHSOURCE}
|
||||
db.auth("${MONGO_INITDB_ROOT_USERNAME}", "${MONGO_INITDB_ROOT_PASSWORD}")
|
||||
db.createUser({
|
||||
user: "${MONGO_USER}",
|
||||
pwd: "${MONGO_PASS}",
|
||||
roles: [
|
||||
{ db: "${MONGO_DBNAME}", role: "dbOwner" },
|
||||
{ db: "${MONGO_DBNAME}_stat", role: "dbOwner" }
|
||||
]
|
||||
})
|
||||
EOF
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue