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.