Last active
August 20, 2022 18:14
-
-
Save natesubra/8b2cddec34c47647c10ab10f2bf6c341 to your computer and use it in GitHub Desktop.
unifi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/jacobalberty/unifi-docker | |
# I use volumes because I don't care about this data 😝 | |
volumes: | |
init: | |
log: | |
services: | |
mongo: | |
image: mongo:4 | |
restart: always | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /etc/timezone:/etc/timezone:ro | |
- ./data/db:/data/db | |
controller: | |
image: "jacobalberty/unifi:latest" | |
depends_on: | |
- mongo | |
restart: always | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /etc/timezone:/etc/timezone:ro | |
- init:/unifi/init.d | |
- log:/unifi/log | |
- ./data/unifi:/unifi/data | |
- ./data/backups:/unifi/data/backup | |
# For custom certs | |
#- ../certs/cert.pem:/unifi/cert/cert.pem:ro | |
#- ../certs/key.pem:/unifi/cert/privkey.pem:ro | |
#- ../certs/fullchain.cer:/unifi/cert/chain.pem:ro | |
environment: | |
- "DB_URI=mongodb://mongo/unifi" | |
- "STATDB_URI=mongodb://mongo/unifi_stat" | |
- "DB_NAME=unifi" | |
- "UNIFI_HTTPS_PORT=8443" | |
#- "CERT_IS_CHAIN=true" | |
# PKGURL let's you point to a specific unifi version, it's installed on first run of the container | |
#- "PKGURL=https://dl.ui.com/unifi/6.2.25-de0c6132b7/unifi_sysvinit_all.deb" | |
ports: | |
- "3478:3478/udp" # STUN | |
- "6789:6789/tcp" # Speed test | |
- "8080:8080/tcp" # Device/ controller comm. | |
- "8443:8443/tcp" # Controller GUI/API as seen in a web browser | |
- "8880:8880/tcp" # HTTP portal redirection | |
- "8843:8843/tcp" # HTTPS portal redirection | |
- "10001:10001/udp" # AP discovery | |
logs: | |
image: bash | |
depends_on: | |
- controller | |
command: bash -c 'tail -f /unifi/log/*.log' | |
restart: always | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /etc/timezone:/etc/timezone:ro | |
- log:/unifi/log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment