Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:lts

ENV KINDROID_INFER_URL="https://api.kindroid.ai/v1/discord-bot"

RUN mkdir -p /home/node/kindroid/src
WORKDIR /home/node/kindroid/

COPY package*.json .
RUN npm install

COPY . .
RUN chown -R node:node /home/node/kindroid/
USER node

CMD ["npm","start"]
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,55 @@ A Node.js service that manages multiple Discord bots, each tied to a unique Kind
npm start
```

# Docker version (production)

1. **Clone the repository**

```bash
git clone https://github.com/KindroidAI/Kindroid-discord.git
cd Kindroid-discord
```

2. **Build the image**

```bash
docker build -t kindroid-bot .
```

3. **Run the image with environment variables**

```bash
docker run -d -e KINDROID_API_KEY=your_kindroid_api_key_here -e SHARED_AI_CODE_1=your_shared_code_1_here -e BOT_TOKEN_1=your_discord_bot_token_1_here -e ENABLE_FILTER_1=false kindroid-bot:latest
```
If you have a .env file

```bash
docker run -d --env-file path_to_env_file kindroid-bot:latest
```

Or create a compose file

```bash
touch compose.yml
```

```yaml
services:
discord:
image: kindroid-bot
container_name: container_name
restart: always
environment:
KINDROID_API_KEY: your_kindroid_api_key_here
SHARED_AI_CODE_1: your_shared_code_1_here
BOT_TOKEN_1: your_discord_bot_token_1_here
ENABLE_FILTER_1: false
```

```bash
docker compose up
```

## Configuration

Use environment variables to configure your bots. The .env.example file shows usage:
Expand Down
10 changes: 10 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
discord:
image: kindroid-bot:latest
container_name: container_name
restart: on-failure:5
environment:
KINDROID_API_KEY: your_kindroid_api_key_here
SHARED_AI_CODE_1: your_shared_code_1_here
BOT_TOKEN_1: your_discord_bot_token_1_here
ENABLE_FILTER_1: false