Add inference service healthcheck to ensure the updater service properly starts up

This commit is contained in:
conache 2024-05-29 13:10:08 +03:00
parent 2c8da7c7db
commit 244ea79d0a
No known key found for this signature in database

View File

@ -13,15 +13,27 @@ services:
aliases: aliases:
- inference - inference
ipv4_address: 172.22.0.4 ipv4_address: 172.22.0.4
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/inference/ETH"]
interval: 10s
timeout: 5s
retries: 12
updater: updater:
container_name: updater-basic-eth-pred container_name: updater-basic-eth-pred
build: . build: .
environment: environment:
- INFERENCE_API_ADDRESS=http://inference:8000 - INFERENCE_API_ADDRESS=http://inference:8000
command: python -u /app/update_app.py command: >
sh -c "
while true; do
python -u /app/update_app.py;
sleep 10;
done
"
depends_on: depends_on:
- inference inference:
condition: service_healthy
networks: networks:
eth-model-local: eth-model-local:
aliases: aliases: