-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 805 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (25 loc) · 805 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
33
34
FROM python:3.6.4
LABEL MAINTAINER="Collins Macharia <collins.macharia@andela.com>"
LABEL application="artbackend"
ARG SECRET_KEY='secret key'
ARG DJANGO_SETTINGS_MODULE='settings.prod'
ARG HOST_IP
# Prevent dpkg errors
ENV TERM=xterm-256color \
SECRET_KEY=${SECRET_KEY} \
DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
ENV HOST_IP=${HOST_IP}
WORKDIR /usr/src/app
COPY . .
RUN /usr/src/app/scripts/update_apt.sh
RUN pip install --upgrade pip
RUN pip install pipenv
RUN pipenv lock -r | grep -E '==|-i|-e' > requirements.txt
RUN pip install -r requirements.txt
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 8000
RUN python manage.py collectstatic --noinput
ENTRYPOINT ["gunicorn", "art.wsgi"]