diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..fbebab9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +** +!src/ +!*cookies.txt +!requirements.txt \ No newline at end of file diff --git a/.env.template b/.env.template index 7ab5466..6613d8c 100644 --- a/.env.template +++ b/.env.template @@ -1,2 +1,2 @@ DISCORD_BOT_TOKEN= -YOUTUBE_COOKIES= \ No newline at end of file +YOUTUBE_COOKIES=youtube.com_cookies.txt \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5ea1ea1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.9-slim-buster + +WORKDIR /musicube +COPY . . + +RUN apt-get -y update +RUN apt-get install -y ffmpeg + +RUN pip install -r requirements.txt + + +ARG GIT_COMMIT=unset +ARG DISCORD_BOT_TOKEN=unset +ARG YOUTUBE_COOKIES=youtube.com_cookies.txt +ENV DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN} YOUTUBE_COOKIES=${YOUTUBE_COOKIES} GIT_COMMIT=${GIT_COMMIT} + +CMD ["python", "src/bot.py"]