-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (29 loc) · 869 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
34
35
36
37
38
39
40
FROM python:3
RUN apt-get -y update \
&& apt-get -y upgrade \
&& apt-get -y --force-yes install nano less npm \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN npm cache clean -f \
&& npm install -g n \
&& n stable \
&& npm install npm -g \
&& npm cache clean
RUN mkdir /app
WORKDIR /app
RUN npm -g install bower gulp \
&& npm cache clean
COPY package.json /app/
RUN npm install \
&& npm cache clean
COPY bower.json /app/
RUN bower install --allow-root
COPY requirements.txt /app/
RUN pip install -r requirements.txt
COPY . /app/
RUN cp /app/project/project/localsettings.py.prod /app/project/project/localsettings.py
RUN mkdir /app/staticfiles
RUN gulp build-js-production
RUN python project/manage.py collectstatic --noinput
EXPOSE 8000
CMD ["bash", "-c", "python project/manage.py migrate && uwsgi --ini /app/uwsgi.ini"]