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 compose部署时是否能根据环境变量实时更新api和key? #507

Open
Jayczee opened this issue Sep 26, 2024 · 2 comments
Open

Comments

@Jayczee
Copy link

Jayczee commented Sep 26, 2024

问题1:目前发现项目API地址和key全都是明文存储在localStorage中的:。

问题2:并且当我使用docker部署项目时,我通过重新容器更新环境变量的方式来修改api和key,但是localStorage中的key和api都没有更新,导致容器重启了,用户这边仍然是旧的配置,甚至更新了镜像版本到最新,前端网页显示的仍然是旧版本号,需要新开一个无痕浏览页面重新访问才会刷新。(盲猜也是存在localStorage中的)。

需求:能否每次打开页面时都能够更新一遍配置呢?并且加密一下key。
github

@Dooy
Copy link
Owner

Dooy commented Sep 26, 2024

存在本地 还怕么

@Jayczee
Copy link
Author

Jayczee commented Sep 27, 2024

存在本地 还怕么

加密确实个人使用问题不大。主要是部署之后给一些弱基础的朋友使用,他们不太能理解配置步骤。所以我部署的时候直接docker-compose中写好api和key,设置HIDE_SERVER。

但是目前更改docker-compose文件中的环境变量中的api和key,用户下次打开网址时,api和key不更新确实有点难受了。现在手上有多个api和key,需要经常更换。而且也没法要求用户频繁地去更换。

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

2 participants