-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (41 loc) · 1.25 KB
/
Dockerfile
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
41
42
43
44
45
46
47
48
49
FROM python:3.4.1
ENV DEBIAN_FRONTEND noninteractive
ENV UWSGI_AUTOLOAD false
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH /code:/usr/local/lib/python3.4/site-packages
ENV UWSGI_CALLABLE app
ENV UWSGI_PY_TRACEBACKER /tmp/tracebacker
ENV UWSGI_MASTER true
ENV UWSGI_MASTER_AS_ROOT true
ENV UWSGI_UID app
ENV UWSGI_GID app
ENV UWSGI_UWSGI_SOCKET 0.0.0.0:5000
ENV UWSGI_NO_ORPHANS true
ENV UWSGI_VACUUM true
ENV UWSGI_LOG_DATE true
ENV UWSGI_LAZY_APPS false
ENV UWSGI_WORKERS 4
ENV UWSGI_THREADS 1
ENV UWSGI_ENABLE_THREADS true
ENV UWSGI_BUFFER_SIZE 65536
ENV UWSGI_MAX_REQUESTS 128
ENV UWSGI_HARAKIRI 120
ENV UWSGI_HARAKIRI_VERBOSE true
ENV UWSGI_THUNDER_LOCK true
ENV PGDATABASE app
ENV PGUSER app
ENV PGPASSWORD app
ENV PGHOST db
ENV PGPORT 5432
RUN groupadd -r app && \
useradd -r -g app -d /code app
RUN apt update && \
apt install -y \
build-essential \
python-dev \
python-setuptools && \
rm -rf /var/lib/apt/lists/*
RUN pip install \
'uWSGI >=2.0, <2.1'
EXPOSE 5000
CMD ["uwsgi"]