add health checking

This commit is contained in:
2025-06-26 06:22:12 +00:00
parent e998634429
commit 388dd622b1
2 changed files with 10 additions and 0 deletions

View File

@ -18,6 +18,10 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy source copy
COPY ./translator .
# Install tools
RUN apt update
RUN apt install -y curl
# Run app
CMD streamlit run app.py --server.port=8501 --server.enableCORS=false --server.enableXsrfProtection=false

View File

@ -7,3 +7,9 @@ services:
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- GEMINI_API_KEY=${GEMINI_API_KEY}
healthcheck:
test: curl -f http://localhost:8501 || exit 1
interval: 1m
timeout: 10s
retries: 3
start_period: 30s