50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
|
version: '3'
|
||
|
services:
|
||
|
db:
|
||
|
image: mariadb
|
||
|
restart: always
|
||
|
networks:
|
||
|
- zoneminder
|
||
|
volumes:
|
||
|
- "/etc/localtime:/etc/localtime:ro"
|
||
|
- "{{ docker_dir }}/zm/db:/var/lib/mysql"
|
||
|
environment:
|
||
|
- "MYSQL_DATABASE=zm"
|
||
|
- "MYSQL_ROOT_PASSWORD={{ vault_mysql_root_password }}"
|
||
|
- "MYSQL_USER={{ mysql_user }}"
|
||
|
- "MYSQL_PASSWORD={{ vault_mysql_user_password }}"
|
||
|
|
||
|
zoneminder:
|
||
|
image: ghcr.io/zoneminder-containers/zoneminder-base:latest
|
||
|
restart: always
|
||
|
stop_grace_period: 45s
|
||
|
depends_on:
|
||
|
- db
|
||
|
ports:
|
||
|
- 80:80
|
||
|
networks:
|
||
|
- zoneminder
|
||
|
- compose_net
|
||
|
volumes:
|
||
|
- "/etc/localtime:/etc/localtime:ro"
|
||
|
- "{{ docker_dir }}/zm/data:/data"
|
||
|
- "{{ docker_dir }}/zm/config:/config"
|
||
|
- "{{ docker_dir }}/zm/log:/log"
|
||
|
- type: tmpfs
|
||
|
target: /dev/shm
|
||
|
tmpfs:
|
||
|
size: 1000000000
|
||
|
environment:
|
||
|
- MAX_LOG_SIZE_BYTES=1000000
|
||
|
- MAX_LOG_NUMBER=20
|
||
|
|
||
|
networks:
|
||
|
zoneminder:
|
||
|
compose_net:
|
||
|
driver: bridge
|
||
|
ipam:
|
||
|
driver: default
|
||
|
config:
|
||
|
- subnet: 172.16.69.0/24
|
||
|
gateway: 172.16.69.1
|