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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ API_ENDPOINT=default
MODEL=gpt-3.5-turbo
DEBUG=false
UWU=true
SYSTEM_MESSAGE=`You're ChatGPT Discord Bot. Answer as concisely as possible for each response.`
SYSTEM_MESSAGE=`You're ChatGPT Discord Bot. Answer as concisely as possible for each response.`
17 changes: 14 additions & 3 deletions Dockerfile
100644 → 100755

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be added / changed:

  • ENV PORT=$PORT
  • EXPOSE $PORT

Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@ FROM node:20-alpine

WORKDIR /app

COPY package*.json ./
COPY package*.json .

RUN npm install

COPY . .
COPY index.js .

ENV PORT=7860
ENV DISCORD_CLIENT_ID=$DISCORD_CLIENT_ID
ENV DISCORD_BOT_TOKEN=$DISCORD_BOT_TOKEN
ENV DIRECT_MESSAGES=$DIRECT_MESSAGES
ENV DM_WHITELIST_ID=$DM_WHITELIST_ID
ENV OPENAI_API_KEY=$OPENAI_API_KEY
ENV HTTP_SERVER=$HTTP_SERVER
ENV DISCORD_MAX_RESPONSE_LENGTH=$DISCORD_MAX_RESPONSE_LENGTH
ENV API_ENDPOINT=$API_ENDPOINT
ENV MODEL=$MODEL
ENV DEBUG=$DEBUG
ENV UWU=$UWU
ENV SYSTEM_MESSAGE=$SYSTEM_MESSAGE

EXPOSE 7860

Expand Down
13 changes: 11 additions & 2 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ cd ChatGPT-Discord-BOT
- `OPENAI_API_KEY` - Get OpenAI API Key from [here](https://platform.openai.com/account/api-keys).

- `HTTP_SERVER` - HTTP Server (Optional). Values: `true` or `false`
- `PORT` - Port for HTTP Server. Default: `7860`. If you change the port, make sure to change it in the [Dockerfile](https://github.com/itskdhere/ChatGPT-Discord-BOT/blob/main/Dockerfile) as well.
- `PORT` - Port for HTTP Server. Default: `7860`.

#### **• Advanced Settings:**

Expand Down Expand Up @@ -173,7 +173,16 @@ cd ChatGPT-Discord-BOT
docker build -t itskdhere/chatgpt:3.2.4 .
```
```bash
docker run -d -p 7860:7860 --name chatgpt itskdhere/chatgpt:3.2.4
docker run -d -p 7860:7860 --env-file .env -v ./firebaseServiceAccountKey.json:/app/firebaseServiceAccountKey.json --name chatgpt itskdhere/chatgpt:3.2.4
```

#### **🐳 Using Docker Compose:**

```bash
docker compose build

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker compose build is not needed.

```
```bash
docker compose up -d
```

#### **🟢 Without Docker:**
Expand Down
13 changes: 13 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
version: "3.5"
services:
chatgpt:
build: .
container_name: chatgpt
restart: unless-stopped
env_file:
- .env
volumes:
- ./firebaseServiceAccountKey.json:/app/firebaseServiceAccountKey.json
ports:
- 7860:7860