feat: add health check and heartbeat endpoint to Docker setup
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m26s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m26s
This commit is contained in:
@@ -4,10 +4,16 @@ FROM python:3.13.1-slim-bookworm
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /app/requirements.txt
|
||||
|
||||
# Install curl
|
||||
RUN apt-get update && apt-get install -y curl
|
||||
|
||||
# Copy the application
|
||||
COPY main.py /app
|
||||
COPY utils/ /app/utils
|
||||
WORKDIR /app
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "main.py"]
|
||||
CMD ["python", "main.py"]
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --interval=5s --timeout=10s --retries=5 CMD curl -f http://localhost/heartbeat || exit 1
|
Reference in New Issue
Block a user