This commit is contained in:
Eros Nardi 2021-03-02 22:34:51 +01:00
parent 8179f73542
commit d8362c81ee
3 changed files with 15 additions and 5 deletions

View File

@ -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

View File

@ -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**

View File

@ -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