forked from creadr/creadr-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (28 loc) · 959 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
36
37
38
FROM ubuntu:16.04
# no tty
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update --fix-missing
RUN apt-get install -y python python-pip python-virtualenv nginx supervisor
#RUN apt-get install -y python-dev libffi-dev libssl-dev
RUN mkdir -p deploy
WORKDIR deploy
COPY creadr creadr
COPY test test
COPY requirements.txt ./
COPY manage.py ./
RUN pip install --upgrade pip
#RUN pip install --upgrade pyopenssl ndg-httpsclient pyasn1
RUN pip install -r ./requirements.txt
# Setup nginx
RUN rm /etc/nginx/sites-enabled/default
COPY conf/flask.conf /etc/nginx/sites-available/
RUN ln -s /etc/nginx/sites-available/flask.conf /etc/nginx/sites-enabled/flask.conf
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
# Setup supervisord
RUN mkdir -p /var/log/supervisor
COPY conf/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY conf/gunicorn.conf /etc/supervisor/conf.d/gunicorn.conf
# expose port(s)
EXPOSE 80
# Start processes
CMD ["supervisord"]