Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
README for deploying using docker
Browse files Browse the repository at this point in the history
  • Loading branch information
karyeet committed Jun 25, 2023
1 parent c3fad13 commit f68b357
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,60 @@ Mandarine was created as a personal Music Bot in lieu of Rythm Bot (RIP).
- [x] Spotify playlist support
- [x] Partial support for voice commands
- [x] Help command
- [x] Docker image

#### Planned Features:
- [ ] Docker image

- [ ] Deezer Playlist support
- [ ] Multi-threaded streaming
- [ ] Prefix command & other customizations
- [ ] Volume
- [ ] Preload next song for seamless playing
- [ ] Voice recognition for play command

## Deployment
## Docker Deployment (Preferred)
[Create a discord bot](https://discord.com/developers/applications)
then [add the bot to your server](https://help.pebblehost.com/en/article/how-to-invite-your-bot-to-a-discord-server-1asdlyg/).

In the discord developer dashboard, toggle on:
- PRESENCE INTENT
- SERVER MEMBERS INTENT
- MESSAGE CONTENT INTENT

Example docker-compose.yml:

```
version: "3"
services:
mandarine:
container_name: mandarine_music_bot
image: karyeet/mandarine:latest
volumes:
- ./config/config.json:/Mandarine/config.json:ro
- ./config/models/:/Mandarine/voice/models:ro
- ./mandarineFiles:/root/mandarineFiles
- ./playdlData:/.data
environment:
- "arl=5a2e"
- "runIndexer=True"
restart: unless-stopped
```

Create a folder and create your docker-compose.yml inside it.
In the same folder create a folder called config, within this folder paste your config.json. An example config can be found in the repository.
If you want to use the picovoice backed voice commands, paste your models within a folder called models within the config folder.

To use >music, you must provide your deezer arl token to the environment. Replace "5a2e" with your full arl token in the docker-compose.yml file.

To authorize play-dl with spotify or youtube, run this command while inside the same folder as your docker-compose.yml. Specify that you would like to save to file:

`
sudo docker run -it --rm -v "./playdlData:/.data" karyeet/mandarine:Dockerfile /bin/ash -c "node /Mandarine/Docker/authorize.js"
`


## Normal Deployment
Before anything, install [Node v16 LTS](https://nodejs.org/en/)
and [create a discord bot](https://discord.com/developers/applications)
then [add the bot to your server](https://help.pebblehost.com/en/article/how-to-invite-your-bot-to-a-discord-server-1asdlyg/).
Expand All @@ -51,6 +94,8 @@ then

To make use of the >music command, deemix must be installed via `python3 -m pip install deemix`

To support spotify links, play-dl must have spotify authorization. Check the wiki.

To automatically add local tagged mp3s to the localLibrary.json, add the files to the music folder (`$home$/mandarineFiles`) and run the indexer.js file found in `./music/indexer.js` using node.

### Check out the [wiki](https://github.com/karyeet/Mandarine/wiki) for commands and more help.

0 comments on commit f68b357

Please sign in to comment.