keycloak docker-compose 运行

内容很简单,主要是搭建一个可运行的keycloak 环境,方便开发测试,同时支持数据库的持久化

docker-compose 文件

version: "3"
services:
  auth:
    image: jboss/keycloak
    ports:
    - "8080:8080"
    environment:
    - "KEYCLOAK_USER=dalong"
    - "KEYCLOAK_PASSWORD=dalongrong"
    - "DB_VENDOR=postgres"
    - "DB_ADDR=postgres"
    - "DB_DATABASE=postgres"
    - "DB_USER=postgres"
    - "DB_PASSWORD=dalong"
    - "PROXY_ADDRESS_FORWARDING=true"
  postgres:
    image: postgres:9.6
    ports:
    - "5432:5432"
    environment:
    - "POSTGRES_PASSWORD=dalong"

启动

docker-compose up -d

测试

登录账户为 dalong dalongrong

参考资料

https://hub.docker.com/r/jboss/keycloak

posted on 2019-01-28 16:33  荣锋亮  阅读(1388)  评论(0编辑  收藏  举报

导航