From 125d87fdae8bdae53e0c6f0b7126cae10a008046 Mon Sep 17 00:00:00 2001 From: architect Date: Sat, 20 Sep 2025 16:56:28 +0200 Subject: [PATCH] Add a Dockerfile and instructions for running with Docker/Podman --- Dockerfile | 10 ++++++++++ README.md | 27 +++++++++++++++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..52e265b --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file diff --git a/README.md b/README.md index cb7c53a..083a7bc 100644 --- a/README.md +++ b/README.md @@ -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.