From 4f4e693df1a034ac14716c7956401408c922856d Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 25 Sep 2021 22:08:42 +0200 Subject: [PATCH] Create Dockerfile --- .dockerignore | 4 ++++ .env.template | 2 +- Dockerfile | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 Dockerfile 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"]