Coder Social home page Coder Social logo

waelsan / keycloak-docker-compose Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trajakovic/keycloak-docker-compose

0.0 0.0 0.0 28 KB

docker-compose setup for JBoss Keycloak (Open Source Identity and Access Management)

License: MIT License

Shell 34.34% Dockerfile 65.66%

keycloak-docker-compose's Introduction

Keycloak - docker and docker-compose

This is docker-compose setup for Keycloak server configured with postgres database, with nginx https termination and lightweight mail server.

Used docker images

Usage

  • Clone this repository and run docker-compose up
  • In separate shell, run ./add-cert-to-java-truststore.sh. Fix script for your local java setup, idea is to put custom (self-signed) certificate into java cacerts
  • Add to your /etc/hosts file record for identity.keycloak.tom referencing 127.0.0.1
    • 127.0.0.1 identity.keycloak.tom

Testing

  • To use nignx as docker uncomment the lines of nignx on docker-compose.yml
  • For this installation we will use nginx service (cp nginx keyclock.conf to nginx folder)

Admin account

  • default admin account added to Keycloak is:
    • Username: admin
    • Password: password

Modifications on Keycloak configuration

  • in standalone.xml (To use the SSL with nignx):
    • line 410: <http-listener name="default" socket-binding="http" redirect-socket="https" proxy-address-forwarding="true"/>
      • This modification tells Keycloak to pull the client’s IP address from the X-Forwarded-For header since it's behind nginx.

Tested on

  • cat /etc/os-release:
    NAME="Ubuntu"
    VERSION="18.04.5 LTS (Bionic Beaver)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 18.04.5 LTS"
    VERSION_ID="18.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=bionic
    UBUNTU_CODENAME=bionic
    
  • uname -a: Linux ns3077990 4.15.0-154-generic #161-Ubuntu SMP Fri Jul 30 13:04:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • docker --version: Docker version 20.10.8, build 3967b7d
  • docker-compose --version: docker-compose version 1.25.4, build 8d51620a

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.