From 507bc242e6b6e1b606a8af3c19f8d2f52e6b9d93 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 18 Jul 2016 13:39:20 +0800 Subject: [PATCH] update zoneminder --- zoneminder/README.md | 36 ++++++++++++++++++++++++++++++++--- zoneminder/docker-compose.yml | 2 +- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/zoneminder/README.md b/zoneminder/README.md index cb695cc..4949320 100644 --- a/zoneminder/README.md +++ b/zoneminder/README.md @@ -14,7 +14,7 @@ or as small as you need. zoneminder: image: vimagick/zoneminder ports: - - "8080:80" + - "127.0.0.1:8080:80" links: - mysql restart: always @@ -33,18 +33,47 @@ mysql: > - `timezone = Asia/Shanghai` was hard-coded in Dockerfile. > - Make sure two containers have the same timezone. +## /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 ```bash $ docker-compose up -d ``` -- Open +- Open - Add New Monitor - - Click Presets + - 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 @@ -52,5 +81,6 @@ $ docker-compose up -d - - - +- [1]: https://www.zoneminder.com/ diff --git a/zoneminder/docker-compose.yml b/zoneminder/docker-compose.yml index 9a72feb..75825c3 100644 --- a/zoneminder/docker-compose.yml +++ b/zoneminder/docker-compose.yml @@ -1,7 +1,7 @@ zoneminder: image: vimagick/zoneminder ports: - - "8080:80" + - "127.0.0.1:8080:80" links: - mysql restart: always