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

无法访问问题请求支援 #616

Open
yooshijie opened this issue Mar 26, 2021 · 2 comments
Open

无法访问问题请求支援 #616

yooshijie opened this issue Mar 26, 2021 · 2 comments

Comments

@yooshijie
Copy link

image
报以上错误,尝试了修改config.js。依然无法解决,还请红衣教主帮忙解决。尝试了以下修改。
##################################################################
[root@dh-k8s-master conf]# pwd
/opt/wayne/wayne/hack/docker-compose/conf
[root@dh-k8s-master conf]# ls
app.conf config.js
[root@dh-k8s-master conf]# cat config.js
window.CONFIG = {
URL: 'http://192.168.109.5:8080',
RAVEN: false,
RAVEN_DSN: 'RAVEN_DSN'
};
[root@dh-k8s-master conf]#
##################################################################
[root@dh-k8s-master kubernetes]# pwd
/opt/wayne/wayne/hack/kubernetes
[root@dh-k8s-master kubernetes]# cat wayne-frontend.yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: wayne-frontend
name: wayne-frontend
namespace: default
data:
config.js: |-
window.CONFIG = {
URL: 'http://192.168.109.5:32001',
RAVEN: false,
RAVEN_DSN: 'RAVEN_DSN'
};


##################################################################

请各位高手大神指点。

@luochuanzhang
Copy link

我也遇到这个问题,是通过修改index.html页面解决的;
1.复制容器里的index页面到宿主机
sudo docker cp frontend的容器id:/usr/local/openresty/nginx/html/index.html /home
2.修改<script src=“config.js........”<script>部分代码为

<script> window.CONFIG = { URL: 'http://你的后端id地址:端口', RAVEN: false, RAVEN_DSN: 'RAVEN_DSN' }; </script>

3.再复制index.html到容器里
sudo docker cp /home/index.html frontend的容器id:/usr/local/openresty/nginx/html/

@lijinfeng2011
Copy link

修改一下配置文件: hack/docker-compose/conf/config.js: URL: 'http://x.x.x.x:8080',

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