Refactor grpc-balancer to use Gunicorn and update playbook.yml for deployment
- Replaced the SSL server implementation in grpc-balancer.py with Gunicorn for improved performance and scalability. - Updated playbook.yml to use Gunicorn for starting the grpc-balancer service, including SSL certificate configuration. - Removed the waitress dependency in favor of Gunicorn, streamlining the application setup.
This commit is contained in:
@ -200,7 +200,7 @@
|
||||
- grist-api
|
||||
- flask
|
||||
- requests
|
||||
- waitress
|
||||
- gunicorn
|
||||
extra_args: --break-system-packages
|
||||
|
||||
- name: Create SSL certificate for grpcbalancer
|
||||
@ -229,7 +229,7 @@
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory={{ ansible_env.HOME }}/node
|
||||
ExecStart=/usr/bin/python3 {{ ansible_env.HOME }}/node/grpc-balancer.py
|
||||
ExecStart=/usr/local/bin/gunicorn --certfile=/root/node/cert.pem --keyfile=/root/node/key.pem -b 0.0.0.0:5000 grpc-balancer:app
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user