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

正式环境多worker下登录状态紊乱 #10

Closed
ruix156 opened this issue Jul 21, 2020 · 9 comments
Closed

正式环境多worker下登录状态紊乱 #10

ruix156 opened this issue Jul 21, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@ruix156
Copy link

ruix156 commented Jul 21, 2020

使用docker-compose搭建好后,没法打开站点管理,其他的都是正常的。站点管理显示
404
-- Not Found --
返回首页

@ruix156 ruix156 changed the title 使用docker-compose搭建好后,没法上传图片, 使用docker-compose搭建好后,没法打开站点管理 Jul 21, 2020
@staugur
Copy link
Member

staugur commented Jul 21, 2020

管理员用户?

@ruix156
Copy link
Author

ruix156 commented Jul 21, 2020

管理员用户?

就是这个命令啊
docker-compose exec webapp flask sa create -u 管理员账号 -p 密码 --isAdmin

@staugur
Copy link
Member

staugur commented Jul 22, 2020

站点管理403说明没权限,404说明没登录。
提示这个的时候状态是登录的吗?
是不是启动了2个及以上进程?是的话,设置下固定的secretkey再试试

@ruix156
Copy link
Author

ruix156 commented Jul 22, 2020

直接修改src/config.py然后再
docker-compose up -d ?
我发现好像就是登录cookies的原因,
有时候能打开,但是打开其他功能就又让登录了
Ps看了确实是两个进程

@staugur
Copy link
Member

staugur commented Jul 22, 2020

那就是了,docker-compose里面,webapp那个先固定secretkey,设置环境变量,或者.cfg文件写( https://picbed.rtfd.vip/zh_CN/latest/install.html#picbed-config ),
再up

@staugur
Copy link
Member

staugur commented Jul 22, 2020

这个问题确实一直存在,最近才意识到,已经在dev最新代码中修改,以往版本可以通过设置SecretKey(环境变量picbed_secretkey)解决

@staugur staugur added the bug Something isn't working label Jul 22, 2020
@staugur staugur changed the title 使用docker-compose搭建好后,没法打开站点管理 正式环境多worker下登录状态紊乱 Jul 22, 2020
@ruix156
Copy link
Author

ruix156 commented Jul 22, 2020

那我可以把整个目录删了,重新git,然后up了吧?

@ruix156 ruix156 closed this as completed Jul 22, 2020
@staugur
Copy link
Member

staugur commented Jul 22, 2020

git clone -b dev https://github.com/staugur/picbed

@ruix156
Copy link
Author

ruix156 commented Jul 22, 2020

试了几遍都没问题了,谢谢大佬了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants