mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-28 09:41:20 +00:00
add zoneminder
This commit is contained in:
parent
7bded15bc5
commit
fa0cb1351a
@ -42,6 +42,7 @@ A collection of delicious docker recipes.
|
|||||||
- [ ] tshark
|
- [ ] tshark
|
||||||
- [ ] youtube-upload
|
- [ ] youtube-upload
|
||||||
- [ ] xl2tpd
|
- [ ] xl2tpd
|
||||||
|
- [ ] zoneminder
|
||||||
|
|
||||||
## Daemon
|
## Daemon
|
||||||
|
|
||||||
|
31
zoneminder/Dockerfile
Normal file
31
zoneminder/Dockerfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#
|
||||||
|
# Dockerfile for zoneminder
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM debian:jessie
|
||||||
|
MAINTAINER kev <noreply@easypi.info>
|
||||||
|
|
||||||
|
RUN set -xe \
|
||||||
|
&& echo 'deb http://http.debian.net/debian jessie-backports main' >> /etc/apt/sources.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install --no-install-recommends -y fcgiwrap \
|
||||||
|
ffmpeg \
|
||||||
|
nginx \
|
||||||
|
php5-fpm \
|
||||||
|
zoneminder \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN set -xe \
|
||||||
|
&& chmod o+r /etc/zm/zm.conf \
|
||||||
|
&& sed -i 's@^ZM_DB_HOST=.*$@ZM_DB_HOST=mysql@' /etc/zm/zm.conf \
|
||||||
|
&& sed -i 's@^;date.timezone =.*$@date.timezone = Asia/Shanghai@' /etc/php5/*/php.ini \
|
||||||
|
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/sites-available/default
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD set -xe \
|
||||||
|
&& /etc/init.d/fcgiwrap start \
|
||||||
|
&& /etc/init.d/php5-fpm start \
|
||||||
|
&& nginx -g 'daemon off;'
|
36
zoneminder/README.md
Normal file
36
zoneminder/README.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
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:
|
||||||
|
- "8080:80"
|
||||||
|
links:
|
||||||
|
- mysql
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
mysql:
|
||||||
|
image: mysql
|
||||||
|
volumes:
|
||||||
|
- ./sql:/docker-entrypoint-initdb.d
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=root
|
||||||
|
restart: always
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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>
|
||||||
|
|
||||||
|
[1]: https://www.zoneminder.com/
|
15
zoneminder/docker-compose.yml
Normal file
15
zoneminder/docker-compose.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
zoneminder:
|
||||||
|
image: vimagick/zoneminder
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
|
links:
|
||||||
|
- mysql
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
mysql:
|
||||||
|
image: mysql
|
||||||
|
volumes:
|
||||||
|
- ./sql:/docker-entrypoint-initdb.d
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=root
|
||||||
|
restart: always
|
24
zoneminder/nginx.conf
Normal file
24
zoneminder/nginx.conf
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
location /zm/ {
|
||||||
|
alias /usr/share/zoneminder/www/;
|
||||||
|
location ~ \.php$ {
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
location /zm/cgi-bin/ {
|
||||||
|
alias /usr/lib/zoneminder/cgi-bin/;
|
||||||
|
location ~ \.php$ {
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
|
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1177
zoneminder/sql/00-zm_create.sql
Normal file
1177
zoneminder/sql/00-zm_create.sql
Normal file
File diff suppressed because it is too large
Load Diff
1
zoneminder/sql/01-zm_user.sql
Normal file
1
zoneminder/sql/01-zm_user.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
GRANT ALL ON zm.* TO 'zmuser'@% IDENTIFIED BY 'zmpass';
|
Loading…
Reference in New Issue
Block a user