infrastructure/unifi-network-application
2024-09-11 11:17:51 +02:00
..
docker-compose.yaml Add unifi-network-application 2024-09-11 11:17:51 +02:00
README.md Add unifi-network-application 2024-09-11 11:17:51 +02:00

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

#!/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