-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 724 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 724 Bytes
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
FROM python:3.5.1
MAINTAINER joway wong "joway.w@gmail.com"
# Install packages
RUN apt-get update && apt-get install -y \
git \
libmysqlclient-dev \
mysql-client \
nginx \
python-dev \
supervisor
RUN mkdir /code
WORKDIR /code
# for cache
# Configure Nginx and uwsgi
ADD ./requirements.txt /code/requirements.txt
RUN rm /etc/nginx/sites-enabled/default
ADD ./.deploy/nginx.conf /etc/nginx/sites-enabled/nginx.conf
ADD ./.deploy/supervisord.conf /etc/supervisor/conf.d/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install uwsgi
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
ADD . /code
RUN chmod +x /code/**/*.sh
EXPOSE 80
EXPOSE 8000
CMD ["sh","./endpoint.sh"]