-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (60 loc) · 3.28 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: "3.7"
networks:
# proxy-network: # optional, Use this network or your own if you intend to configure the unifi-network-application container through a revers proxy, otherwise not needed.
# external: true
unifi:
volumes: # You can change the volumes' device path if you want, otherwise no need to change, default Docker volume folder location will be used
unifi_mongo_data:
unifi-config:
services:
unifi-mongo:
image: portiz93/unifi-mongo:${MONGO_VERSION:-6.0.15} # Required MONGO_VERSION, Default "6.0.15", specify whatever Mongo version tag you need. DO NOT set 'latest' tag
container_name: unifi-mongo
environment:
# - MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME:-root} # Required only if using mongodb version < 6.0, otherwise do not set (See official Mongo image)
# - MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD:?Root Password Required} # Required only if using mongodb version < 6.0, otherwise do not set (See official Mongo image)
- MONGO_USER=${MONGO_USER:-unifi} # Default "unifi"
- MONGO_PASS=${MONGO_PASS:?Mongo Password Required} # Required
- MONGO_DBNAME=${MONGO_DBNAME:-unifi} # Default "unifi"
volumes:
- unifi_mongo_data:/data/db
# ports:
# - 27017:27017 # optional, Default "27017", only port if needed outside of unifi app
networks:
unifi:
restart: unless-stopped
unifi-network-application:
image: lscr.io/linuxserver/unifi-network-application:latest
container_name: unifi-network-application
depends_on:
unifi-mongo:
condition: service_healthy
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
- MONGO_USER=${MONGO_USER:-unifi} # Required, Default "unifi"
- MONGO_PASS=${MONGO_PASS:?Mongo Password Required} # Required, Note some special charactor could cause failure to connect to MondoDB
- MONGO_DBNAME=${MONGO_DBNAME:-unifi} # Required, Default "unifi"
- MONGO_HOST=unifi-mongo # Required, must match the mongo container name
- MONGO_PORT=27017 # Required, Must be that same as the mongo container defined port
# - MEM_LIMIT=1024 # optional
# - MEM_STARTUP=1024 # optional
# - MONGO_TLS= # optional
# - MONGO_AUTHSOURCE= # optional
volumes:
- unifi-config:/config
ports:
- 8443:8443
- 3478:3478/udp
- 10001:10001/udp
- 8080:8080
- 1900:1900/udp # optional
# - 8843:8843 # optional
# - 8880:8880 # optional
- 6789:6789 # optional
- 5514:5514/udp # optional
networks:
# proxy-network: # optional, Use this network or our own if you intend to configure the unifi-network-application container through a revers proxy, otherwise not needed.
unifi:
restart: unless-stopped