-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
44 lines (31 loc) · 843 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
FROM ubuntu:16.04
MAINTAINER Janis Lesinskis
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt-get update -y && apt-get -y install \
python3-pip \
ffmpeg \
sox \
git \
nginx \
supervisor
# -- Install uWSGI and pipenv
RUN pip3 install uwsgi
RUN pip3 install pipenv
# -- Adding Pipfiles
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
# -- Install dependencies:
RUN pipenv install --deploy --system
# -- Install Application into container:
RUN mkdir /app
WORKDIR /app
# -- Set up configuration files
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx-app.conf /etc/nginx/sites-available/default
COPY supervisor-app.conf /etc/supervisor/conf.d/
COPY . /app
# -- Create supervisor log directory
RUN mkdir -p /var/log/supervisord/
EXPOSE 8080
CMD [ "supervisord", "-c", "/etc/supervisor/conf.d/supervisor-app.conf", "-n" ]