lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
40.96k stars 9.34k forks source link

[Bug] NEXT_PUBLIC_BASE_PATH not work #2526

Closed YealKio closed 4 months ago

YealKio commented 4 months ago

💻 Operating System

Ubuntu

📦 Environment

Docker

🌐 Browser

Chrome

🐛 Bug Description

Chat-lobe + ollama +nginx not work. Chat-lobe can not init in the first time, like nginx SUBPATH thing, not sure, see my step please.

BTW, ollama server and Chat-lobe server are not the same device, but in LAN. I can run OPEN-WEBUI + OLLAMA + NGINX without problem.

🚦 Expected Behavior

Even can not init.

📷 Recurrence Steps

Chat lobe run with docker: sudo docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://192.168.2.202:11434 -e NEXT_PUBLIC_BASE_PATH=/chat-lobe lobehub/lobe-chat this my nginx conf file:


upstream chat-lobe {
   server 127.0.0.1:3210;
}

    location  /chat-lobe/ {
         proxy_pass http://chat-lobe/;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header X-Forwarded-Proto $scheme;
         access_log /var/log/nginx/chat-lobe.access.log;
         error_log /var/log/nginx/chat-lobe.error.log;
    }

when I open my.nas.com:port/chat-lobe, the Chrome just show: image

The website console like:

image

Can not find any thing, and one of Request URL like: Request URL: http://my.nas.com:port/_next/static/chunks/webpack-72cd2e677540060b.js

It look like NEXT_PUBLIC_BASE_PATH not work as expected, please help!

📝 Additional Information

Ollama server and Chat-lobe server are not the same device, but in LAN.

lobehubbot commented 4 months ago

👀 @YealKio

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

arvinxx commented 4 months ago

NEXT_PUBLIC_BASE_PATH is not working with docker. You need to build it with NEXT_PUBLIC_ env by yourself

lobehubbot commented 4 months ago

✅ @YealKio

This issue is closed, If you have any questions, you can comment and reply.\ 此问题已经关闭。如果您有任何问题,可以留言并回复。