aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 62693b75e0b3173e1773dfcbe8c2745cb8f600f6 (plain) (blame)
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
33
34
35
36
37
38
39
40
FROM alpine:latest

RUN apk update && apk add python3 py3-setuptools py3-virtualenv

RUN apk add postgresql-dev gcc python3-dev libc-dev

COPY app/requirements.txt /requirements.txt

RUN pip3 install --no-cache-dir -r /requirements.txt

RUN apk add linux-headers

RUN pip3 install --no-cache-dir uwsgi

RUN apk del linux-headers

RUN apk add postgresql-client

# Feel free to change the UID if necessary
RUN adduser -D -H -u 1000 uwsgi

# RUN apk add uwsgi-python3

RUN rm /requirements.txt

RUN mkdir /app && chown uwsgi /app
RUN mkdir /static && chown uwsgi /static

USER uwsgi

CMD [ "uwsgi", "--ini", "/app/uwsgi.ini" ]

# WORKDIR /app

# CMD [ "uwsgi", "--socket", "0.0.0.0:9200", \
#                "--env", "CUSTOM_CONFIG=/app/config.yml", \
#                "--processes", "1", \
#                "--threads", "4", \
#                "--uid", "uwsgi", \
#                "wsgi:application" ]