add relay and jetstream ngx configs
This commit is contained in:
		
							parent
							
								
									55895e63c6
								
							
						
					
					
						commit
						099af0b9ce
					
				
					 5 changed files with 59 additions and 2 deletions
				
			
		
							
								
								
									
										1
									
								
								jetstream/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								jetstream/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| /data | ||||
|  | @ -1,3 +1,3 @@ | |||
| #!/usr/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| ./src/jetstream --ws-url 'ws://127.0.0.1:3000/xrpc/com.atproto.sync.subscribeRepos' --liveness-ttl 10000m | ||||
| ./src/jetstream --ws-url 'ws://127.0.0.1:3000/xrpc/com.atproto.sync.subscribeRepos' --liveness-ttl 10000m --listen-addr "127.0.0.1:6008" --metrics-listen-addr "127.0.0.1:6009" | ||||
|  |  | |||
|  | @ -2,3 +2,5 @@ | |||
| 
 | ||||
| mkdir out 2>/dev/null || true | ||||
| deno run ./default.ts > out/default.conf | ||||
| deno run ./relay.ts > out/relay.conf | ||||
| deno run ./jetstream.ts > out/jetstream.conf | ||||
|  |  | |||
							
								
								
									
										27
									
								
								ngx/jetstream.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								ngx/jetstream.ts
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| import ngx from "jsr:@char/ngx@0.2"; | ||||
| 
 | ||||
| export const config = ngx("", [ | ||||
|   ngx("map $http_upgrade $connection_upgrade", [ | ||||
|     "default upgrade", | ||||
|     "'' close" | ||||
|   ]), | ||||
|   [], | ||||
|   ngx("server", [ | ||||
|     [ | ||||
|       ngx.serverName("jetstream.cerulea.blue"), | ||||
|       ngx.listen(), | ||||
|       ngx.letsEncrypt("jetstream.cerulea.blue"), | ||||
|     ], | ||||
|     ngx("location /", [ | ||||
|       "client_max_body_size 100M", | ||||
|       "proxy_pass http://127.0.0.1:6008", | ||||
|       "proxy_http_version 1.1", | ||||
|       "proxy_set_header Upgrade $http_upgrade", | ||||
|       "proxy_set_header Connection $connection_upgrade", | ||||
|       "proxy_set_header Host $host", | ||||
|       "proxy_read_timeout 300s", | ||||
|     ]), | ||||
|   ]), | ||||
| ]); | ||||
| 
 | ||||
| if (import.meta.main) console.log(config.build()); | ||||
							
								
								
									
										27
									
								
								ngx/relay.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								ngx/relay.ts
									
									
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| import ngx from "jsr:@char/ngx@0.2"; | ||||
| 
 | ||||
| export const config = ngx("", [ | ||||
|   ngx("map $http_upgrade $connection_upgrade", [ | ||||
|     "default upgrade", | ||||
|     "'' close" | ||||
|   ]), | ||||
|   [], | ||||
|   ngx("server", [ | ||||
|     [ | ||||
|       ngx.serverName("relay.cerulea.blue"), | ||||
|       ngx.listen(), | ||||
|       ngx.letsEncrypt("relay.cerulea.blue"), | ||||
|     ], | ||||
|     ngx("location /", [ | ||||
|       "client_max_body_size 1G", | ||||
|       "proxy_pass http://127.0.0.1:3000", | ||||
|       "proxy_http_version 1.1", | ||||
|       "proxy_set_header Upgrade $http_upgrade", | ||||
|       "proxy_set_header Connection $connection_upgrade", | ||||
|       "proxy_set_header Host $host", | ||||
|       "proxy_read_timeout 300s", | ||||
|     ]), | ||||
|   ]), | ||||
| ]); | ||||
| 
 | ||||
| if (import.meta.main) console.log(config.build()); | ||||
		Loading…
	
		Reference in a new issue