add health checking
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user