MTA — Modernize Traditional Apps with Docker, case study 2 ZoneMinder cluster

ZoneMinder multi-server deployment
root@localhost:~# git clone https://github.com/marcelo-ochoa/docker-zoneminder.git
root@localhost:~# cd docker-zoneminder/
root@localhost:~/docker-zoneminder# docker build -t “quantumobject/docker-zoneminder:1.31.1” -f Dockerfile .
root@localhost:~# git clone https://github.com/marcelo-ochoa/dockercloud-haproxy.git
root@localhost:~# cd dockercloud-haproxy/
root@localhost:~/dockercloud-haproxy# docker build -t “dockercloud/haproxy:1.6.7.1” -f Dockerfile .
docker-compose.yml
backup:
image: quantumobject/docker-zoneminder:1.31.1
command: /sbin/backup
networks:
— net
volumes:
— backups:/var/backups
environment:
— ZM_DB_HOST=db
deploy:
mode: replicated
replicas: 0
placement:
constraints:
— node.labels.interconnect == si
restart_policy:
condition: none
# Backup ZoneMinder MySQL Tuesday 2:35am
35 2 * * 2 root run-task zm_backup
healthcheck:
test: exit $$(ps axo pid=,stat= | awk ‘$$2~/^Z/ { print }’| grep -c -m 1 Z)
interval: 55s
timeout: 3s
Swarm visualizer using Portainer.IO tool

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store