Skip to content

Latest commit

 

History

History
82 lines (56 loc) · 1.76 KB

README.md

File metadata and controls

82 lines (56 loc) · 1.76 KB

ArchiLab Keycloak

Setup scripts and configuration files for ArchiLabs Keycloak server.

Admin account

Keycloak requires an initial admin account to login into the master realm for Keycloak configuration. The admin and database credentials are stored in ArchiLab Vault and have to be created as Docker secrets before. For simplicity you may use vault-to-docker-secret.

Themes

There are some customizations of the original Keycloak themes in the themes folder of the Docker context. Documentation can be found here.

Build

There are two image variants required to be built prior to starting the services. One for development and one for production. To build the images run:

$ build-dev.sh
$ build.sh

Setup

To start Keycloak in production mode run:

$ run.sh

If you want to develop locally you should run:

$ run-dev.sh

This disables caching and does not set a fixed frontend URL.

To shut down Keycloak run:

$ stop.sh

Backup and restore

To backup the keycloak folder and database of a running server run:

$ backup/backup.sh <DB_USER>

The keycloak folder is backed up as recommended in the official documentation but is actually never used since we don't use any special configuration.

To restore the backup of the database make sure Keycloak is shut down and run only the database:

$ run-db-only.sh

Then restore the backup with:

$ restore-db.sh <SQL_BACKUP_FILE> <DB_USER>

Shut down the database and start the whole stack again:

$ stop.sh
$ run.sh