Skip to content

Instantly share code, notes, and snippets.

@s1moe2
Created November 7, 2020 09:05
Show Gist options
  • Save s1moe2/b154ff546c5a0025e2f2cac4336fdafb to your computer and use it in GitHub Desktop.
Save s1moe2/b154ff546c5a0025e2f2cac4336fdafb to your computer and use it in GitHub Desktop.
Keycloak+PostgreSQL docker compose
version: '3'
services:
postgres-kc:
container_name: keycloak-db
image: postgres:12
volumes:
- ./db:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
container_name: keycloak
image: jboss/keycloak:latest
environment:
DB_VENDOR: postgres
DB_ADDR: keycloak-db
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: somepwssword
ports:
- 7777:8080
depends_on:
- postgres-kc
networks:
default:
external:
name: ${YOUR-NET}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment