-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
58 lines (45 loc) · 1.33 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM ubuntu:16.04
WORKDIR /opt/app/
RUN apt-get update && apt-get install -y \
python \
build-essential \
python-pip \
libpq-dev \
libffi-dev \
npm \
wget \
curl \
vim \
git \
supervisor \
nginx-full \
pdftk \
texlive \
texlive-xetex \
texlive-luatex \
redis-server
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y nodejs
COPY package.json /opt/package.json
RUN npm install
COPY .bowerrc /opt/app/.bowerrc
COPY bower.json /opt/app/bower.json
RUN /opt/node_modules/bower/bin/bower install --allow-root
COPY req.txt /opt/req.txt
RUN pip install -r /opt/req.txt
RUN groupadd -r schedule_group && useradd -r -g schedule_group schedule_user
RUN chown schedule_user /opt/app
RUN ln -s /etc/nginx/uwsgi_params /etc/nginx/sites-enabled/
RUN mkdir /opt/static/futuschedule/css
COPY schedulesite/futuschedule/static/futuschedule/css/style.css /opt/static/futuschedule/css/style.css
COPY pdf-generator/fonts/* /usr/share/fonts/
RUN mkdir /opt/download
ENV DJANGO_SETTINGS_MODULE schedulesite.settings
ENV UWSGI_PARAMS ""
ENV CELERY_LOG_LEVEL DEBUG
ENV PYTHONPATH /opt/app/:/opt/app/schedulesite/
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY docker/supervisord.conf /etc/supervisor/supervisord.conf
COPY . /opt/app/
EXPOSE 8000
CMD ["bash", "docker/start.sh"]