From d8362c81ee2c9bb178637ae0f0ff213b78241b8b Mon Sep 17 00:00:00 2001 From: Eros Nardi Date: Tue, 2 Mar 2021 22:34:51 +0100 Subject: [PATCH] 0 --- Dockerfile | 5 ++--- README.md | 11 +++++++++++ entrypoint.sh | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2507e75..ff3871f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,14 +34,13 @@ RUN a2enmod ssl \ && a2enconf zoneminder \ && a2ensite default-ssl.conf -RUN mkdir /config \ -&& sed -i -e 's,/var/lib/mysql,/config/mysql,g' /etc/mysql/mariadb.conf.d/50-server.cnf +RUN mkdir /config COPY entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] VOLUME /config VOLUME /var/cache/zoneminder +VOLUME /sslcert EXPOSE 443/tcp -EXPOSE 9000/tcp diff --git a/README.md b/README.md index 6db68b6..f590697 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ The shm-size will be the quantity of RAM dedicated to /dev/shm.* To access the Zoneminder gui, browse to: https://your.fqdn:443/zm +**TIPS - RESTORE CONFIGURATION** + If you need to transfer your data from another instance this method worked for me https://forums.zoneminder.com/viewtopic.php?t=17071: Backup the old DB @@ -69,6 +71,15 @@ Init / cleanup `root@newSystem# zmaudit.pl` +**TIPS - STUCK WITH Waiting mysql** + +If the mysql service fails to start for some problem the script will stay in an infinite loop waiting mysql xxxx.. + +You can then log in to the machine and investigate for example starting the db with the command + +`/usr/bin/mysqld_safe --skip-syslog` + +this will generate a detailed logfile of the startup possibly with some hints you can search to restore the db. **EXTRA OPTIONS** diff --git a/entrypoint.sh b/entrypoint.sh index 5fe5fdc..c3c30a1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,7 +5,7 @@ echo "Configuring MariaDBPath" if [ ! -d /config/mysql ]; then mkdir -p /config/mysql rsync -a -v -q --ignore-existing /var/lib/mysql/ /config/mysql/ - echo "Configuration done" + echo "MariaDBPath configuration done" else echo "MariaDBPath already configured" fi @@ -47,7 +47,7 @@ while ! mysqladmin ping --silent; do echo "Waiting mysql restart" sleep 3 done -echo "Configuration done" +echo "MariaDB configuration done" else echo "MariaDB already configured" fi