forked from Anas-Ah25/Cakery
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 683 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (22 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ----------- backend api Dockerfile -----------
FROM python:3.10
RUN apt-get update && apt-get install -y \
libpq-dev \
build-essential \
gcc \
&& apt-get clean
WORKDIR /app
COPY . /app
# Install dependencies
RUN pip install --upgrade pip
COPY requirements.txt /app/
RUN pip install -r requirements.txt
RUN pip install gunicorn Flask flasgger==0.9.7.1
# list installed packages
RUN pip list
# Expose port
EXPOSE 5000
# environment variables
ENV FLASK_APP=run.py
ENV FLASK_ENV=production
CMD ["gunicorn", "-b", "0.0.0.0:5000", "run:app"]