-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
21 lines (17 loc) · 658 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.6
ENV PYTHONUNBUFFERED 1
# Allows docker to cache installed dependencies between builds
# COPY ./Pipfile Pipfile
# COPY ./Pipfile.lock Pipfile.lock
# RUN pip install -U pipenv && pipenv install
COPY ./requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Adds our application code to the image
COPY . code
WORKDIR code
EXPOSE 8000
# Migrates the database, uploads staticfiles, and runs the production server
CMD chmod +x ./manage.py && \
./manage.py migrate && \
./manage.py collectstatic --noinput && \
newrelic-admin run-program gunicorn --bind 0.0.0.0:$PORT --access-logfile - exobrain_api.wsgi:application