Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:docker-compose-unifi [2025/11/07 18:45] 91.151.137.49wiki:docker-compose-unifi [2025/11/07 18:56] (current) 91.151.137.49
Line 1: Line 1:
 +====Unifi Controller====
 +  * When running in docker for adoption to work set interface IP: Settings > Sysytem > Advanced > Inform Host > Override \\
 +  * MongoDB version 4 required for CPUs without AVX support (MiniBox)
 +<code file docker-compose.yml>
 services: services:
   mongodb:   mongodb:
Line 20: Line 24:
     restart: unless-stopped     restart: unless-stopped
  
-  app:+  unifi:
     image: lscr.io/linuxserver/unifi-network-application:9.0.114     image: lscr.io/linuxserver/unifi-network-application:9.0.114
     container_name: unifi-app     container_name: unifi-app
Line 48: Line 52:
         max-file: "1"         max-file: "1"
     restart: unless-stopped     restart: unless-stopped
 +</code>
 +
 +<code file init.mongodb>
 +#!/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
 +</code>
Navigation
Print/export
QR Code
QR Code wiki:docker-compose-unifi (generated for current page)