-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
38 lines (28 loc) · 1.1 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
# DEPLOYMENT INSTRUCTIONS
# To build the image, refer:
# $ docker build -t docker_comp .
# To run using the container, refer the following command:
# $ docker run -it -d docker_comp
###########################################################
FROM ubuntu:trusty
MAINTAINER Archit Sharma <[email protected]>
# update and install deps
RUN apt-get update
RUN apt-get install -y python python-pip python-dev
RUN apt-get install -y nginx supervisor curl git
RUN pip install uwsgi Flask
# clone for github
# RUN git clone https://github.com/arcolife/dockerComp.git /opt/dockerComp/
# OR
# add from source
RUN mkdir -p /opt/dockerComp/app/ /opt/dockerComp/conf/ /var/dockerComp/
ADD ./src/client/app /opt/dockerComp/app/
ADD ./src/client/conf /opt/dockerComp/conf/
ADD ./src/client/scripts /opt/dockerComp/scripts/
# configure services
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
RUN rm /etc/nginx/sites-enabled/default
RUN ln -s /opt/dockerComp/conf/app_nginx.conf /etc/nginx/sites-enabled/
RUN ln -s /opt/dockerComp/conf/app_supervisor.conf /etc/supervisor/conf.d/
EXPOSE 80
CMD ["/usr/bin/supervisord", "-n"]