[SOGo] Wait for updated db schema before bootstrapping
parent
7998ec3f1f
commit
f011db317e
|
@ -13,6 +13,17 @@ do
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Wait for updated schema
|
||||||
|
DBV_NOW=$(mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "SELECT version FROM versions;" -BN)
|
||||||
|
DBV_NEW=$(grep -oE '\$db_version = .*;' init_db.inc.php | sed 's/$db_version = //g;s/;//g' | cut -d \" -f2)
|
||||||
|
while [[ ${DBV_NOW} != ${DBV_NEW} ]]; do
|
||||||
|
echo "Waiting for schema update..."
|
||||||
|
DBV_NOW=$(mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "SELECT version FROM versions;" -BN)
|
||||||
|
DBV_NEW=$(grep -oE '\$db_version = .*;' init_db.inc.php | sed 's/$db_version = //g;s/;//g' | cut -d \" -f2)
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo "DB schema is ${DBV_NOW}"
|
||||||
|
|
||||||
# Recreate view
|
# Recreate view
|
||||||
|
|
||||||
mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "DROP VIEW IF EXISTS sogo_view"
|
mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} -e "DROP VIEW IF EXISTS sogo_view"
|
||||||
|
|
|
@ -138,7 +138,7 @@ services:
|
||||||
- phpfpm
|
- phpfpm
|
||||||
|
|
||||||
sogo-mailcow:
|
sogo-mailcow:
|
||||||
image: mailcow/sogo:1.42
|
image: mailcow/sogo:1.43
|
||||||
build: ./data/Dockerfiles/sogo
|
build: ./data/Dockerfiles/sogo
|
||||||
environment:
|
environment:
|
||||||
- DBNAME=${DBNAME}
|
- DBNAME=${DBNAME}
|
||||||
|
|
Loading…
Reference in New Issue