Git Product home page Git Product logo

keycloak-docker's Introduction

Install Keycloak on Nginx proxy server with Https

  1. Create the volumes
docker volume create nginx_volume
docker volume create keycloak_volume
docker volume create keycloak_postgresql_volume
  1. Run docker-compose up

  2. Inside the keycloak container, add a new socket-binding element to the socket-binding-group element of Keycloak standalone.xml

<socket-binding-group name="standard-sockets" default-interface="public"
    port-offset="${jboss.socket.binding.port-offset:0}">
    ...
    <socket-binding name="proxy-https" port="443"/>
    ...
</socket-binding-group>
  1. Inside the postgres container, execute this SQL to allow https.
psql -d mydb -U myuser

update REALM set ssl_required='NONE' where id = 'master';
  1. The blacklabelops/nginx creates the nginx configuration automatically which will need editing to make proxy work for keycloak.
# go to /etc/nginx/conf.d/server1.conf and add an upstream just above the server block
upstream keycloak.nellmedina.com {
     server keycloak:8080;
}

# go to /etc/nginx/conf.d/server1/reverseProxy.conf
location / {
          proxy_pass http://keycloak.nellmedina.com;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_set_header X-Forwarded-Proto https;
          proxy_set_header X-Forwarded-Port 443;
        }
  1. Restart the nginx and keycloak server then access keycloak at https://keycloak.nellmedina.com.

keycloak-docker's People

Contributors

nellmedina avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.