diff --git a/discord_bot/Dockerfile b/discord_bot/Dockerfile new file mode 100644 index 0000000..129c917 --- /dev/null +++ b/discord_bot/Dockerfile @@ -0,0 +1,5 @@ +FROM node:19-alpine +COPY . /app +WORKDIR /app +RUN npm install +CMD ["sh", "-c", "npm run start:bot"] \ No newline at end of file diff --git a/discord_bot/README.md b/discord_bot/README.md index 99a6bb1..1bd3d9f 100644 --- a/discord_bot/README.md +++ b/discord_bot/README.md @@ -38,3 +38,14 @@ Using Jarvis Discord Bot you can interact with Jarvis through Discord app on var - Copy and paste the previously obtained `Token` and `CLIENT ID` into the `.env.local` file. - run `npm install`. - run `npm run start:bot`. +### Running the bot in docker +``` +# build docker image +docker build -t jarvis-discord-bot . + +docker run -d --name jarvis-discord-bot \ +-e CLIENT_ID='Your Client ID' \ +-e BOT_TOKEN='Your Bot Token' \ +-e WEBSOCKET_PORT=10000 \ +jarvis-discord-bot:latest +``` \ No newline at end of file