From 1ad75fc6d1d431066e574ddb76c687c54fd7edc6 Mon Sep 17 00:00:00 2001 From: Magi3r <33490559+Magi3r@users.noreply.github.com> Date: Sun, 16 Jul 2023 02:18:15 +0200 Subject: [PATCH 1/2] add docker info --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a859dbc..03ebcda 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,11 @@ There are a couple of ways on how to run `pin-bot`: npx ts-node ``` -A docker image is also planned. +There is also an [docker image](https://hub.docker.com/r/magi3r/pin-bot/tags). You can download it by running: +```bash +docker pull magi3r/pin-bot +``` + ## Usage You need to provide a discord bot token. You can get one from the [developer portal](https://discord.com/developers/applications) by creating a new application. You can either provide it as: - an environmental variable @@ -64,4 +68,13 @@ You also need to deploy the commands (although only once). This is done by runni ```bash node bot.js -u ``` -You still need to provide a token for this and the bot will start automatically after this. \ No newline at end of file +You still need to provide a token for this and the bot will start automatically after this. + +If you want to use one of the docker images, simply run: +```bash +docker run -d --name pin-bot --restart unless-stopped -e TOKEN= magi3r/pin-bot:latest +``` +If you prefer alpine, because of the slightly smaller image size, run: +```bash +docker run -d --name pin-bot --restart unless-stopped -e TOKEN= magi3r/pin-bot:alpine +``` From 81acf7f6b49160ff62095c569487fabb52931834 Mon Sep 17 00:00:00 2001 From: Magi3r <33490559+Magi3r@users.noreply.github.com> Date: Sun, 16 Jul 2023 02:30:22 +0200 Subject: [PATCH 2/2] move docker stuff from usage to installation --- README.md | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 03ebcda..19106b8 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,13 @@ There are a couple of ways on how to run `pin-bot`: npx ts-node ``` -There is also an [docker image](https://hub.docker.com/r/magi3r/pin-bot/tags). You can download it by running: +If you want to use the docker image, simply run: ```bash -docker pull magi3r/pin-bot +docker run -d --name pin-bot --restart unless-stopped -e TOKEN= magi3r/pin-bot:latest +``` +If you prefer alpine because of the slightly smaller image size, run: +```bash +docker run -d --name pin-bot --restart unless-stopped -e TOKEN= magi3r/pin-bot:alpine ``` ## Usage @@ -69,12 +73,3 @@ You also need to deploy the commands (although only once). This is done by runni node bot.js -u ``` You still need to provide a token for this and the bot will start automatically after this. - -If you want to use one of the docker images, simply run: -```bash -docker run -d --name pin-bot --restart unless-stopped -e TOKEN= magi3r/pin-bot:latest -``` -If you prefer alpine, because of the slightly smaller image size, run: -```bash -docker run -d --name pin-bot --restart unless-stopped -e TOKEN= magi3r/pin-bot:alpine -```