Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker 部署的时候 SITE_PASSWORD 没有解析成功 #428

Open
1 task
Penggeor opened this issue Jul 17, 2023 · 2 comments
Open
1 task

Docker 部署的时候 SITE_PASSWORD 没有解析成功 #428

Penggeor opened this issue Jul 17, 2023 · 2 comments

Comments

@Penggeor
Copy link
Contributor

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the bug

看来下是 docker-env-replace.sh 这个文件的问题

for file in $(find ./dist -type f -name "*.mjs"); do
  sed "s/({}).OPENAI_API_KEY/\"$openai_api_key\"/g;
  s/({}).HTTPS_PROXY/\"$https_proxy\"/g;
  s/({}).OPENAI_API_BASE_URL/\"$openai_api_base_url\"/g;
  s/({}).HEAD_SCRIPTS/\"$head_scripts\"/g;
  s/({}).PUBLIC_SECRET_KEY/\"$public_secret_key\"/g;
  s/({}).OPENAI_API_MODEL/\"$openai_api_model\"/g;
  s/({}).SITE_PASSWORD/\"$site_password\"/g" $file > tmp
  mv tmp $file
doned

原来 SITE_PASSWORD 这里是 process.env.SITE_PASSWORD,我把它改正回来了

What prompt did you enter?

No response

Console Logs

No response

Participation

  • I am willing to submit a pull request for this issue.
@pigeon-fancier
Copy link

有打包好的镜像吗

@zhullyb
Copy link
Contributor

zhullyb commented Oct 2, 2023

一个临时的解决方案,直接进 docker 里面把这个脚本给改了

docker exec chatgpt-demo sed -i "s|process.env.SITE_PASSWORD|({}).SITE_PASSWORD|" docker-env-replace.sh
docker restart chatgpt-demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants