1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-30 09:16:41 +02:00
dockerfiles/zoneminder
2017-05-08 07:05:07 +08:00
..
mysql update zoneminder 2016-07-18 13:11:22 +08:00
docker-compose.yml update zoneminder 2016-07-18 13:39:20 +08:00
Dockerfile swith to new domain: easypi.pro 2017-05-08 07:05:07 +08:00
nginx.conf update zoneminder 2016-07-18 13:11:22 +08:00
README.md upgrade grafana to 3.1.0 2016-07-18 20:23:10 +08:00

zoneminder

ZoneMinder is a full-featured, open source, state-of-the-art video surveillance software system. Monitor your home, office, or wherever you want. Using off the shelf hardware with any camera, you can design a system as large or as small as you need.

docker-compose.yml

zoneminder:
  image: vimagick/zoneminder
  ports:
    - "127.0.0.1:8080:80"
  links:
    - mysql
  volumes:
    - ./fcgiwrap:/etc/default/fcgiwrap
  restart: always

mysql:
  image: mysql
  volumes:
    - ./mysql/my.cnf:/etc/mysql/conf.d/my.cnf
    - ./mysql:/docker-entrypoint-initdb.d
    - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
  environment:
    - MYSQL_ROOT_PASSWORD=root
  restart: always
  • timezone = Asia/Shanghai was hard-coded in Dockerfile.
  • Make sure two containers have the same timezone.

fcgiwrap

FCGI_CHILDREN=4

/etc/nginx/sites-enabled/default

server {
    listen 80;
    server_name zm.easypi.info;
    location = / {
      return 301 /zm/;
    }
    location /zm/ {
        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/htpasswd;
        proxy_pass http://127.0.0.1:8080;
    }
}

/etc/nginx/htpasswd

user:$apr1$zLX30Ahb$S0pZUiZW676E0gTplhpie0

up and running

$ docker-compose up -d
  • Open http://zm.easypi.info/
  • Add New Monitor
    • Click Presets: 640x480, mpjpeg
    • Change Source
      • Remote Host Name: user:pass@x.x.x.x
      • Remote Host Port: 8080
      • Remote Host Path: /?action=stream
    • Save
  • Run State: Stopped -> Running
  • Click Monitor-1

I'm running mjpg-streamer on OpenWrt.

references