provide docker-compose
This commit is contained in:
parent
a31c1018c7
commit
691a34377c
2 changed files with 13 additions and 19 deletions
24
README.md
24
README.md
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
Radio Bot based on codecat/reddit-radio
|
Radio Bot based on codecat/reddit-radio
|
||||||
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Live radio re-streaming to voice channels (using multiple bot users), automatically turned on/off when someone joins/leaves the bound channel.
|
* Live radio re-streaming to voice channels (using multiple bot users), automatically turned on/off when someone joins/leaves the bound channel.
|
||||||
|
@ -17,28 +18,13 @@ A module is a class in the `modules` folder. It accepts the following methods:
|
||||||
* `onMessage(msg)` is called whenever a message is sent in any channel. Return `false` if the message can pass through to other commands and handlers, or `true` to stop that from happening.
|
* `onMessage(msg)` is called whenever a message is sent in any channel. Return `false` if the message can pass through to other commands and handlers, or `true` to stop that from happening.
|
||||||
|
|
||||||
|
|
||||||
## (Optional) How to run using Docker
|
## Running using Docker from the repo
|
||||||
You can use Docker and a mounted volume to easily run Reddit Radio.
|
|
||||||
|
|
||||||
The Reddit Radio Docker image is publically available on Docker Hub and can be found [here](https://hub.docker.com/r/codecatt/reddit-radio) and are automatically built each time a change is made to the master branch.
|
|
||||||
|
|
||||||
### How to run using built image
|
|
||||||
1. Create a folder where you'd like to run the docker image
|
|
||||||
2. Create a folder called `config` or similiar to keep your configuration in
|
|
||||||
3. Make a copy of `config.example.toml` called `config.toml` and place it in your `config` folder
|
|
||||||
4. Edit the config file
|
|
||||||
5. Run the following command `docker run -d --name reddit-radio -v $(pwd)/config:/app/config codecatt/reddit-radio:latest`
|
|
||||||
|
|
||||||
### Running using Docker from the repo
|
|
||||||
1. Clone this repo
|
1. Clone this repo
|
||||||
`git clone https://github.com/codecat/reddit-radio.git`
|
`git clone https://github.com/codecat/reddit-radio.git`
|
||||||
2. Build the Docker image
|
2. Install dependancies `sudo apt install docker-compose`
|
||||||
`docker build . -t reddit-radio`
|
|
||||||
3. Create a folder called `config` or similiar to keep your configuration in
|
3. Create a folder called `config` or similiar to keep your configuration in
|
||||||
4. Make a copy of `config.example.toml` called `config.toml` and place it in your `config` folder
|
4. Make a copy of `config.example.toml` called `config.toml` and place it in your `config` folder
|
||||||
5. Edit the config file
|
5. Edit the config file
|
||||||
6. Run the following command
|
6. Build and execute using docker-compose: `docker-compose up -d --build --remove-orphans`
|
||||||
`docker run -d --name reddit-radio -v $(pwd)/config:/app/config reddit-radio`
|
7. Monitor execution with `docker-compose logs --follow --tail 100`
|
||||||
|
|
||||||
Note: For development you could map your whole code directory as follows:
|
|
||||||
`docker run -d --name reddit-radio -v $(pwd):/app reddit-radio`
|
|
||||||
|
|
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
radiobot:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
restart: always
|
Loading…
Reference in a new issue