2021-09-24 19:13:12 +00:00
|
|
|
# musicube
|
|
|
|
|
|
|
|
### Development
|
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ python --version
|
|
|
|
3.9.7
|
|
|
|
```
|
|
|
|
|
|
|
|
Configure virtual environment:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ python -m venv venv
|
|
|
|
$ source venv/bin/activate
|
|
|
|
```
|
|
|
|
|
|
|
|
Install requirements:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ pip install -r requirements.txt
|
2023-01-27 21:50:45 +00:00
|
|
|
$ pacman -S ffmpeg
|
2021-09-24 19:13:12 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Configure ENV:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ cp .env.template .env
|
|
|
|
# Write BOT_TOKEN into .env
|
|
|
|
```
|
|
|
|
|
|
|
|
Run bot:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ python src/bot.py
|
|
|
|
```
|
2021-09-25 20:46:45 +00:00
|
|
|
|
|
|
|
### Deployment
|
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ docker --version
|
|
|
|
Docker version 20.10.8, build 3967b7d28e
|
2021-09-25 21:28:04 +00:00
|
|
|
$ make --version
|
|
|
|
GNU Make 4.3
|
|
|
|
Built for x86_64-pc-linux-gnu
|
|
|
|
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
|
|
|
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
|
|
There is NO WARRANTY, to the extent permitted by law.
|
2021-09-25 20:46:45 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Build image:
|
|
|
|
|
|
|
|
```
|
2023-01-27 21:50:45 +00:00
|
|
|
$ cp .env docker.env
|
2021-09-25 20:46:45 +00:00
|
|
|
$ make build
|
|
|
|
```
|
2021-09-25 21:01:16 +00:00
|
|
|
|
|
|
|
Run image:
|
|
|
|
|
|
|
|
```
|
2023-01-27 21:51:06 +00:00
|
|
|
$ make run
|
2021-09-25 21:01:16 +00:00
|
|
|
```
|