mirror of
				https://git.tt-rss.org/fox/ttrss-docker-compose
				synced 2025-11-04 01:54:11 +01:00 
			
		
		
		
	update all local plugins on startup, unless forbidden by TTRSS_NO_STARTUP_PLUGIN_UPDATES
This commit is contained in:
		
							parent
							
								
									47a9813d9d
								
							
						
					
					
						commit
						28f740a2a0
					
				
					 2 changed files with 22 additions and 6 deletions
				
			
		| 
						 | 
					@ -28,6 +28,9 @@ ADD config.docker.php ${SCRIPT_ROOT}
 | 
				
			||||||
ENV OWNER_UID=1000
 | 
					ENV OWNER_UID=1000
 | 
				
			||||||
ENV OWNER_GID=1000
 | 
					ENV OWNER_GID=1000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# don't try to update local plugins on startup (except for nginx_xaccel)
 | 
				
			||||||
 | 
					ENV TTRSS_NO_STARTUP_PLUGIN_UPDATES=""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# TTRSS_XDEBUG_HOST defaults to host IP if unset
 | 
					# TTRSS_XDEBUG_HOST defaults to host IP if unset
 | 
				
			||||||
ENV TTRSS_XDEBUG_ENABLED=""
 | 
					ENV TTRSS_XDEBUG_ENABLED=""
 | 
				
			||||||
ENV TTRSS_XDEBUG_HOST=""
 | 
					ENV TTRSS_XDEBUG_HOST=""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,13 +45,26 @@ fi
 | 
				
			||||||
if [ ! -d $DST_DIR/plugins.local/nginx_xaccel ]; then
 | 
					if [ ! -d $DST_DIR/plugins.local/nginx_xaccel ]; then
 | 
				
			||||||
	echo cloning plugins.local/nginx_xaccel...
 | 
						echo cloning plugins.local/nginx_xaccel...
 | 
				
			||||||
	git clone https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git \
 | 
						git clone https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git \
 | 
				
			||||||
		$DST_DIR/plugins.local/nginx_xaccel ||  echo error: failed to clone plugin repository.
 | 
							$DST_DIR/plugins.local/nginx_xaccel ||  echo warning: failed to clone nginx_xaccel.
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
	echo updating plugins.local/nginx_xaccel...
 | 
						if [ -z "$TTRSS_NO_STARTUP_PLUGIN_UPDATES" ]; then
 | 
				
			||||||
	cd $DST_DIR/plugins.local/nginx_xaccel && \
 | 
							echo updating all local plugins...
 | 
				
			||||||
		git config core.filemode false && \
 | 
					
 | 
				
			||||||
		git config pull.rebase false && \
 | 
							find $DST_DIR/plugins.local -type d -maxdepth 1 | while read PLUGIN; do
 | 
				
			||||||
	  	git pull origin master || echo error: failed to update plugin repository.
 | 
								echo updating $PLUGIN...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								cd $PLUGIN && \
 | 
				
			||||||
 | 
									git config core.filemode false && \
 | 
				
			||||||
 | 
									git config pull.rebase false && \
 | 
				
			||||||
 | 
								  	git pull origin master || echo warning: attempt to update plugin $PLUGIN failed.
 | 
				
			||||||
 | 
							done
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							echo updating plugins.local/nginx_xaccel...
 | 
				
			||||||
 | 
							cd $DST_DIR/plugins.local/nginx_xaccel && \
 | 
				
			||||||
 | 
								git config core.filemode false && \
 | 
				
			||||||
 | 
								git config pull.rebase false && \
 | 
				
			||||||
 | 
							  	git pull origin master || echo warning: attempt to update plugin nginx_xaccel failed.
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cp ${SCRIPT_ROOT}/config.docker.php $DST_DIR/config.php
 | 
					cp ${SCRIPT_ROOT}/config.docker.php $DST_DIR/config.php
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue