-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (33 loc) · 1011 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
# Stream_dl dockerfile
# github link: https://github.com/dh4rm4/stream_dl
# Base Image
FROM debian:stretch
ARG secret_key=BoidBOIDboid
# Softwares dependancies
RUN apt-get update && \
apt-get install nginx -yy \
python3-pip \
ffmpeg
# Set Flask Env Var
ENV FLASK_SECRET_KEY=$secret_key
ENV FLASK_APP=stream_dl.py
# Create Working Dir
RUN mkdir -p /webapps/stream_dl
# Add dependancies and install them
ADD requirements.txt /webapps/stream_dl/
WORKDIR /webapps/stream_dl
RUN pip3 install -r requirements.txt
WORKDIR /webapps/stream_dl/src
#Setup Nginx
ADD ./nginx/stream_dl /etc/nginx/sites-available/
RUN mkdir -p /webapps/log/stream_dl/
RUN touch /webapps/log/stream_dl/nginx-error.log
RUN ln -s /etc/nginx/sites-available/stream_dl /etc/nginx/sites-enabled/stream_dl && \
service nginx restart
# Add source code
ADD . /webapps/stream_dl/
# Manage outside acces
EXPOSE 3000
VOLUME /webapps/log/stream_dl/
# Launch the app
CMD gunicorn --bind 0.0.0.0:5000 stream_dl:app --timeout 3500