forked from jan-leila/nix-config
		
	feat: drafted out reverse proxy config for panoramax
This commit is contained in:
		
							parent
							
								
									0f87d78271
								
							
						
					
					
						commit
						dbd5d36913
					
				
					 1 changed files with 25 additions and 1 deletions
				
			
		|  | @ -53,6 +53,12 @@ in { | |||
|       description = "The panoramax package to use"; | ||||
|     }; | ||||
| 
 | ||||
|     subdomain = lib.mkOption { | ||||
|       type = lib.types.str; | ||||
|       description = "subdomain of base domain that panoramax will be hosted at"; | ||||
|       default = "panoramax"; | ||||
|     }; | ||||
| 
 | ||||
|     # TODO: sgblur config | ||||
|     port = mkOption { | ||||
|       type = types.nullOr types.port; | ||||
|  | @ -233,7 +239,25 @@ in { | |||
|       } | ||||
|       ( | ||||
|         lib.mkIf config.host.reverse_proxy.enable { | ||||
|           # TODO: configure reverse proxy here | ||||
|           host = { | ||||
|             reverse_proxy.subdomains.${config.services.panoramax.subdomain} = { | ||||
|               target = "http://localhost:${toString config.services.panoramax.port}"; | ||||
| 
 | ||||
|               websockets.enable = true; | ||||
|               forwardHeaders.enable = true; | ||||
| 
 | ||||
|               extraConfig = '' | ||||
|                 # allow large file uploads for panoramic images | ||||
|                 client_max_body_size 100M; | ||||
| 
 | ||||
|                 # set timeout for image processing | ||||
|                 proxy_read_timeout 300s; | ||||
|                 proxy_send_timeout 300s; | ||||
|                 send_timeout       300s; | ||||
|                 proxy_redirect     off; | ||||
|               ''; | ||||
|             }; | ||||
|           }; | ||||
|         } | ||||
|       ) | ||||
|       ( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue