forked from hltcoe/turkle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (24 loc) · 944 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
31
32
33
FROM centos:7
MAINTAINER Craig Harman <[email protected]>
LABEL Description="Image for running a Turkle interface"
RUN yum install epel-release -y && \
yum install crontabs git patch python36 python36-pip -y && \
yum clean all -y
WORKDIR /opt/turkle
COPY requirements.txt /opt/turkle/requirements.txt
RUN pip3.6 install --upgrade -r requirements.txt
RUN pip3.6 install gunicorn whitenoise
COPY turkle /opt/turkle/turkle
COPY manage.py /opt/turkle/manage.py
COPY scripts /opt/turkle/scripts
COPY turkle_site /opt/turkle/turkle_site
COPY docker-config/create_turkle_admin.sh /opt/turkle/create_turkle_admin.sh
COPY docker-config/turkle.crontab /etc/cron.d/turkle
RUN crontab /etc/cron.d/turkle
ENV TURKLE_DOCKER=1
RUN python3.6 manage.py collectstatic
RUN python3.6 manage.py migrate
RUN ./create_turkle_admin.sh
VOLUME /opt/turkle
EXPOSE 8080
CMD crond && gunicorn --env TURKLE_DOCKER=1 --bind 0.0.0.0:8080 turkle_site.wsgi