Skip to content

通过docker-compose一键拉起之后,总是卡在登陆页,怎么办? #35

Answered by eryajf
sre-show asked this question in Q&A
Discussion options

You must be logged in to vote

如果你并非在localhost进行部署,而是通过服务器IP或者域名访问,那么需要修改前端代码中连接后端的地址

因为demo环境就是这样拉起的,我这里直接将demo环境的拉起脚本放在这里,大家可以根据自己的情况进行修改:

$ cat start-docker-compose.sh

#!/bin/bash
cd  /data/docker-compose/go-ldap-admin-demo
docker-compose up -d
# 修改前端调用后端的地址
docker exec -it go-ldap-admin-ui sh -c "sed -i 's@localhost:[email protected]@g'  static/js/app.*.js"
docker exec -it go-ldap-admin-ui sh -c "nginx -s reload"

注意:如果你的IP是192.168.0.1,那么你的替换命令应该如下:

$ docker exec -it go-ldap-admin-ui sh -c "sed -i 's@localhost:[email protected]:8888@g'  static/js/app.*.js"

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lql95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants