1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-27 01:08:37 +00:00
dockerfiles/zoneminder/README.md

95 lines
2.0 KiB
Markdown
Raw Normal View History

2016-07-05 10:37:51 +00:00
zoneminder
==========
![](https://badge.imagelayers.io/vimagick/zoneminder:latest.svg)
[ZoneMinder][1] 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
```yaml
zoneminder:
image: vimagick/zoneminder
ports:
2016-07-18 05:39:20 +00:00
- "127.0.0.1:8080:80"
2016-07-05 10:37:51 +00:00
links:
- mysql
2016-07-18 12:23:10 +00:00
volumes:
- ./fcgiwrap:/etc/default/fcgiwrap
2016-07-05 10:37:51 +00:00
restart: always
mysql:
image: mysql
volumes:
2016-07-18 05:02:30 +00:00
- ./mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./mysql:/docker-entrypoint-initdb.d
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
2016-07-05 10:37:51 +00:00
environment:
- MYSQL_ROOT_PASSWORD=root
restart: always
```
2016-07-18 05:02:30 +00:00
> - `timezone = Asia/Shanghai` was hard-coded in Dockerfile.
> - Make sure two containers have the same timezone.
2016-07-18 12:23:10 +00:00
## fcgiwrap
```bash
FCGI_CHILDREN=4
```
2016-07-18 05:39:20 +00:00
## /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
```
2016-07-18 05:02:30 +00:00
## up and running
```bash
$ docker-compose up -d
```
2016-07-18 05:39:20 +00:00
- Open <http://zm.easypi.info/>
2016-07-18 05:02:30 +00:00
- Add New Monitor
2016-07-18 05:39:20 +00:00
- Click Presets: 640x480, mpjpeg
2016-07-18 05:02:30 +00:00
- Change Source
2016-07-18 05:39:20 +00:00
- Remote Host Name: user:pass@x.x.x.x
- Remote Host Port: 8080
- Remote Host Path: /?action=stream
2016-07-18 05:02:30 +00:00
- Save
- Run State: Stopped -> Running
2016-07-18 05:39:20 +00:00
- Click `Monitor-1`
> I'm running `mjpg-streamer` on OpenWrt.
2016-07-18 05:02:30 +00:00
2016-07-05 10:37:51 +00:00
## references
- <https://wiki.zoneminder.com/Ubuntu_Server_16.04_64-bit_with_Zoneminder_1.29.0_the_easy_way>
- <https://chiralsoftware.com/content/zoneminder-nginx-yes-it-works>
2016-07-18 05:02:30 +00:00
- <https://forums.zoneminder.com/viewtopic.php?p=55482>
- <https://dev.mysql.com/doc/refman/5.7/en/option-files.html>
2016-07-18 05:39:20 +00:00
- <http://www.htaccesstools.com/htpasswd-generator/>
2016-07-05 10:37:51 +00:00
[1]: https://www.zoneminder.com/