add process-compose config and justfile, move all port numbers higher
This commit is contained in:
		
							
								
								
									
										7
									
								
								app1.ini
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								app1.ini
									
									
									
									
									
								
							| @@ -6,8 +6,9 @@ threads=true | |||||||
|  |  | ||||||
| wsgi-file=foobar.py | wsgi-file=foobar.py | ||||||
| vacuum=true | vacuum=true | ||||||
| socket=127.0.0.1:9027 | touch-reload=app1.ini | ||||||
|  | socket=127.0.0.1:19027 | ||||||
|  |  | ||||||
| stats-server=run/9027_stats.sock | stats-server=run/19027_stats.sock | ||||||
|  |  | ||||||
| subscribe2=addr=127.0.0.1:9027,key=app1.pikesquares.local,server=127.0.0.1:9700 | subscribe2=addr=127.0.0.1:19027,key=app1.pikesquares.local,server=127.0.0.1:19700 | ||||||
|   | |||||||
							
								
								
									
										7
									
								
								app2.ini
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								app2.ini
									
									
									
									
									
								
							| @@ -6,7 +6,8 @@ threads = true | |||||||
|  |  | ||||||
| wsgi-file = foobar.py | wsgi-file = foobar.py | ||||||
| vacuum=true | vacuum=true | ||||||
| socket=127.0.0.1:9028 | touch-reload=app2.ini | ||||||
| stats-server=run/9028_stats.sock | socket=127.0.0.1:19028 | ||||||
|  | stats-server=run/19028_stats.sock | ||||||
|  |  | ||||||
| subscribe2=addr=127.0.0.1:9028,key=app1.pikesquares.local,server=127.0.0.1:9700 | subscribe2=addr=127.0.0.1:19028,key=app1.pikesquares.local,server=127.0.0.1:19700 | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								app3.ini
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								app3.ini
									
									
									
									
									
								
							| @@ -5,8 +5,10 @@ workers = 3 | |||||||
| threads = true | threads = true | ||||||
|  |  | ||||||
| wsgi-file = foobar.py | wsgi-file = foobar.py | ||||||
| socket=127.0.0.1:9029 | vacuum=true | ||||||
|  |  | ||||||
| stats-server=run/9029_stats.sock | touch-reload=app2.ini | ||||||
|  | socket=127.0.0.1:19029 | ||||||
|  | stats-server=run/19029_stats.sock | ||||||
|  |  | ||||||
| subscribe2=addr=127.0.0.1:9029,key=app2.pikesquares.local,server=127.0.0.1:9701 | subscribe2=addr=127.0.0.1:19029,key=app2.pikesquares.local,server=127.0.0.1:19701 | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ def read_stats(socket_address): | |||||||
|  |  | ||||||
| if __name__ == "__main__": | if __name__ == "__main__": | ||||||
|     counter = 0 |     counter = 0 | ||||||
|     nodes =["127.0.0.1:9027", "127.0.0.1:9030"] |     nodes =["127.0.0.1:19027", "127.0.0.1:19030"] | ||||||
|     for node in nodes: |     for node in nodes: | ||||||
|         port = node.split(":")[-1] |         port = node.split(":")[-1] | ||||||
|         socket_address = f"{port}_stats.sock" |         socket_address = f"{port}_stats.sock" | ||||||
|   | |||||||
							
								
								
									
										73
									
								
								process-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								process-compose.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,73 @@ | |||||||
|  | version: "0.1" | ||||||
|  | is_strict: true | ||||||
|  | log_location: "process-compose.log" | ||||||
|  | log_level: debug | ||||||
|  | log_configuration: | ||||||
|  |   fields_order: ["time", "level", "message"] # order of logging fields. The default is time, level, message | ||||||
|  |   disable_json: true                         # output as plain text. The default is false | ||||||
|  |   timestamp_format: "06-01-02 15:04:05.000"  # timestamp format. The default is RFC3339 | ||||||
|  |   no_metadata: true                          # don't log process name and replica number | ||||||
|  |   add_timestamp: true                        # add timestamp to the logger. Default is false | ||||||
|  |   no_color: true                             # disable ANSII colors in the logger. Default is false | ||||||
|  |   flush_each_line: true                      # disable buffering and flush each line to the log file. Default is false | ||||||
|  |  | ||||||
|  | vars: | ||||||
|  |  | ||||||
|  | environment: | ||||||
|  |  | ||||||
|  | processes: | ||||||
|  |   uWSGI HTTP Router 1: | ||||||
|  |     environment: | ||||||
|  |     command: "uwsgi sub1.ini" | ||||||
|  |     description: uWSGI HTTP Router 1 | ||||||
|  |     is_daemon: false | ||||||
|  |     disabled: false | ||||||
|  |  | ||||||
|  |     availability: | ||||||
|  |       restart: "no" | ||||||
|  |       exit_on_end: true | ||||||
|  |        | ||||||
|  |   uWSGI HTTP Router 2: | ||||||
|  |     environment: | ||||||
|  |     command: "uwsgi sub2.ini" | ||||||
|  |     description: uWSGI HTTP Router 2 | ||||||
|  |     is_daemon: false | ||||||
|  |     disabled: false | ||||||
|  |     availability: | ||||||
|  |       restart: "no" | ||||||
|  |  | ||||||
|  |   uWSGI App 1: | ||||||
|  |     environment: | ||||||
|  |     command: "uwsgi app1.ini" | ||||||
|  |     description: uWSGI App 1 on port 19027 | ||||||
|  |     is_daemon: false | ||||||
|  |     disabled: false | ||||||
|  |     availability: | ||||||
|  |       restart: "no" | ||||||
|  |     depends_on: | ||||||
|  |       uWSGI HTTP Router 1: | ||||||
|  |         condition: process_completed_successfuly | ||||||
|  |  | ||||||
|  |   uWSGI App 2: | ||||||
|  |     environment: | ||||||
|  |     command: "uwsgi app2.ini" | ||||||
|  |     description: uWSGI App 2 on port 19028 | ||||||
|  |     is_daemon: false | ||||||
|  |     disabled: false | ||||||
|  |     availability: | ||||||
|  |       restart: "no" | ||||||
|  |     depends_on: | ||||||
|  |       uWSGI HTTP Router 1: | ||||||
|  |         condition: process_completed_successfuly | ||||||
|  |  | ||||||
|  |   uWSGI App 3: | ||||||
|  |     environment: | ||||||
|  |     command: "uwsgi app3.ini" | ||||||
|  |     description: uWSGI App 3 on port 19029 | ||||||
|  |     is_daemon: false | ||||||
|  |     disabled: false | ||||||
|  |     availability: | ||||||
|  |       restart: "no" | ||||||
|  |     depends_on: | ||||||
|  |       uWSGI HTTP Router 2: | ||||||
|  |         condition: process_completed_successfuly | ||||||
							
								
								
									
										4
									
								
								sub1.ini
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								sub1.ini
									
									
									
									
									
								
							| @@ -3,6 +3,6 @@ strict=true | |||||||
| master=true | master=true | ||||||
| touch-reload=sub1.ini | touch-reload=sub1.ini | ||||||
| vacuum=true | vacuum=true | ||||||
| http=0.0.0.0:8934 | http=0.0.0.0:18934 | ||||||
| http-subscription-server=127.0.0.1:9700 | http-subscription-server=127.0.0.1:19700 | ||||||
| http-stats=run/sub1-stats.sock | http-stats=run/sub1-stats.sock | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								sub2.ini
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								sub2.ini
									
									
									
									
									
								
							| @@ -3,6 +3,6 @@ strict=true | |||||||
| master=true | master=true | ||||||
| touch-reload=sub2.ini | touch-reload=sub2.ini | ||||||
| vacuum=true | vacuum=true | ||||||
| http=0.0.0.0:8935 | http=0.0.0.0:18935 | ||||||
| http-subscription-server=127.0.0.1:9701 | http-subscription-server=127.0.0.1:19701 | ||||||
| http-stats=run/sub2-stats.sock | http-stats=run/sub2-stats.sock | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user