mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
update zoneminder
This commit is contained in:
parent
cacfadb57b
commit
7c034993e9
@ -139,7 +139,7 @@ A collection of delicious docker recipes.
|
||||
- [x] phpvirtualbox-arm
|
||||
- [x] piwik
|
||||
- [x] revive
|
||||
- [x] zoneminder
|
||||
- [x] zoneminder :+1:
|
||||
|
||||
## Builder
|
||||
|
||||
|
@ -85,7 +85,6 @@ $ docker-compose logs service
|
||||
# /etc/ngrok/ngrok.yml
|
||||
authtoken: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
console_ui: false
|
||||
log: stdout
|
||||
region: ap
|
||||
web_addr: 0.0.0.0:4040
|
||||
tunnels:
|
||||
@ -103,11 +102,12 @@ tunnels:
|
||||
```ini
|
||||
# /etc/systemd/system/ngrok.service
|
||||
[Unit]
|
||||
Description=Ngrok Daemon
|
||||
Description=Secure Tunnels To Localhost
|
||||
Documentation=https://ngrok.com/docs
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/ngrok start --config /etc/ngrok/ngrok.yml --all
|
||||
ExecStart=/usr/bin/ngrok start --config /etc/ngrok/ngrok.yml --log stdout --all
|
||||
RestartSec=10
|
||||
Restart=always
|
||||
|
||||
|
@ -26,6 +26,8 @@ COPY nginx.conf /etc/nginx/sites-available/default
|
||||
EXPOSE 80
|
||||
|
||||
CMD set -xe \
|
||||
&& mkdir -p /var/run/zm \
|
||||
&& chown www-data:www-data /var/run/zm \
|
||||
&& /etc/init.d/fcgiwrap start \
|
||||
&& /etc/init.d/php5-fpm start \
|
||||
&& nginx -g 'daemon off;'
|
||||
|
@ -22,15 +22,35 @@ zoneminder:
|
||||
mysql:
|
||||
image: mysql
|
||||
volumes:
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
- ./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.
|
||||
|
||||
## up and running
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
- Open <http://localhost:8080/zm/>
|
||||
- Add New Monitor
|
||||
- Click Presets
|
||||
- Change Source
|
||||
- Save
|
||||
- Run State: Stopped -> Running
|
||||
|
||||
## 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>
|
||||
- <https://forums.zoneminder.com/viewtopic.php?p=55482>
|
||||
- <https://dev.mysql.com/doc/refman/5.7/en/option-files.html>
|
||||
|
||||
[1]: https://www.zoneminder.com/
|
||||
|
@ -9,7 +9,9 @@ zoneminder:
|
||||
mysql:
|
||||
image: mysql
|
||||
volumes:
|
||||
- ./sql:/docker-entrypoint-initdb.d
|
||||
- ./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
|
||||
|
2
zoneminder/mysql/my.cnf
Normal file
2
zoneminder/mysql/my.cnf
Normal file
@ -0,0 +1,2 @@
|
||||
[mysqld]
|
||||
sql_mode = NO_ENGINE_SUBSTITUTION
|
@ -13,12 +13,9 @@ server {
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
location = /zm/cgi-bin/nph-zms {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /usr/lib/zoneminder/cgi-bin/nph-zms;
|
||||
fastcgi_pass unix:/var/run/fcgiwrap.socket;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user