forked from Staffjoy/suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 1.02 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
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONPATH $PYTHONPATH:/src/
# setup tools
RUN apt-get update -y
RUN apt-get install -y build-essential python python-setuptools curl python-pip libssl-dev
RUN apt-get update -y
RUN apt-get install -y python-software-properties python-mysqldb libmysqlclient-dev libffi-dev libssl-dev python-dev
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get -y install nodejs
RUN apt-get install -y nginx supervisor
RUN pip install --upgrade pip
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"]