mirror of
				https://git.tt-rss.org/fox/ttrss-docker-compose
				synced 2025-11-04 03:04:14 +01:00 
			
		
		
		
	updater: wait until app container finishes initializing instead of checking for config.php
This commit is contained in:
		
							parent
							
								
									fa73a498a3
								
							
						
					
					
						commit
						59eb978976
					
				
					 2 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue