|
1 | 1 | # SchulyKeycloak |
2 | 2 |
|
3 | | -Schuly's own [Keycloak](https://www.keycloak.org/) image — the production identity provider |
4 | | -for Schuly. A release builds and pushes a multi-arch container to |
| 3 | +[](https://github.com/schulydev/SchulyKeycloak/releases) |
| 4 | +[](https://github.com/schulydev/SchulyKeycloak/actions/workflows/docker-publish-release.yaml) |
| 5 | + |
| 6 | +Schuly's own [Keycloak](https://www.keycloak.org/) image — the production identity |
| 7 | +provider for Schuly. It bakes a [Keycloakify](https://keycloakify.dev) login theme, a |
| 8 | +leaked-password blacklist (rockyou), and the `schuly` realm into an **optimized** |
| 9 | +Keycloak 26.6 build, then ships as a multi-arch container at |
5 | 10 | `ghcr.io/schulydev/schulykeycloak`. |
6 | 11 |
|
7 | | -The recipe follows the `keycloak/` setup in |
8 | | -[Polyglot-App](https://github.com/PianoNic/Polyglot-App): a Keycloakify login theme baked in |
9 | | -as a provider jar, a leaked-password blacklist, and the Schuly realm baked in. |
10 | | - |
11 | | -## Layout |
12 | | -- `Dockerfile` — multi-stage: theme jar + rockyou blacklist + optimized keycloak 26.6. |
13 | | -- `keycloakify/` — branded login theme (Keycloakify), ported from Polyglot-App. |
14 | | -- `realms/schuly-realm.json` — the `schuly` realm, imported on first start. |
15 | | -- `compose.dev.yml` — local dev (`start-dev --import-realm`, admin/admin on :8080). |
16 | | -- `scripts/keycloak-export.{sh,ps1,bat}` — round-trip realm edits back into `realms/`. |
17 | | -- `.github/workflows/docker-publish-release.yaml` — build + push on release. |
18 | | -- `application.properties` — version, synced from the release tag by CI. |
19 | | - |
20 | | -## Develop locally |
21 | | - docker compose -f compose.dev.yml up --build |
22 | | - # http://localhost:8080 (admin / admin); realm `schuly` imported automatically |
23 | | -Edit the realm in the console, then snapshot it back: `./scripts/keycloak-export.sh`. |
24 | | - |
25 | | -## Production |
26 | | - docker run -p 8080:8080 \ |
27 | | - -e KC_DB_URL=jdbc:postgresql://db:5432/keycloak \ |
28 | | - -e KC_DB_USERNAME=keycloak -e KC_DB_PASSWORD=... \ |
29 | | - -e KC_HOSTNAME=https://auth.schuly.dev \ |
30 | | - -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=... \ |
31 | | - ghcr.io/schulydev/schulykeycloak:latest |
32 | | - |
33 | | -## Release |
34 | | -Cut a GitHub release; the workflow syncs `application.properties` to the tag and pushes |
35 | | -`:<semver>` (+ `:latest`, `:<major>`, `:<major>.<minor>`). Needs repo secret `MAIN_PUSH_TOKEN` |
36 | | -(and optionally `DOCKERHUB_USERNAME` / `DOCKERHUB_TOKEN`). |
| 12 | +## Quickstart (local) |
| 13 | + |
| 14 | +```sh |
| 15 | +docker compose -f compose.dev.yml up --build |
| 16 | +``` |
| 17 | + |
| 18 | +Opens Keycloak at <http://localhost:8080> (admin `admin` / `admin`) with the `schuly` |
| 19 | +realm imported automatically. |
| 20 | + |
| 21 | +## Quickstart (production) |
| 22 | + |
| 23 | +```sh |
| 24 | +docker run -p 8080:8080 \ |
| 25 | + -e KC_DB_URL=jdbc:postgresql://db:5432/keycloak \ |
| 26 | + -e KC_DB_USERNAME=keycloak -e KC_DB_PASSWORD=... \ |
| 27 | + -e KC_HOSTNAME=https://auth.schuly.dev \ |
| 28 | + -e KC_PROXY_HEADERS=xforwarded -e KC_HTTP_ENABLED=true \ |
| 29 | + -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=... \ |
| 30 | + ghcr.io/schulydev/schulykeycloak:latest |
| 31 | +``` |
| 32 | + |
| 33 | +For the complete stack (Postgres + reverse proxy + TLS) see |
| 34 | +[Self-hosting the full stack](docs/setup/self-hosting.md). |
| 35 | + |
| 36 | +## Documentation |
| 37 | + |
| 38 | +Full docs live in [`docs/`](docs/README.md) (and at |
| 39 | +[docs.schuly.dev](https://docs.schuly.dev)): |
| 40 | + |
| 41 | +| Doc | What it covers | |
| 42 | +|---|---| |
| 43 | +| [Development setup](docs/setup/development.md) | Run the image locally with Docker Compose. | |
| 44 | +| [Self-hosting](docs/setup/self-hosting.md) | Deploy the full stack for production. | |
| 45 | +| [Configuration reference](docs/configuration.md) | Every port, environment variable, and default. | |
| 46 | +| [Architecture](docs/architecture.md) | How the theme, realm, and base image compose. | |
| 47 | +| [Realm management](docs/realm-management.md) | Edit and snapshot the `schuly` realm (incl. 2FA). | |
| 48 | +| [Theme development](docs/theme-development.md) | Work on the Keycloakify login theme. | |
| 49 | +| [Release](docs/setup/release.md) | Cut a release and publish images. | |
| 50 | +| [Troubleshooting](docs/troubleshooting.md) | Symptoms, causes, and fixes. | |
| 51 | + |
| 52 | +## Contributing |
| 53 | + |
| 54 | +Issue → branch → PR → squash-merge. See [Contributing](docs/contributing.md). |
0 commit comments