56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
version: '2.2'
|
|
services:
|
|
mongo:
|
|
image: mongo:3.4
|
|
container_name: ${COMPOSE_PROJECT_NAME}_mongo
|
|
networks:
|
|
- unifi
|
|
restart: always
|
|
volumes:
|
|
- db:/data/db
|
|
controller:
|
|
image: "jacobalberty/unifi:${TAG:-latest}"
|
|
container_name: ${COMPOSE_PROJECT_NAME}_controller
|
|
depends_on:
|
|
- mongo
|
|
init: true
|
|
networks:
|
|
- unifi
|
|
restart: always
|
|
volumes:
|
|
- data:/unifi/data
|
|
- log:/unifi/log
|
|
- cert:/unifi/cert
|
|
- init:/unifi/init.d
|
|
environment:
|
|
DB_URI: mongodb://mongo/unifi
|
|
STATDB_URI: mongodb://mongo/unifi_stat
|
|
DB_NAME: unifi
|
|
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
|
|
container_name: ${COMPOSE_PROJECT_NAME}_logs
|
|
depends_on:
|
|
- controller
|
|
command: bash -c 'tail -F /unifi/log/*.log'
|
|
restart: always
|
|
volumes:
|
|
- log:/unifi/log
|
|
|
|
volumes:
|
|
db:
|
|
data:
|
|
log:
|
|
cert:
|
|
init:
|
|
|
|
networks:
|
|
unifi:
|