kopia lustrzana https://github.com/OpenDroneMap/WebODM
				
				
				
			Configurable worker count. Closes #1668.
							rodzic
							
								
									27ec8a75e5
								
							
						
					
					
						commit
						410036759e
					
				|  | @ -34,6 +34,7 @@ services: | |||
|       - WO_DEV | ||||
|       - WO_DEV_WATCH_PLUGINS | ||||
|       - WO_SECRET_KEY | ||||
|       - WEB_CONCURRENCY | ||||
|     restart: unless-stopped | ||||
|     oom_score_adj: 0 | ||||
|   broker: | ||||
|  |  | |||
							
								
								
									
										12
									
								
								start.sh
								
								
								
								
							
							
						
						
									
										12
									
								
								start.sh
								
								
								
								
							|  | @ -144,6 +144,18 @@ else | |||
|         conf="nginx-ssl.conf" | ||||
|     fi | ||||
| 
 | ||||
|     # Only set if `WEB_CONCURRENCY` is not defined, allows overriding. | ||||
|     # See: https://docs.gunicorn.org/en/latest/settings.html#workers | ||||
|     if [ -z "$WEB_CONCURRENCY" ]; then | ||||
|         # Default gunicorn worker count to 2 x availabe cores + 1 | ||||
|         # nproc gives _available_ (rather than physicall present) CPU cores. | ||||
|         CPU_COUNT=$(nproc) | ||||
|         export WEB_CONCURRENCY=$((2*$CPU_COUNT+1)) | ||||
|         echo "Setting WEB_CONCURRENCY based on $CPU_COUNT available CPU cores to start $WEB_CONCURRENCY gunicorn workers." | ||||
|     else | ||||
|         echo "Using pre-defined WEB_CONCURRENCY override to start $WEB_CONCURRENCY gunicorn workers." | ||||
|     fi | ||||
| 
 | ||||
|     congrats | ||||
| 
 | ||||
|     nginx -c $(pwd)/nginx/$conf | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Mathijs de Bruin
						Mathijs de Bruin