Cloud_Computing_II/Dockerfile.Backend

14 lines
326 B
Docker
Raw Normal View History

2023-03-10 08:21:27 +00:00
FROM python:3.8
WORKDIR /app
2023-03-13 14:25:15 +00:00
ADD ./backend/requirements.txt /app/requirements.txt
2023-03-10 08:21:27 +00:00
RUN pip install --upgrade -r requirements.txt
EXPOSE 8080
2023-03-13 14:25:15 +00:00
COPY ./backend/ /app
2023-03-10 08:21:27 +00:00
2023-03-13 12:37:23 +00:00
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://localhost:8080/health || exit 1