forked from jpf/requestbin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (42 loc) · 1.06 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
FROM ubuntu:14.04
RUN DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing && apt-get install -y \
build-essential \
git \
python \
python-dev \
python-setuptools \
nginx \
supervisor \
bcrypt \
libevent-dev \
libssl-dev \
libffi-dev \
libpq-dev \
vim \
rsyslog \
wget \
libjpeg-dev \
libpng-dev
RUN easy_install pip
# stop supervisor service as we'll run it manually
RUN service supervisor stop
RUN mkdir /var/log/gunicorn && mkdir /var/log/deploys
RUN rm /etc/nginx/nginx.conf
RUN rm /etc/nginx/sites-enabled/default
RUN mkdir /opt/code
# Add service.conf
COPY ./nginx.conf /opt/code/
RUN ln -s /opt/code/nginx.conf /etc/nginx/nginx.conf
# Add supervisor
COPY ./supervisord.conf /opt/code/
RUN ln -s /opt/code/supervisord.conf /etc/supervisor/conf.d/
# Add requirements and install
COPY ./requirements.txt /opt/code/
RUN pip install -r /opt/code/requirements.txt
# Add github repo code to code file
COPY . /opt/code/
WORKDIR /opt/code
# expose port(s)
EXPOSE 80
EXPOSE 8000
CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf