mirror of
https://github.com/Anrab35/SAE410_TP2.git
synced 2024-10-21 21:26:09 +02:00
29 lines
583 B
Text
29 lines
583 B
Text
|
FROM python:3-alpine
|
||
|
|
||
|
MAINTAINER Barnabé Dupont <contact@bdupont.tech>
|
||
|
|
||
|
LABEL version="1.0.0"
|
||
|
|
||
|
RUN apk add curl
|
||
|
|
||
|
RUN adduser -D worker
|
||
|
|
||
|
USER worker
|
||
|
|
||
|
WORKDIR /home/worker
|
||
|
|
||
|
COPY --chown=worker:worker docker/requirements.txt /home/worker
|
||
|
|
||
|
RUN pip install --user -r requirements.txt
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY --chown=worker:worker app/athletes.py /app/
|
||
|
|
||
|
COPY --chown=worker:worker app/data/athletes.json /app/data/
|
||
|
|
||
|
EXPOSE 5000
|
||
|
|
||
|
HEALTHCHECK --interval=15s --timeout=30s --start-period=10s --retries=3 CMD curl --fail http://localhost:5000/healthcheck || exit 1
|
||
|
|
||
|
CMD ["python3", "athletes.py"]
|