Run Keycloak in a Docker container without having to read through the documentation. PostgreSQL is used as the database. Please note that it is assumed that Keycloak will run behind some kind of reverse proxy e.g. Traefik.
version: "3"
services:
runtime:
image: schreiberdev/keycloak
restart: unless-stopped
depends_on:
- db
environment:
- KC_ADMIN=kcadmin
- KC_ADMIN_PASSWORD=<CHANGE_ME>
- KC_HOSTNAME=<CHANGE_ME>
- KC_DB_URL=jdbc:postgresql://db:5432/keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=keycloak
db:
image: postgres
environment:
- POSTGRES_PASSWORD=keycloak
- POSTGRES_USER=keycloak
- POSTGRES_DB=keycloak
restart: unless-stopped
volumes:
- db:/var/lib/postgresql/data
volumes:
db:
Content type
Image
Digest
sha256:ab68a8904…
Size
258 MB
Last updated
4 days ago
docker pull schreiberdev/keycloak