Add unifi-network-application
This commit is contained in:
parent
f78f1b2d37
commit
0b58ce1288
3 changed files with 82 additions and 0 deletions
2
ports.md
2
ports.md
|
@ -4,6 +4,8 @@
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| 222 | gitea |
|
| 222 | gitea |
|
||||||
| 8000 | portainer |
|
| 8000 | portainer |
|
||||||
|
| 8080 | unifi-controller |
|
||||||
| 8081 | scrutiny |
|
| 8081 | scrutiny |
|
||||||
| 8082 | paperless |
|
| 8082 | paperless |
|
||||||
| 8083 | firefly-fints-importer |
|
| 8083 | firefly-fints-importer |
|
||||||
|
| 8443 | unifi-controller |
|
||||||
|
|
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
|
||||||
|
```
|
50
unifi-network-application/docker-compose.yaml
Normal file
50
unifi-network-application/docker-compose.yaml
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
unifi-network-application:
|
||||||
|
image: lscr.io/linuxserver/unifi-network-application:${unifi_version:-latest}
|
||||||
|
container_name: unifi-network-application
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Etc/UTC
|
||||||
|
- MONGO_USER=unifi
|
||||||
|
- MONGO_PASS=unifi
|
||||||
|
- MONGO_HOST=unifi
|
||||||
|
- MONGO_PORT=27017
|
||||||
|
- MONGO_DBNAME=unifi
|
||||||
|
- MONGO_AUTHSOURCE=admin
|
||||||
|
volumes:
|
||||||
|
- unifi_data:/config
|
||||||
|
networks:
|
||||||
|
- unifi_db
|
||||||
|
ports:
|
||||||
|
- 8443:8443
|
||||||
|
- 3478:3478/udp
|
||||||
|
- 10001:10001/udp
|
||||||
|
- 8080:8080
|
||||||
|
|
||||||
|
unifi-db:
|
||||||
|
image: docker.io/mongo:${mongo_version:-4.4}
|
||||||
|
container_name: unifi-db
|
||||||
|
environment:
|
||||||
|
- MONGO_INITDB_ROOT_USERNAME=root
|
||||||
|
- MONGO_INITDB_ROOT_PASSWORD=root
|
||||||
|
- MONGO_USER=unifi
|
||||||
|
- MONGO_PASS=unifi
|
||||||
|
- MONGO_DBNAME=unifi
|
||||||
|
- MONGO_AUTHSOURCE=admin
|
||||||
|
volumes:
|
||||||
|
- mongo_data:/data/db
|
||||||
|
- /path/to/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro
|
||||||
|
networks:
|
||||||
|
- unifi_db
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
unifi_data:
|
||||||
|
mongo_data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
unifi_db:
|
Loading…
Reference in a new issue