diff --git a/.gitignore b/.gitignore index dbe309b..4801fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ venv __pycache__ .env +docker.env .coverage *cookies.txt \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b6afcfd --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +GIT_COMMIT != git log --pretty=format:'%h' -n 1 + +build: + source <(cat docker.env | sed -e 's/^/export /g') + docker build \ + --build-arg DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN} \ + --build-arg YOUTUBE_COOKIES=${YOUTUBE_COOKIES} \ + --build-arg GIT_COMMIT=${GIT_COMMIT} \ + -t musicube:${GIT_COMMIT} -t musicube:latest \ + . diff --git a/README.md b/README.md index 045355f..e4b59f9 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,18 @@ Run bot: ``` $ python src/bot.py ``` + +### Deployment + +Requirements: + +``` +$ docker --version +Docker version 20.10.8, build 3967b7d28e +``` + +Build image: + +``` +$ make build +```