forked from ospc-org/ospc.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 745 Bytes
/
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
FROM heroku/miniconda:3
# Grab requirements.txt.
ADD ./requirements.txt /requirements.txt
ADD ./conda-requirements.txt /conda-requirements.txt
# python version
RUN python --version
# Install dependencies
RUN conda update conda
RUN conda install -c ospc -c anaconda --file conda-requirements.txt --yes
RUN pip install -qr requirements.txt
# Add our code
ADD ./webapp /opt/webapp/
WORKDIR /opt
ADD ./templates /opt/templates/
ADD ./manage.py /opt/
ADD ./static /opt/static/
RUN python manage.py collectstatic --noinput
# create NewRelic file
ARG NEW_RELIC_TOKEN
RUN newrelic-admin generate-config $NEW_RELIC_TOKEN newrelic.ini
ENV NEW_RELIC_CONFIG_FILE=newrelic.ini
CMD newrelic-admin run-program gunicorn --bind 0.0.0.0:$PORT webapp.wsgi