diff --git a/app/startup.sh b/app/startup.sh index 768a65e..4d5cd37 100755 --- a/app/startup.sh +++ b/app/startup.sh @@ -8,6 +8,8 @@ done DST_DIR=/var/www/html/tt-rss SRC_REPO=https://git.tt-rss.org/fox/tt-rss.git +[ -e $DST_DIR ] && rm -f $DST_DIR/.app_is_ready + export PGPASSWORD=$DB_PASS [ ! -e /var/www/html/index.php ] && cp /index.php /var/www/html @@ -68,5 +70,7 @@ else -i.bak $DST_DIR/config.php fi +touch $DST_DIR/.app_is_ready + exec /usr/sbin/php-fpm7 -F diff --git a/app/updater.sh b/app/updater.sh index 71caf9e..2f36f47 100755 --- a/app/updater.sh +++ b/app/updater.sh @@ -1,5 +1,8 @@ #!/bin/sh -ex +# wait for the app container to delete .app_is_ready and perform rsync, etc. +sleep 30 + while ! pg_isready -h $DB_HOST -U $DB_USER; do echo waiting until $DB_HOST is ready... sleep 3 @@ -7,8 +10,8 @@ done DST_DIR=/var/www/html/tt-rss -while [ ! -s $DST_DIR/config.php ]; do - echo waiting for $DST_DIR/config.php... +while [ ! -s $DST_DIR/config.php -a -e $DST_DIR/.app_is_ready ]; do + echo waiting for app container... sleep 3 done