如何解决ShinyProxy Docker Compose Keycloak HTTP-Portal 用户登录后重定向过多会引发错误
想使用ShinyProxy + Keycloak + Docker-Compose 启动我的网络应用程序,并基于SteveLTN/Https 的解决方案使用https 在全球网络中发布(并获取ssl 证书) -门户。
包含 2 个在本地和内部网络上测试过的 Shiny 应用程序,Keycloak 工作正常,我希望使用 nginx +letsencrypt 添加 ssl 证书,但尝试手动配置它们但没有成功。现在我正在通过@brandones 博客尝试来自@steveltn 的这个解决方案。 (Blog de @brandones)
docker-compose.yml:
version: "3.9"
services:
https-portal:
image: steveltn/https-portal:latest
container_name: isp_https-portal
restart: always
environment:
DOMAINS: 'keycloak.example.com -> http://dockerhost:8010,example.com -> http://dockerhost:8020' # change 'domain.com' to your domain
STAGE: local # change this to 'production' once you're sure DNS is working
PROXY_BUFFERS: "4 512k"
PROXY_BUFFER_SIZE: "256k"
networks:
- net-ispch
ports:
- '80:80'
- '443:443'
volumes:
- https-portal-data:/var/lib/https-portal
keycloak:
image: jboss/keycloak:12.0.4
container_name: isp_keycloak
restart: always
environment:
KEYCLOAK_USER: "admin"
KEYCLOAK_PASSWORD: "admin"
PROXY_ADDRESS_FORWARDING: "true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./themes/mytheme:/opt/jboss/keycloak/themes/mytheme
ports:
- '8010:8080'
networks:
- net-ispch
shinyproxy:
image: imageisp/shinyproxy
container_name: isp_shinyproxy
restart: always
build:
context: ./shinyproxy
networks:
- net-ispch
ports:
- '8020:8080'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./shinyproxy-logs/server:/log
- ./shinyproxy-logs/container:/container-logs
- ./shinyproxy/application.yml:/opt/shinyproxy/application.yml
reporte_mensual:
image: reporte_mensual-docker
container_name: isp_reporte_mensual
build: ./shinyapps/reporte_mensual-docker
networks:
- net-ispch
iaas:
image: iaas-docker
container_name: isp_iaas
build: ./shinyapps/iaas-docker
networks:
- net-ispch
volumes:
https-portal-data: {}
networks:
net-ispch:
name: net-ispch
external: true
和 application.yml:
proxy:
title: ISP - Sistema Interactivo
landing-page: /
template-path: ./templates/2col
hide-navbar: false
heartbeat-rate: 10000
heartbeat-timeout: 180000
authentication: keycloak
keycloak:
realm: shinyproxy
auth-server-url: https://keycloak.example.com/auth
resource: resource
verify-token-audience: true
credentials-secret: secret credentials
policy-enforcer: {}
container-log-path: ./container-logs
name-attribute: email
docker:
internal-networking: true
cert-path: /home/none
url: http://example.com:2375
port-range-start: 20000
specs:
- id: iaas
display-name: IAAS
container-image: iaas-docker
container-cmd: ["R","-e","shiny::runApp('/root/iaas/')"]
container-network: net-ispch
- id: reporte_mensual
display-name: REPORTE MENSUAL
container-image: reporte_mensual-docker
container-cmd: ["R","shiny::runApp('/root/reporte_mensual/')"]
container-network: net-ispch
server:
forward-headers-strategy: native
secure-Cookies: true
frame-Options: sameorigin
logging:
file:
shinyproxy.log
这里我附上控制台错误、重定向配置和浏览器错误的截图:
控制台使用 docker-compose up 的错误图像:
error obtained in console when running docker-compose up
带有在 keycloak 中用于重定向登录地址的图像:
and this is my configuration in Valid Redirect URIs
在keycloak中输入用户名和密码后在浏览器中显示错误信息的图片:
and this is the error message after login with keycloak
我已经尝试过自己解决但找不到答案,可以通过查看我的配置文件来帮助我纠正错误。
请帮助我解决这个问题......提前致谢
谢谢大家!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。