Fixing keycloak + postgres setup
This commit is contained in:
parent
512f640e8a
commit
c057357515
@ -2,25 +2,15 @@
|
|||||||
|
|
||||||
version: '3.5'
|
version: '3.5'
|
||||||
|
|
||||||
# https://docs.docker.com/compose/compose-file/#volume-configuration-reference
|
|
||||||
volumes:
|
|
||||||
keycloak_postgres_data:
|
|
||||||
driver: local
|
|
||||||
external: true
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# Exposed server that's handling incoming web requests
|
# Exposed server that's handling incoming web requests
|
||||||
# Underlying image: openresty/openresty:alpine-fat
|
# Underlying image: openresty/openresty:alpine-fat
|
||||||
ohif_viewer:
|
ohif_viewer:
|
||||||
#
|
|
||||||
#
|
|
||||||
build:
|
build:
|
||||||
# Project root
|
# Project root
|
||||||
context: ./../../
|
context: ./../../
|
||||||
# Relative to context
|
# Relative to context
|
||||||
dockerfile: ./docker/OpenResty-Orthanc-Keycloak/dockerfile
|
dockerfile: ./docker/OpenResty-Orthanc-Keycloak/dockerfile
|
||||||
#
|
|
||||||
#
|
|
||||||
image: webapp:latest
|
image: webapp:latest
|
||||||
container_name: webapp
|
container_name: webapp
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
@ -67,29 +57,51 @@ services:
|
|||||||
dns:
|
dns:
|
||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
|
|
||||||
# Example Config:
|
# LINK: https://hub.docker.com/r/jboss/keycloak
|
||||||
# https://github.com/jboss-dockerfiles/keycloak/blob/master/docker-compose-examples/keycloak-postgres.yml
|
|
||||||
#
|
|
||||||
keycloak:
|
keycloak:
|
||||||
hostname: keycloak
|
|
||||||
restart: on-failure
|
|
||||||
image: jboss/keycloak:6.0.1
|
image: jboss/keycloak:6.0.1
|
||||||
|
hostname: keycloak
|
||||||
|
container_name: keycloak
|
||||||
|
volumes:
|
||||||
|
# Theme: https://www.keycloak.org/docs/latest/server_development/index.html#creating-a-theme
|
||||||
|
# - ./volumes/keycloak-themes:/opt/jboss/keycloak/themes
|
||||||
|
# Previous Realm Config
|
||||||
|
- ./config/ohif-keycloak-realm.json:/tmp/ohif-keycloak-realm.json
|
||||||
environment:
|
environment:
|
||||||
|
# Database
|
||||||
|
DB_VENDOR: postgres
|
||||||
|
DB_ADDR: postgres
|
||||||
|
DB_PORT: 5432
|
||||||
|
DB_DATABASE: keycloak
|
||||||
|
DB_SCHEMA: public
|
||||||
|
DB_USER: keycloak
|
||||||
|
DB_PASSWORD: password
|
||||||
# Keycloak
|
# Keycloak
|
||||||
KEYCLOAK_USER: admin
|
KEYCLOAK_USER: admin
|
||||||
KEYCLOAK_PASSWORD: password
|
KEYCLOAK_PASSWORD: password
|
||||||
# DB
|
KEYCLOAK_IMPORT: /tmp/ohif-keycloak-realm.json
|
||||||
POSTGRES_PORT_5432_TCP_ADDR: keycloak_postgres
|
# KEYCLOAK_WELCOME_THEME: <theme-name>
|
||||||
POSTGRES_PORT_5432_TCP_PORT: 5432
|
# KEYCLOAK_DEFAULT_THEME: <theme-name>
|
||||||
POSTGRES_DATABASE: keycloak
|
# KEYCLOAK_HOSTNAME: (recommended in prod)
|
||||||
|
# KEYCLOAK_LOGLEVEL: DEBUG
|
||||||
|
PROXY_ADDRESS_FORWARDING: 'true'
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
# LINK: https://hub.docker.com/_/postgres/
|
||||||
|
postgres:
|
||||||
|
image: postgres:11.2
|
||||||
|
hostname: postgres
|
||||||
|
container_name: postgres
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: keycloak
|
||||||
POSTGRES_USER: keycloak
|
POSTGRES_USER: keycloak
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
PROXY_ADDRESS_FORWARDING: 'true'
|
restart: unless-stopped
|
||||||
# volumes:
|
|
||||||
# - ./keycloak_data/themes:/opt/jboss/keycloak/themes
|
volumes:
|
||||||
depends_on:
|
postgres_data:
|
||||||
- keycloak_postgres
|
driver: local
|
||||||
dns:
|
|
||||||
- 8.8.8.8
|
|
||||||
links:
|
|
||||||
- keycloak_postgres
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user