2024-03-27 11:18:57 +01:00
|
|
|
FROM python:alpine3.19
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY /requirements.txt requirements.txt
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
2024-03-27 14:17:05 +01:00
|
|
|
COPY athlete/ .
|
|
|
|
|
|
|
|
RUN apk update && apk add --no-cache curl
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=5s --timeout=3s --start-period=5s --retries=3 CMD curl --fail http://localhost:8000/ping || exit 1
|
|
|
|
|
|
|
|
COPY sample/athletes.json ./data/
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
ENV ATHLETE_FILE=data/athletes.json
|
2024-03-27 11:18:57 +01:00
|
|
|
|
2024-03-27 14:17:05 +01:00
|
|
|
CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"]
|