Skip to content

Jeff-Tian/keycloak-heroku

 
 

Repository files navigation

🔑 keycloak-heroku


一键部署 Keycloak 到 Heroku PaaS 平台、Okteto 等 k8s 平台。

Deploy Keycloak to Heroku PaaS and k8s such as Okteto by just one click.

Lines of Code Code Smells Maintainability Rating Security Rating Bugs Vulnerabilities Duplicated Lines (%) Technical Debt

🇨🇳 中文版说明

部署到 Heroku

Keycloak 是一款优秀的开源身份与访问管理系统,直接部署到 Heroku 会存在一个小问题,因此需要做一些小调整。本仓库基于上游的调整,升级了 Keycloak 的版本,并适配了 Heroku 的免费 Dyno,从而不需要付费,免费拥有一个 Keycloak 实例。

线上域名

注意 ⚠️

详见《Free Arch: Bye-bye to Heroku - Jeff Tian的文章 - 知乎》,Heroku 不再提供免费 Dyno,因此,部署该项目到 Heroku,可能会产生费用。替代方案:部署到 Okteto 或者 Naptive 等免费的 k8s 集群☸️ 中。

📃 更多说明:

✨ Star 历史

https://api.star-history.com/svg?repos=jeff-tian/keycloak-heroku&type=Date

💻 开发

运行部署到 k8s 集群的版本

mvn clean install
docker compose up --build

运行部署到 heroku 的版本:

mvn clean install
docker compose -f docker-compose.heroku.yml up --build

在本地用 h2 数据库模拟部署到 heroku 的版本:

# The following token was restricted to be only able to pull
# Jeff Tian's GitHub Packages, so it's OK to be public and included
# in the source code
GH_TOKEN=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 docker compose -f docker-compose.local.yml up --build
open http://localhost:8080/

在本地用 PostgreSQL 数据库模拟部署到 heroku 的版本:

docker compose -f docker-compose.local-postgres.yml up --build
open http://localhost:8080/

💵 欢迎问我!

有任何相关问题,欢迎来知乎咨询:

向我咨询

感谢

🇱🇷 English README

Deploy to Heroku

This repository deploys the Keycloak Identity and Access Management Solution to Heroku. It is based of Keycloak's official docker image with some slight modifications to use the Heroku variable for PORT and DATABASE_URL properly.

The deployment will be made with a single Free dyno (although it won't run very well in smaller dynos due to Java's memory hunger, it can be used as testing purpose without issues) with a free Postgres database attached.

Releases

No releases published

Packages

No packages published

Languages

  • Java 39.3%
  • JavaScript 19.7%
  • Shell 16.2%
  • HTML 9.5%
  • TypeScript 6.9%
  • Dockerfile 3.8%
  • Other 4.6%