mirror of https://github.com/Nardo86/zm-docker.git
This commit is contained in:
parent
8179f73542
commit
d8362c81ee
|
@ -34,14 +34,13 @@ RUN a2enmod ssl \
|
||||||
&& a2enconf zoneminder \
|
&& a2enconf zoneminder \
|
||||||
&& a2ensite default-ssl.conf
|
&& a2ensite default-ssl.conf
|
||||||
|
|
||||||
RUN mkdir /config \
|
RUN mkdir /config
|
||||||
&& sed -i -e 's,/var/lib/mysql,/config/mysql,g' /etc/mysql/mariadb.conf.d/50-server.cnf
|
|
||||||
|
|
||||||
COPY entrypoint.sh /
|
COPY entrypoint.sh /
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
VOLUME /var/cache/zoneminder
|
VOLUME /var/cache/zoneminder
|
||||||
|
VOLUME /sslcert
|
||||||
|
|
||||||
EXPOSE 443/tcp
|
EXPOSE 443/tcp
|
||||||
EXPOSE 9000/tcp
|
|
||||||
|
|
11
README.md
11
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
|
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:
|
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
|
Backup the old DB
|
||||||
|
@ -69,6 +71,15 @@ Init / cleanup
|
||||||
|
|
||||||
`root@newSystem# zmaudit.pl`
|
`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**
|
**EXTRA OPTIONS**
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ echo "Configuring MariaDBPath"
|
||||||
if [ ! -d /config/mysql ]; then
|
if [ ! -d /config/mysql ]; then
|
||||||
mkdir -p /config/mysql
|
mkdir -p /config/mysql
|
||||||
rsync -a -v -q --ignore-existing /var/lib/mysql/ /config/mysql/
|
rsync -a -v -q --ignore-existing /var/lib/mysql/ /config/mysql/
|
||||||
echo "Configuration done"
|
echo "MariaDBPath configuration done"
|
||||||
else
|
else
|
||||||
echo "MariaDBPath already configured"
|
echo "MariaDBPath already configured"
|
||||||
fi
|
fi
|
||||||
|
@ -47,7 +47,7 @@ while ! mysqladmin ping --silent; do
|
||||||
echo "Waiting mysql restart"
|
echo "Waiting mysql restart"
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
echo "Configuration done"
|
echo "MariaDB configuration done"
|
||||||
else
|
else
|
||||||
echo "MariaDB already configured"
|
echo "MariaDB already configured"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue