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:
vvzvlad
2025-01-20 19:32:16 +03:00
parent e40e14dea5
commit 64d57407e0
2 changed files with 3 additions and 10 deletions

View File

@ -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