This commit is contained in:
parent
62bc7437c2
commit
da13db921f
@ -2,6 +2,9 @@ FROM python:3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install curl for health checks
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
@ -20,7 +23,7 @@ USER apiuser
|
||||
|
||||
# Health checks
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
||||
CMD python -c "import requests; requests.get('http://localhost:5000/health')" || exit 1
|
||||
CMD curl -f http://localhost:5000/health || exit 1
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user