Properly wait for MySQL to come up before starting SOGo
This commit is contained in:
parent
24c8c82f5a
commit
cde250a989
@ -1,7 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Wait for MySQL to warm-up
|
# Wait for MySQL to warm-up
|
||||||
while mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS}${DBPASS} --silent; do
|
while ! mysqladmin ping --host mysql -u${DBUSER} -p${DBPASS} --silent; do
|
||||||
|
echo "Waiting for database to come up..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
# Wait until port becomes free and send sig
|
# Wait until port becomes free and send sig
|
||||||
until ! nc -z sogo-mailcow 20000;
|
until ! nc -z sogo-mailcow 20000;
|
||||||
@ -101,5 +104,3 @@ chown sogo:sogo -R /var/lib/sogo/
|
|||||||
chmod 600 /var/lib/sogo/GNUstep/Defaults/sogod.plist
|
chmod 600 /var/lib/sogo/GNUstep/Defaults/sogod.plist
|
||||||
|
|
||||||
exec gosu sogo /usr/sbin/sogod
|
exec gosu sogo /usr/sbin/sogod
|
||||||
|
|
||||||
done
|
|
||||||
|
@ -124,7 +124,7 @@ services:
|
|||||||
- phpfpm
|
- phpfpm
|
||||||
|
|
||||||
sogo-mailcow:
|
sogo-mailcow:
|
||||||
image: mailcow/sogo:1.12
|
image: mailcow/sogo:1.13
|
||||||
build: ./data/Dockerfiles/sogo
|
build: ./data/Dockerfiles/sogo
|
||||||
environment:
|
environment:
|
||||||
- DBNAME=${DBNAME}
|
- DBNAME=${DBNAME}
|
||||||
|
Loading…
Reference in New Issue
Block a user