-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from RetroArcher/nightly
v0.0.4
- Loading branch information
Showing
5 changed files
with
161 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Docker | ||
|
||
## Using docker run | ||
Create and run the container (substitute your `<values>`): | ||
|
||
```bash | ||
docker run -d \ | ||
--name=retroarcher-discord-bot \ | ||
--restart=unless-stopped \ | ||
-e BOT_TOKEN=<BOT_TOKEN> \ | ||
-e DAILY_CHANNEL_ID=<DAILY_CHANNEL_ID> \ | ||
-e DAILY_RELEASES=<DAILY_RELEASES> \ | ||
-e DAILY_TASKS=<DAILY_TASKS> \ | ||
-e DAILY_TASKS_UTC_HOUR=<DAILY_TASKS_UTC_HOUR> \ | ||
-e GRAVATAR_EMAIL=<GRAVATAR_EMAIL> \ | ||
-e IGDB_CLIENT_ID=<IGDB_CLIENT_ID> \ | ||
-e IGDB_CLIENT_SECRET=<IGDB_CLIENT_SECRET> \ | ||
retroarcher/discord-bot | ||
``` | ||
|
||
To update the container it must be removed and recreated: | ||
|
||
```bash | ||
# Stop the container | ||
docker stop retroarcher-discord-bot | ||
# Remove the container | ||
docker rm retroarcher-discord-bot | ||
# Pull the latest update | ||
docker pull retroarcher/discord-bot | ||
# Run the container with the same parameters as before | ||
docker run -d ... | ||
``` | ||
|
||
## Using docker-compose | ||
|
||
Create a `docker-compose.yml` file with the following contents (substitute your `<values>`): | ||
|
||
```yaml | ||
version: '3' | ||
services: | ||
retroarcher-discord-bot: | ||
image: retroarcher/discord-bot | ||
container_name: retroarcher-discord-bot | ||
restart: unless-stopped | ||
environment: | ||
- BOT_TOKEN=<BOT_TOKEN> | ||
- DAILY_CHANNEL_ID=<DAILY_CHANNEL_ID> | ||
- DAILY_RELEASES=<DAILY_RELEASES> | ||
- DAILY_TASKS=<DAILY_TASKS> | ||
- DAILY_TASKS_UTC_HOUR=<DAILY_TASKS_UTC_HOUR> | ||
- GRAVATAR_EMAIL=<GRAVATAR_EMAIL> | ||
- IGDB_CLIENT_ID=<IGDB_CLIENT_ID> | ||
- IGDB_CLIENT_SECRET=<IGDB_CLIENT_SECRET> | ||
``` | ||
Create and start the container (run the command from the same folder as your `docker-compose.yml` file): | ||
|
||
```bash | ||
docker-compose up -d | ||
``` | ||
|
||
To update the container: | ||
```bash | ||
# Pull the latest update | ||
docker-compose pull | ||
# Update and restart the container | ||
docker-compose up -d | ||
``` | ||
|
||
## Parameters | ||
You must substitute the `<values>` with your own settings. | ||
|
||
| Parameter | Required | Default | Description | | ||
| -------------------- | -------- | ------- | ------------------------------------------------------------- | | ||
| BOT_TOKEN | True | None | Token from Bot page on discord developer portal. | | ||
| DAILY_TASKS | False | true | Daily tasks on or off. | | ||
| DAILY_RELEASES | False | true | Send a message for each game released on this day in history. | | ||
| DAILY_CHANNEL_ID | False | None | Required if daily_tasks is enabled. | | ||
| DAILY_TASKS_UTC_HOUR | False | 12 | The hour to run daily tasks. | | ||
| GRAVATAR_EMAIL | False | None | Gravatar email address for bot avatar. | | ||
| IGDB_CLIENT_ID | False | None | Required if daily_releases is enabled. | | ||
| IGDB_CLIENT_SECRET | False | None | Required if daily_releases is enabled. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Flask==2.0.2 | ||
Flask==2.1.1 | ||
igdb-api-v4==0.0.5 | ||
libgravatar==1.0.0 | ||
py-cord==2.0.0b3 | ||
python-dotenv==0.19.2 | ||
python-dotenv==0.20.0 | ||
requests==2.27.1 |