forked from Staffjoy/suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 1.08 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
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONPATH $PYTHONPATH:/src/
# 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 python-mysqldb libmysqlclient-dev libffi-dev libssl-dev python-dev
RUN curl -sL https://deb.nodesource.com/setup | bash -
RUN sudo apt-get --yes --force-yes install nodejs
RUN apt-get install --yes --force-yes nginx supervisor
RUN pip install uwsgi
# 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"]