From 910b53c0e12dd0e9f0d1d80adb46e28fa41dd04a Mon Sep 17 00:00:00 2001 From: L4RM4ND <21357789+l4rm4nd@users.noreply.github.com> Date: Sat, 28 Oct 2023 22:25:46 +0200 Subject: [PATCH] add unify-network-application --- README.md | 1 + examples/unify-network-application/README.md | 12 +++++ .../docker-compose.yml | 44 +++++++++++++++++++ .../unify-network-application/init-mongo.js | 2 + 4 files changed, 59 insertions(+) create mode 100644 examples/unify-network-application/README.md create mode 100644 examples/unify-network-application/docker-compose.yml create mode 100644 examples/unify-network-application/init-mongo.js diff --git a/README.md b/README.md index f4e168f..667163a 100644 --- a/README.md +++ b/README.md @@ -185,6 +185,7 @@ docker compose up - [Libreddit](examples/libreddit) - Libreddit is a portmanteau of "libre" (meaning freedom) and "Reddit". It is a private front-end like Invidious but for Reddit. Browse the coldest takes of r/unpopularopinion without being tracked. - [Bibliogram](examples/bibliogram) (deprecated) - Bibliogram is a private front-end frontend to Instagram, similar to Invidous. - [Nitter](examples/nitter) - Nitter is an alternative front-end to Twitter, and was inspired by Invidious. +- [Unify Network Application](examples/unify-network-application) - The Unifi-network-application software is a powerful, enterprise wireless software engine ideal for high-density client deployments requiring low latency and high uptime performance. ### Internet of Things / Smart Home / IT Automation - [Home Assistant](examples/homeassistant) - Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. diff --git a/examples/unify-network-application/README.md b/examples/unify-network-application/README.md new file mode 100644 index 0000000..395bb24 --- /dev/null +++ b/examples/unify-network-application/README.md @@ -0,0 +1,12 @@ +# References + +- https://hub.docker.com/r/linuxserver/unifi-network-application +- https://github.com/Haxxnet/Compose-Examples/issues/16#issuecomment-1733524477 + +# Notes + +Note that you are mounting a file named init-mongo.js into the mongo db container. This file is necessary to initialize the mongo database (see https://hub.docker.com/_/mongo/ at "Initializing a fresh instance"). + +It basically defines the database name and user credentials for the unifi-network-application container. + +These parameters are also referenced in the docker-compose.yml file. So either leave as is or adjust everywhere accordingly. diff --git a/examples/unify-network-application/docker-compose.yml b/examples/unify-network-application/docker-compose.yml new file mode 100644 index 0000000..7d62805 --- /dev/null +++ b/examples/unify-network-application/docker-compose.yml @@ -0,0 +1,44 @@ +version: "2.1" + +services: + unifi-network-application: + image: lscr.io/linuxserver/unifi-network-application:latest + container_name: unifi-network-application + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + - MONGO_USER=unifi + - MONGO_PASS=unifi + - MONGO_HOST=unifi-db + - MONGO_PORT=27017 + - MONGO_DBNAME=unifi-db + - MEM_LIMIT=1024 #optional + - MEM_STARTUP=1024 #optional + volumes: + - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/unifi-network-application/config:/config + depends_on: + - unifi-db + ports: + - 8443:8443 + - 3478:3478/udp + - 10001:10001/udp + - 8080:8080 + - 1900:1900/udp #optional + - 8843:8843 #optional + - 8880:8880 #optional + - 6789:6789 #optional + - 5514:5514/udp #optional + restart: unless-stopped + + unifi-db: + image: mongo:4.4 + container_name: unifi-network-application-mongodb + restart: unless-stopped + expose: + - 27017 + environment: + - MONGO_INITDB_DATABASE=unifi-db + volumes: + - ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/unifi-network-application/mongodb_data:/data/db + - ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro diff --git a/examples/unify-network-application/init-mongo.js b/examples/unify-network-application/init-mongo.js new file mode 100644 index 0000000..f6c4d9e --- /dev/null +++ b/examples/unify-network-application/init-mongo.js @@ -0,0 +1,2 @@ +db.getSiblingDB("unifi-db").createUser({user: "unifi", pwd: "unifi", roles: [{role: "readWrite", db: "unifi-db"}]}); +db.getSiblingDB("unifi-db_stat").createUser({user: "unifi", pwd: "unifi", roles: [{role: "readWrite", db: "unifi-db_stat"}]});