2024-02-01 14:50:24 +00:00
|
|
|
FROM python:3.9-slim
|
|
|
|
|
|
|
|
WORKDIR /app
|
2024-02-09 00:41:51 +00:00
|
|
|
COPY api /app
|
2024-02-01 14:50:24 +00:00
|
|
|
|
|
|
|
# install any needed packages specified in requirements.txt
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
# make port 5000 available to the world outside this container
|
|
|
|
EXPOSE 5000
|
|
|
|
|
|
|
|
# define environment variable
|
2024-02-11 03:03:23 +00:00
|
|
|
ENV FLASK_APP=api.py
|
2024-02-01 14:50:24 +00:00
|
|
|
|
|
|
|
# run Gunicorn instead of the default Flask development server
|
2024-02-29 15:28:03 +00:00
|
|
|
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--timeout", "60", "main:app"]
|