-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 loc) · 1.05 KB
/
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 python:2.7
ENV PYTHONUNBUFFERED 1
# Install tidy, python-dev, subversion, nginx
RUN apt-get update && apt-get install -y --no-install-recommends nginx tidy python-dev vim-tiny \
# subversion subversion-tools \
&& rm -rf /var/lib/apt/list/*
# RUN mkdir -p /data/svn/repos
# RUN svnadmin create /data/svn/repos
# RUN mkdir -p /opt/data/repos/BETAGO # Create Data Workdir
RUN mkdir -p /data/uploads # create placeholder for uploaded excel file. - may need remove steps
# install and set up nginx server
RUN mkdir /opt/resources
COPY ./nginx.conf /opt/resources/nginx.conf
RUN ln -sf /opt/resources/nginx.conf /etc/nginx/sites-enabled/default
# copy static files
COPY ./static /opt/static
# set up django and gunicorn
COPY ./requirements /opt/resources/requirements
RUN pip install -r /opt/resources/requirements
COPY ./src /opt/webapp
WORKDIR /opt/webapp
# django static files
RUN python manage.py collectstatic --noinput
COPY ./Docker-web-entrypoint.sh /opt/resources/Docker-web-entrypoint.sh
CMD ["/opt/resources/Docker-web-entrypoint.sh"]