A discord bot, which informs users about new files of specific mods or Curseforge projects in general.
Creates a Container which runs ErdbeerbaerLP’s Curseforge-Bot, with lsiobase/alpine as the base image, as seen on https://github.com/ErdbeerbaerLP/Curseforge-Bot.
The lsiobase/alpine image is a custom base image built with Alpine linux and S6 overlay.
Using this image allows us to use the same user/group ids in the container as on the host, making file transfers much easier
Deployment
Tags | Description |
---|---|
latest | Using the latest tag will pull the latest image for amd64/x86_64 architecture. |
arm | Using the arm tag will pull the latest image for arm architecture. Use this if you intend on running the container on a Raspberry Pi 3B, for example. |
ijo42-latest | Using the ijo42-latest tag will pull the latest image for amd64/x86_64 architecture based on ijo42’s fork CurseForge2Discord |
Pre-built images latest
using docker-compose:
version: "2"
services:
curseforge-bot:
image: griefed/curseforge-bot:latest
container_name: curseforge-bot
restart: unless-stopped
environment:
- TZ=Europe/Berlin # Timezone
- ROLE_ID=000000000 # (Optional) The ID of the discord role mentioned when the bot makes a post
- PUID=1000 # User ID
- PROJECT_ID=430517 # The ID of your Curseforge project
- PGID=1000 # Group ID
- GITHUB_TOKEN # (Optional) Required if you want the cache of the bot to be synched to a github repository. Create an github access token with full
- GITHUB_REPO=CurseforgeBotCache # (Optional) If using GITHUB_TOKEN this will be the name of the repo where the bot will store the cache
- FILE_LINK=curse # direct-link to file or curseforge-link on project page or nolink.
- DISCORD_CHANNEL_ID=000000000 # The ID of the channel you want the bot to post in
- DISCORD_BOT_TOKEN=InsertHere # Your discord bot-token
- DESCRIPTION=New File(s) Detected For CurseForge Project(s) # This sets the text that appears as the message description in the update notification
- CHANGELOG_FORMAT=md # yml or md or css. Only choose one syntax. Can be very usefull if project owner/author uses discord MarkDown formatting in their changelog.
volumes:
- /host/path/to/config:/config # Where the bot-conf will be stored
Using CLI:
docker create \
--name=curseforge-bot \
-e TZ=Europe/Berlin `# Timezone` \
-e ROLE_ID=000000000 `# (Optional) The ID of the discord role mentioned when the bot makes a post` \
-e PUID=1000 `# User ID` \
-e PROJECT_ID=430517 `# The ID of your Curseforge project` \
-e PGID=1000 `# Group ID` \
-e GITHUB_TOKEN `# (Optional) Required if you want the cache of the bot to be synched to a github repository. Create an github access token with full ` \
-e GITHUB_REPO=CurseforgeBotCache `# (Optional) If using GITHUB_TOKEN this will be the name of the repo where the bot will store the cache` \
-e FILE_LINK=curse `# direct-link to file or curseforge-link on project page or nolink.` \
-e DISCORD_CHANNEL_ID=000000000 `# The ID of the channel you want the bot to post in` \
-e DISCORD_BOT_TOKEN=InsertHere `# Your discord bot-token` \
-e DESCRIPTION=New File(s) Detected For CurseForge Project(s) `# This sets the text that appears as the message description in the update notification` \
-e CHANGELOG_FORMAT=md `# yml or md or css. Only choose one syntax. Can be very usefull if project owner/author uses discord MarkDown formatting in their changelog.` \
-v /host/path/to/config:/config `# Where the bot-conf will be stored` \
--restart unless-stopped \
griefed/curseforge-bot:latest
Pre-built images ijo42-latest
using docker-compose:
version: "2"
services:
curseforge-bot:
image: griefed/curseforge-bot:ijo42-latest
container_name: curseforge-bot
restart: unless-stopped
environment:
- TZ=Europe/Berlin # Timezone
- ROLE_ID=000000000 # (Optional) The ID of the discord role mentioned when the bot makes a post
- PUID=1000 # User ID
- PROJECT_ID=430517 # The ID of your Curseforge project
- PGID=1000 # Group ID
- FILE_LINK=curse # direct-link to file or curseforge-link on project page or nolink.
- DISCORD_CHANNEL_ID=000000000 # The ID of the channel you want the bot to post in. Must be the Channel ID from your Webhook URL.
- WEBHOOK_TOKEN=InsertHere # Your discord-server webhook
- DESCRIPTION=New File(s) Detected For CurseForge Project(s) # This sets the text that appears as the message description in the update notification
- CHANGELOG_FORMAT=md # yml or md or css. Only choose one syntax. Can be very usefull if project owner/author uses discord MarkDown formatting in their changelog.
volumes:
- /host/path/to/config:/config # Where the bot-conf will be stored
Using CLI:
docker create \
--name=curseforge-bot \
-e TZ=Europe/Berlin `# Timezone` \
-e ROLE_ID=000000000 `# (Optional) The ID of the discord role mentioned when the bot makes a post` \
-e PUID=1000 `# User ID` \
-e PROJECT_ID=430517 `# The ID of your Curseforge project` \
-e PGID=1000 `# Group ID` \
-e FILE_LINK=curse `# direct-link to file or curseforge-link on project page or nolink.` \
-e DISCORD_CHANNEL_ID=000000000 `# The ID of the channel you want the bot to post in. Must be the Channel ID from your webhook URL.` \
-e WEBHOOK_TOKEN=InsertHere `# Your discord-server webhook` \
-e DESCRIPTION=New File(s) Detected For CurseForge Project(s) `# This sets the text that appears as the message description in the update notification` \
-e CHANGELOG_FORMAT=md `# yml or md or css. Only choose one syntax. Can be very usefull if project owner/author uses discord MarkDown formatting in their changelog.` \
-v /host/path/to/config:/config `# Where the bot-conf will be stored` \
--restart unless-stopped \
griefed/curseforge-bot:latest
Raspberry Pi
To run this container on a Raspberry Pi, use the arm
-tag. I’ve tested it on a Raspberry Pi 3B.
griefed/curseforge-bot:arm
Configuration
Configuration | Explanation |
---|---|
Restart policy | “no”, always, on-failure, unless-stopped |
config volume | Contains config files and logs. |
data volume | Contains your/the containers important data. |
TZ | Timezone |
PUID | for UserID |
PGID | for GroupID |
DISCORD_BOT_TOKEN | Your discord bot-token |
DISCORD_CHANNEL_ID | The ID of the channel you want the bot to post in. When using ijo42-latest this Channel ID must the be one from your webhook URL. |
PROJECT_ID | The ID of your Curseforge project |
ROLE_ID | (Optional) The ID of the discord role mentioned when the bot makes a post |
FILE_LINK | direct -link to file or curse forge-link on project page or nolink . |
DESCRIPTION | This sets the text that appears as the message description in the update notification |
CHANGELOG_FORMAT | yml or md or css . Only choose one syntax. Can be very usefull if project owner/author uses discord MarkDown formatting in their changelog. |
GITHUB_TOKEN | (Optional) Required if you want the cache of the bot to be synched to a github repository. Create an github access token with full “Repo” access (https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) |
GITHUB_REPO | (Optional) If using GITHUB_TOKEN this will be the name of the repo where the bot will store the cache |
WEBHOOK_TOKEN | Your discord-server webhook when using ijo42-latest |
More information at the Curseforge-Bot wiki.
Adding more projects to track for latest
and arm
If you have multiple projects in Curseforge which you want to track with this bot, you need to manually edit the bot.conf file which is created after container creation. Here’s an example for multiple project IDs and how it’s formatted:
ids = [
"430517",
"438915",
"378473",
"378719"
]
Every new project ID need to be in “” followed by a ,
if an additional ID follows. Last ID must not have a ,
at the end.
Adding more projects to track for ijo42-latest
If you have multiple projects in Curseforge which you want to track with this bot, you need to manually edit the bot.conf file which is created after container creation. Here’s an example for multiple project IDs and how it’s formatted:
ids = [
"430517;;DISCORD_CHANNEL_ID;;WEBHOOK_TOKEN",
"239197;;DISCORD_CHANNEL_ID;;WEBHOOK_TOKEN",
"243121;;DISCORD_CHANNEL_ID;;WEBHOOK_TOKEN"
]
User / Group Identifiers
When using volumes, permissions issues can arise between the host OS and the container. Linuxserver.io avoids this issue by allowing you to specify the user PUID
and group PGID
.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance PUID=1000
and PGID=1000
, to find yours use id user
as below:
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
Building the image yourself
Use the Dockerfile to build the image yourself, in case you want to make any changes to it
docker-compose.yml:
version: '2'
services:
curseforge-bot:
container_name: curseforge-bot
build: ./docker-Curseforge-Bot
restart: unless-stopped
volumes:
- ./path/to/config:/config
environment:
- TZ=Europe/Berlin
- PUID=1000 # User ID
- PGID=1000 # Group ID
- DISCORD_BOT_TOKEN=
- DISCORD_CHANNEL_ID=
- PROJECT_ID=
- ROLE_ID=
- FILE_LINK=
- DESCRIPTION=
- CHANGELOG_FORMAT=
- GITHUB_TOKEN=
- GITHUB_REPO=
- Clone the repository:
git clone https://github.com/Griefed/docker-Curseforge-Bot.git ./docker-Curseforge-Bot
- Prepare docker-compose.yml file as seen above
docker-compose up -d --build curseforge-bot
- ???
- Profit!
Building the image yourself based on ijo42’s fork
Use the Dockerfile to build the image yourself, in case you want to make any changes to it
docker-compose.yml:
version: '2'
services:
curseforge-bot:
container_name: curseforge-bot
build: ./docker-Curseforge-Bot
restart: unless-stopped
volumes:
- ./path/to/config:/config
environment:
- TZ=Europe/Berlin # Timezone
- ROLE_ID=000000000
- PUID=1000 # User ID
- PROJECT_ID=
- PGID=1000 # Group ID
- FILE_LINK=
- DISCORD_CHANNEL_ID=
- WEBHOOK_TOKEN=
- DESCRIPTION=
- CHANGELOG_FORMAT=
- Clone the repository:
git clone -b ijo42 https://github.com/Griefed/docker-Curseforge-Bot.git ./docker-Curseforge-Bot
- Prepare docker-compose.yml file as seen above
docker-compose up -d --build curseforge-bot
- ???
- Profit!