File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.7
1
+ FROM python:3.8
2
2
3
3
WORKDIR /app
4
4
5
5
ENV PYTHONDONTWRITEBYTECODE 1
6
6
ENV PYTHONUNBUFFERED 1
7
7
8
8
RUN apt-get update
9
+
10
+ RUN apt-get install -y python3-dev uwsgi uwsgi-src libcap-dev uwsgi-plugin-python3
9
11
RUN pip install --upgrade pip
10
12
11
13
COPY requirements.txt /
12
14
13
15
RUN pip install --no-cache-dir -r /requirements.txt
14
16
17
+ RUN export PYTHON=python3.8
18
+ RUN uwsgi --build-plugin "/usr/src/uwsgi/plugins/python python38"
19
+ RUN mv python38_plugin.so /usr/lib/uwsgi/plugins/python38_plugin.so
20
+ RUN chmod 666 /usr/lib/uwsgi/plugins/python38_plugin.so
21
+
15
22
COPY . .
16
23
17
24
RUN mkdir /app/static \
@@ -29,9 +36,9 @@ RUN chmod -R 777 /app/static
29
36
COPY . /paws-data-pipeline/server
30
37
31
38
RUN chmod 777 /paws-data-pipeline/server
32
-
39
+ # RUN ufw allow 5000
33
40
WORKDIR /app
34
41
35
- CMD python app.py
36
-
37
-
42
+ # CMD python app.py
43
+ # --uid uwsgi
44
+ CMD uwsgi --http-socket :5000 --plugin python38 --module wsgi:app
You can’t perform that action at this time.
0 commit comments