-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·28 lines (23 loc) · 819 Bytes
/
Dockerfile
File metadata and controls
executable file
·28 lines (23 loc) · 819 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
FROM python:3.6.8-slim-stretch
MAINTAINER Ankur Agarwal <ankur140290@gmail.com>
#Install nginx, curl, mysqlclient, pip, wheel, uwsgi
RUN apt-get update \
&& apt-get install -y nginx curl vim build-essential default-libmysqlclient-dev \
&& python -m pip install pip --upgrade \
&& python -m pip install wheel \
&& pip install requests uwsgi circus
#Set Working Dir
WORKDIR /var/www/src/
#Copy Code
COPY . .
RUN mkdir /var/log/django \
&& mkdir /var/log/uwsgi \
&& touch /var/log/django/debug.log \
&& touch /var/log/uwsgi/uwsgi.log \
&& cp docker_configs/default /etc/nginx/sites-available/
#Install Requirement.txt
RUN pip install -r requirements.txt
RUN python manage.py migrate
EXPOSE 80
# Start nginx & uwsgi on startup
CMD ["/usr/local/bin/circusd","docker_configs/circus.conf"]