-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
45 lines (34 loc) · 951 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
43
44
45
FROM ubuntu:18.04
MAINTAINER FOR_EVERY_ONE
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
curl apt-utils apt-transport-https \
git \
python3.7 \
python3-dev \
python3-setuptools \
python3-pip \
nginx \
supervisor \
mysql-client \
libmysqlclient-dev \
unixodbc-dev \
sqlite3 \
locales && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install -U pip setuptools
RUN apt-get install python3-setuptools
ADD requirements/requirements.txt /project/
RUN pip3 install -r /project/requirements.txt
ADD . /project/
ARG SERVICE_ARG=development
ENV DJANGO_SETTINGS_MODULE=django_gunicorn.settings.$SERVICE_ARG
ENV SERVICE_ENV=$SERVICE_ARG
# setup all the configfiles
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx-app.conf /etc/nginx/sites-available/default
COPY supervisor-app-staging.conf /etc/supervisor/conf.d/
EXPOSE 80
EXPOSE 443
CMD ["supervisord", "-n"]