This will spawn everything needed to run a UniFi Network Application in a container including a container for the MongoDB database. Using the LinuxServer.io UniFi Network Application image and the official MongoDB image.
use .env to define your variables
CONTAINER_NAME
the name of your UniFi stack. There will be two containers spawned.- The one with
_CORE
appended to it is the LinuxServer.io UniFi Network Application image. - The one with
_DB
appended to it is the official MongoDB image. Currently pinned to version 7.0 as that's the highest UniFi supports.
- The one with
MONGO_DBNAME
the name of the MongoDB database. The stats DB will have_stat
appended to it.MONGO_USER
the database userMONGO_PASS
the password for the database userTIME_ZONE
Time Zone for the UniFi Network Application
If you have been running my docker compose file for a while it's possible that you are running MongoDB 4.4. Here are the details for upgrading the Mongo database from 4.4 to 7.0. The database upgrade is not needed on new installs.