fix: add health check wait to ansible deploy
Wait for Streamlit to be ready before finishing deployment to prevent 502 errors
This commit is contained in:
@@ -57,3 +57,11 @@
|
|||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: nohup /home/webapps/.local/bin/uv run streamlit run Home.py --server.port=8501 --server.address=0.0.0.0 --server.headless=true --server.enableCORS=false &
|
cmd: nohup /home/webapps/.local/bin/uv run streamlit run Home.py --server.port=8501 --server.address=0.0.0.0 --server.headless=true --server.enableCORS=false &
|
||||||
chdir: ~/motief
|
chdir: ~/motief
|
||||||
|
|
||||||
|
- name: wait for streamlit to be ready
|
||||||
|
ansible.builtin.uri:
|
||||||
|
url: http://127.0.0.1:8501/_stcore/health
|
||||||
|
method: GET
|
||||||
|
status_code: 200
|
||||||
|
retries: 30
|
||||||
|
delay: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user