-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (29 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
37 lines (29 loc) · 1.09 KB
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
# using the latest Python image
FROM python:slim
# any working directory can be chosen as per choice like '/' or '/home' etc
WORKDIR /
# to COPY the remote file at working directory in container
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN pip install gunicorn pymysql cryptography
COPY webapp webapp
COPY migrations migrations
COPY musicservice.py config.py boot.sh ./
#COPY example-music ./music
#COPY main.py ./
RUN chmod a+x boot.sh
ENV FLASK_APP musicservice.py
# update the enviroment
RUN apt-get update
# install ffmpeg, this is needed for .m4a/.mp4 to mp3 conversion
RUN apt-get install ffmpeg -y
# configure default environment variabels
# Python buffers it log output, this created a delayed output on the console
# to mitigate slow log ouput of the application, disable the buffer with:
ENV PYTHONUNBUFFERED=1
# by default the script will use 5, which means that the script will rerun every 5 minutes
# users can overrule the default by simply providing their own INTERVAL variable
ENV INTERVAL=5
# let's dance: "In 5, 6, 7, 8!"
EXPOSE 5678
ENTRYPOINT ["./boot.sh"]