Fix healthcheck

This commit is contained in:
Clement 2024-09-05 15:41:27 +02:00
parent 233393fc63
commit 3b3644b470
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
FROM python:3.11-slim as project_env FROM python:3.11-slim as project_env
# Install curl
RUN apt-get update && apt-get install -y curl
# Set the working directory in the container # Set the working directory in the container
WORKDIR /app WORKDIR /app

View File

@ -1,6 +1,6 @@
services: services:
inference: inference:
container_name: inference-basic-eth-pred container_name: inference
env_file: env_file:
- .env - .env
build: . build: .
@ -8,7 +8,7 @@ services:
ports: ports:
- "8000:8000" - "8000:8000"
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/inference/${TOKEN}"] test: ["CMD", "curl", "-f", "http://inference:8000/inference/${TOKEN}"]
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 12 retries: 12
@ -16,7 +16,7 @@ services:
- ./inference-data:/app/data - ./inference-data:/app/data
updater: updater:
container_name: updater-basic-eth-pred container_name: updater
build: . build: .
environment: environment:
- INFERENCE_API_ADDRESS=http://inference:8000 - INFERENCE_API_ADDRESS=http://inference:8000