diff --git a/.gitignore b/.gitignore index c764a0e..f71925a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ config.json -node_modules \ No newline at end of file +node_modules +package-lock.json \ No newline at end of file diff --git a/README.md b/README.md index d9c8229..1aa8b1e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,18 @@ You need to have [Node.js](https://nodejs.org/en/) and [pnpm](https://pnpm.io/) 4. Fill in the required fields in the `.config.json` file (see [Settings](#settings)) 5. Start the bot with `pnpm start` +### Run with Docker + +You can also run the bot with Docker. You need to have [Docker](https://www.docker.com/) installed. + +1. Clone the repository +2. Copy the `config.example.json` file and rename it to `.config.json` +3. Fill in the required fields in the `.config.json` file (see [Settings](#settings)) +4. Run the following command to start the bot: `docker compose up -d.` +5. To stop the bot, run the following command: `docker compose down` + +You can set the published ports in the `docker-compose.yml` file. + ## Settings These are the settings that need to be filled in the `config.json` file: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..23a6795 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + verification-bot: + image: node:latest + working_dir: /app + volumes: + - .:/app + ports: + - "8080:8080" + command: bash -c "npm install && npm run start" \ No newline at end of file