Coder Social home page Coder Social logo

rocketchat-keycloak's Introduction

Rocket chat & key cloak integration guide

Develop on Okteto

Me and my friend tried to integrate rocket chat with keycloak local with the documentation from rocket chat team. Unfortunately, although followed and configured the same as the document config guide, the local run did not yield any result but error Failed to complete OAuth handshake with keycloak. However, we have figured out when we deploy these service to cloud environment, it works.

Hence, I write this guide for whoever will face this error to know how to setup keycloak with rocket chat. And if you know why the local didn't work, please tell use.

Prerequisite

  • You should have docker and docker-compose knowledge before using this

  • Docker and docker-compose installation

Setup

  • First thing first, we are going to integrate keycloak with rocket chat, thus, we need to have a rocket chat service ready
version: '3'
services:
        rocketchat:
                container_name: rocketchat
                image: rocket.chat:latest
                restart: unless-stopped
                environment:
                        - PORT=3000
                        - MONGO_URL=/url/to/your/mongodb
                        # Reference for mongodb oplog
                        # https://forums.meteor.com/t/what-should-be-in-mongo-url-and-mongo-oplog-url-for-monglab/19356
                        # if your mongodb service is in docker-compose:
                        # mongodb://mongo:27017/local
                        # ref: https://blog.jarrousse.org/2022/04/26/using-docker-compose-in-to-deploy-rocket-chat/
                        - MONGO_OPLOG_URL=/url/to/your/mongodb/oplog
                ports:
                        - 3000:3000
  • The code below declare a service name rocketchat, ports map the service port's localhost:3000 to 3000 on host

  • You have to provide your url to mongodb. Because of some error so in the compose file, I won't deploy mongodb with the compose specs.

  • Next, we will setup the keycloak service

version: '3'
services:
        rocketchat:
                #...
        postgres:
                image: postgres:13.2
                restart: unless-stopped
                environment:
                        POSTGRES_DB: ${POSTGRESQL_DB}
                        POSTGRES_USER: ${POSTGRESQL_USER}
                        POSTGRES_PASSWORD: ${POSTGRESQL_PASS}
        keycloak:
                depends_on:
                        - postgres
                environment:
                        DB_VENDOR: postgres
                        DB_ADDR: postgres
                        DB_DATABASE: ${POSTGRESQL_DB}
                        DB_USER: ${POSTGRESQL_USER}
                        DB_PASSWORD: ${POSTGRESQL_PASS}
                        KEYCLOAK_ADMIN: admin
                        KEYCLOAK_ADMIN_PASSWORD: admin
                        # auto set first user for keycloak
                        KEYCLOAK_USER: admin
                        KEYCLOAK_PASSWORD: admin
                        # this env enable using https instead of http
                        # set to false if you aren't to use https
                        PROXY_ADDRESS_FORWARDING: true
                image: jboss/keycloak
                ports:
                        - '8080:8080'
                restart: unless-stopped

Deploy to okteto

Sign in okteto website and then choose your github repo with this compose file and everything will be done automatically with okteto

Or you can use the button Develop on Okteto on top of the README file

rocketchat-keycloak's People

Contributors

nomorechokedboy 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.