add process-compose config and justfile, move all port numbers higher

This commit is contained in:
Philip Kalinsky 2025-02-06 19:51:49 -05:00
parent dd37364378
commit 173bfeb8ea
8 changed files with 96 additions and 14 deletions

View File

@ -6,8 +6,9 @@ threads=true
wsgi-file=foobar.py
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

View File

@ -6,7 +6,8 @@ threads = true
wsgi-file = foobar.py
vacuum=true
socket=127.0.0.1:9028
stats-server=run/9028_stats.sock
touch-reload=app2.ini
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

View File

@ -5,8 +5,10 @@ workers = 3
threads = true
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

View File

@ -14,7 +14,7 @@ def read_stats(socket_address):
if __name__ == "__main__":
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:
port = node.split(":")[-1]
socket_address = f"{port}_stats.sock"

5
justfile Normal file
View File

@ -0,0 +1,5 @@
default:
just --list
up:
process-compose -p 19995

73
process-compose.yml Normal file
View 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

View File

@ -3,6 +3,6 @@ strict=true
master=true
touch-reload=sub1.ini
vacuum=true
http=0.0.0.0:8934
http-subscription-server=127.0.0.1:9700
http=0.0.0.0:18934
http-subscription-server=127.0.0.1:19700
http-stats=run/sub1-stats.sock

View File

@ -3,6 +3,6 @@ strict=true
master=true
touch-reload=sub2.ini
vacuum=true
http=0.0.0.0:8935
http-subscription-server=127.0.0.1:9701
http=0.0.0.0:18935
http-subscription-server=127.0.0.1:19701
http-stats=run/sub2-stats.sock