forked from tbowmo/docker-swarm-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzoneminder.yml
76 lines (70 loc) · 1.91 KB
/
zoneminder.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '3.2'
services:
db:
image: mysql/mysql-server:5.7
volumes:
- /mnt/sdd/zoneminder/mysql/data:/var/lib/mysql
- /mnt/sdd/zoneminder/mysql/conf:/etc/mysql:ro
environment:
- TZ=Europe/Copenhagen
- MYSQL_USER=zmuser
- MYSQL_PASSWORD=zmpass
- MYSQL_DATABASE=zm
- MYSQL_ROOT_PASSWORD=mysqlpsswd
- MYSQL_ROOT_HOST=%
networks:
- zoneminder
deploy:
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
placement:
constraints:
- node.labels.storage==yes
web:
image: quantumobject/docker-zoneminder
networks:
- traefik-public
- zoneminder
ports:
- "8081:80" #So I can access it on internal network on a shared host
volumes:
- /var/empty
- /mnt/sdd/zoneminder/backups:/var/backups
- /mnt/sdd/zoneminder/cache:/var/cache/zoneminder
- type: tmpfs
target: /dev/shm
environment:
- TZ=Europe/Copenhagen
# - VIRTUAL_HOST=zm.localhost, stream0.localhost
# - SERVICE_PORTS="8081"
# - ZM_SERVER_HOST=node.0
- ZM_DB_HOST=db
depends_on:
- db
deploy:
restart_policy:
condition: any
delay: 5s
max_attempts: 3
window: 120s
placement:
constraints:
- node.labels.storage==yes
replicas: 1
labels:
- traefik.frontend.rule=Host:zm.${BASE_HOST};PathPrefix:/zm
- traefik.port=80
- traefik.docker.network=traefik-public
- traefik.enable=true
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
- traefik.tags=traefik-public
- traefik.webservice.frontend.entryPoints=https
- traefik.frontend.auth.basic=${USER_ZONEMINDER}
networks:
traefik-public:
external: true
zoneminder: