-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (31 loc) · 808 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
39
40
41
42
From ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
git \
vim \
python3 \
python3-pip \
nginx \
supervisor \
mysql-server \
mysql-client \
libmysqld-dev \
pwgen && rm -rf /var/lib/apt/lists/*
RUN pip3 install uwsgi django
# nginx config
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx-site.conf /etc/nginx/sites-available/default
# supervisor config
COPY supervisor.conf /etc/supervisor/conf.d/
# mysql config
COPY my.cnf /etc/mysql/
# uWSGI config
COPY uwsgi.ini /home/django/
COPY uwsgi_params /home/django/
# Model_example content
COPY admin.py /home/django/
COPY models.py /home/django/
# Copy initialization scripts
COPY start.sh /home/django/
EXPOSE 80
CMD ["/bin/bash", "/home/django/start.sh"]