mirror of
				https://git.tt-rss.org/fox/ttrss-docker-compose
				synced 2025-11-04 03:34:19 +01:00 
			
		
		
		
	make PHP worker process and memory limits configurable
This commit is contained in:
		
							parent
							
								
									adfe0ab121
								
							
						
					
					
						commit
						731725fb4e
					
				
					 2 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -28,6 +28,9 @@ ADD config.docker.php ${SCRIPT_ROOT}
 | 
			
		|||
ENV OWNER_UID=1000
 | 
			
		||||
ENV OWNER_GID=1000
 | 
			
		||||
 | 
			
		||||
ENV PHP_WORKER_MAX_CHILDREN=5
 | 
			
		||||
ENV PHP_WORKER_MEMORY_LIMIT=256M
 | 
			
		||||
 | 
			
		||||
# don't try to update local plugins on startup (except for nginx_xaccel)
 | 
			
		||||
ENV TTRSS_NO_STARTUP_PLUGIN_UPDATES=""
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -120,4 +120,10 @@ rm -f /tmp/error.log && mkfifo /tmp/error.log && chown app:app /tmp/error.log
 | 
			
		|||
 | 
			
		||||
touch $DST_DIR/.app_is_ready
 | 
			
		||||
 | 
			
		||||
sed -i.bak "s/^\(memory_limit\) = \(.*\)/\1 = ${PHP_WORKER_MEMORY_LIMIT}/" \
 | 
			
		||||
	/etc/php8/php.ini
 | 
			
		||||
 | 
			
		||||
sed -i.bak "s/^\(pm.max_children\) = \(.*\)/\1 = ${PHP_WORKER_MAX_CHILDREN}/" \
 | 
			
		||||
	/etc/php8/php-fpm.d/www.conf
 | 
			
		||||
 | 
			
		||||
exec /usr/sbin/php-fpm8 --nodaemonize --force-stderr -R
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue