blob: 52cc6b32673cb7f2577d18b815465faa1f3e4a45 (
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
41
42
43
44
|
FROM bitnami/python:3.7-prod
STOPSIGNAL SIGQUIT
ARG EXTRAS=deploy
RUN adduser \
--disabled-login \
--no-create-home \
--uid 1500 \
pysite
RUN apt-get update -y \
&& \
apt-get install --no-install-recommends -y \
gcc \
libc-dev \
libpq-dev \
git \
&& \
apt-get clean \
&& \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY Pipfile Pipfile.lock /app/
RUN rm -r /opt/bitnami/python/lib/python3.*/site-packages/setuptools* && \
pip install --no-cache-dir -U setuptools
RUN python3 -m pip install pipenv \
&& python3 -m pipenv install --system --deploy \
&& pip install uwsgi==2.0.18
COPY . .
RUN SECRET_KEY=placeholder DATABASE_URL=sqlite:// python3 manage.py collectstatic --no-input --clear --verbosity 0
RUN apt-get purge -y \
gcc \
libc-dev \
libpq-dev
CMD ["uwsgi", "--ini", "docker/app/uwsgi.ini"]
|