ChatGPTNextWeb / ChatGPTNextWeb/NextChat

BASE_URL and CODE environment variables have no effect with Docker Compose

Open
#3,709 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
88.8k
Forks
59.1k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I have this setup at abc.com, and a LocalAI instance setup at xyz.com. I have the following docker compose file:

```
version: '3.6'

services:
api:
image: yidadaa/chatgpt-next-web
environment:
OPENAI_API_KEY: asdf1234
CODE: asdf1234
BASE_URL: https://xyz.com
CUSTOM_MODELS: -all,+mixtral
ports:
- 3000:3000
```

The CUSTOM_MODELS variable seems to work. In the app settings, "mixtral" is the only option in the dropdown, and it is selected by default.

The CODE variable does not seem to do anything. When I click the "auth" link to enter a password, I can type anything and it works. I can even ignore the "auth" message and just start entering prompts.

When I try entering a prompt, the request always goes to https://abc.com/v1/chat/completions, regardless of what I set in the BASE_URL variable. It should be going to https://xyz.com/v1/chat/completions

**To Reproduce**
1. Set custom environment variables in docker-compose.yml
2. `docker compose up -d`
3. Try using the app

**Expected behavior**
The CODE environment variable should require the correct password. Requests should go to the domain set in the BASE_URL variable.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Deployment**
- [x] Docker
- [ ] Vercel
- [ ] Server

**Desktop (please complete the following information):**
- OS: MacOS, Windows
- Browsers: Chrome, Firefox, Safari

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.