ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
76.5k stars 59.13k forks source link

BASE_URL and CODE environment variables have no effect with Docker Compose #3709

Open joshfester opened 10 months ago

joshfester commented 10 months ago

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

Desktop (please complete the following information):

kylinpoet commented 9 months ago

Have the same problem

MC-XiaoHei commented 7 months ago

Have the same problem the BASE_URL env var does not work at all