unifi-docker/docker-compose.yml

50 lines
849 B
YAML

version: '2.2'
services:
mongo:
image: mongo:3.4
networks:
- unifi
restart: always
volumes:
- db:/data/db
controller:
image: "jacobalberty/unifi:${TAG:-latest}"
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:
- "8080:8080"
- "8443:8443"
- "3478:3478/udp"
- "10001:10001/udp"
logs:
image: bash
depends_on:
- controller
command: bash -c 'tail -f /unifi/log/*'
restart: always
volumes:
- log:/unifi/log
volumes:
db:
data:
log:
cert:
init:
networks:
unifi: