-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
39 lines (28 loc) · 1001 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
FROM ubuntu:14.04
MAINTAINER Dockerfiles
# Install required packages and remove the apt packages cache when done.
RUN apt-get update && apt-get install -y \
git \
python \
python-dev \
python-setuptools \
nginx \
supervisor \
sqlite3 \
&& rm -rf /var/lib/apt/lists/*
RUN easy_install pip
# install uwsgi now because it takes a little while
RUN pip install uwsgi
# setup all the configfiles
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx-app.conf /etc/nginx/sites-available/default
COPY supervisor-app.conf /etc/supervisor/conf.d/
# COPY requirements.txt and RUN pip install BEFORE adding the rest of your code, this will cause Docker's caching mechanism
# to prevent re-installinig (all your) dependencies when you made a change a line or two in your app.
COPY requirements.txt /home/docker/code/
RUN pip install -r /home/docker/code/requirements.txt
# add (the rest of) our code
COPY . /home/docker/code/
VOLUME /var/log/supervisor/
EXPOSE 80
CMD ["supervisord", "-n"]