1
0
Fork 0
mirror of https://git.tt-rss.org/fox/ttrss-docker-compose synced 2025-06-09 14:09:53 +02:00

prevent updater from failing repeatedly on first startup while app volume is not ready

This commit is contained in:
Andrew Dolgov 2020-01-23 12:00:03 +03:00
parent 400fd5c1aa
commit fa73a498a3
3 changed files with 26 additions and 1 deletions

View file

@ -9,6 +9,7 @@ RUN apk add --no-cache php7 php7-fpm \
git postgresql-client sudo
ADD startup.sh /
ADD updater.sh /
ADD index.php /
RUN sed -i.bak 's/^listen = 127.0.0.1:9000/listen = 9000/' /etc/php7/php-fpm.d/www.conf

15
app/updater.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh -ex
while ! pg_isready -h $DB_HOST -U $DB_USER; do
echo waiting until $DB_HOST is ready...
sleep 3
done
DST_DIR=/var/www/html/tt-rss
while [ ! -s $DST_DIR/config.php ]; do
echo waiting for $DST_DIR/config.php...
sleep 3
done
exec /usr/bin/php /var/www/html/tt-rss/update_daemon2.php