-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile
36 lines (26 loc) · 979 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
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
# Environment Variables
ENV PYTHONPATH "/src"
ENV ENV test
# setup tools
RUN apt-get update --yes --force-yes
RUN apt-get install --yes --force-yes build-essential python python-setuptools curl python-pip libssl-dev
RUN apt-get update --yes --force-yes
RUN apt-get install --yes --force-yes python-software-properties libffi-dev libssl-dev python-dev
RUN apt-get install --yes --force-yes nginx supervisor memcached
# Add and install Python modules
ADD requirements.txt /src/requirements.txt
RUN cd /src; pip install -r requirements.txt
# Bundle app source
ADD . /src
# configuration
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN rm /etc/nginx/sites-enabled/default
RUN ln -s /src/conf/nginx-app.conf /etc/nginx/sites-enabled/
RUN ln -s /src/conf/supervisor-app.conf /etc/supervisor/conf.d/
RUN cd /src/ && make build
# Expose - note that load balancer terminates SSL
EXPOSE 80
# RUN
CMD ["supervisord", "-n"]