Add a Dockerfile and instructions for running with Docker/Podman

This commit is contained in:
architect
2025-09-20 16:56:28 +02:00
parent 69bca511ca
commit 125d87fdae
2 changed files with 33 additions and 4 deletions

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM node:24-slim
WORKDIR /app
COPY bot.js ./
COPY package*.json ./
RUN npm install --omit=dev
CMD ["node", "bot.js"]

View File

@@ -31,6 +31,8 @@ What you gonna need:
- A server or machine to run the bot on.
## Installation
### Bare metal
1. Clone the repository:
```bash
@@ -48,16 +50,33 @@ npm install
Rename the `example.config.yaml` file to config.yaml and set it up to your liking.
## Config:
You can easaily enable or disable the logging of messeges or the raw IRC info for debuging by switching `debug: false` to `debug: true`, and the same with `logForward`
4. Start the bridge:
## How to run it:
Just run:
To start the bridge, just run
```
node bot.js
```
### With Docker/Podman
1. Configuration:
Copy the `example.config.yaml` file, rename it to config.yaml, and set it up to your liking.
2. Start the bridge
To start the bridge, run:
```
docker run -v "$(pwd)/config.yaml:/app/config.yaml:ro" foundry.fsky.io/purplebored/discord-userbot-to-irc:latest
```
The /app/config.yaml file in the container must be mounted to the filesystem.
## Config:
You can easaily enable or disable the logging of messeges or the raw IRC info for debuging by switching `debug: false` to `debug: true`, and the same with `logForward`
## Notes:
- Make sure your Discord selfbot token is kept private.