ohif-viewer/docker/OpenResty-Orthanc-Keycloak/docker-compose.yml

96 lines
2.7 KiB
YAML
Raw Normal View History

2019-05-07 18:35:55 +02:00
# Reference:
# - https://docs.docker.com/compose/compose-file
# - https://eclipsesource.com/blogs/2018/01/11/authenticating-reverse-proxy-with-keycloak/
2019-05-05 03:51:53 +02:00
version: '3.5'
services:
# Exposed server that's handling incoming web requests
# Underlying image: openresty/openresty:alpine-fat
ohif_viewer:
build:
# Project root
context: ./../../
2019-05-06 22:01:07 +02:00
# Relative to context
dockerfile: ./docker/OpenResty-Orthanc-Keycloak/dockerfile
image: webapp:latest
container_name: webapp
2019-05-05 03:51:53 +02:00
volumes:
# Nginx config
- ./config/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro
2019-05-06 22:01:07 +02:00
# Logs
2019-05-07 18:35:55 +02:00
- ./logs/nginx:/var/logs/nginx
# Let's Encrypt
2019-05-05 03:51:53 +02:00
# - letsencrypt_certificates:/etc/letsencrypt
# - letsencrypt_challenges:/var/www/letsencrypt
ports:
- '443:443' # SSL
- '80:80' # Web
depends_on:
- keycloak
2019-05-07 18:35:55 +02:00
- orthanc
restart: on-failure
2019-05-05 03:51:53 +02:00
2019-05-07 18:35:36 +02:00
# LINK: https://hub.docker.com/r/jodogne/orthanc-plugins/
# TODO: Update to use Postgres
# https://github.com/mrts/docker-postgresql-multiple-databases
2019-05-05 03:51:53 +02:00
orthanc:
2019-05-07 18:35:36 +02:00
image: jodogne/orthanc-plugins:1.5.6
hostname: orthanc
2019-05-05 03:51:53 +02:00
container_name: orthanc
2019-05-06 22:01:07 +02:00
volumes:
2019-05-07 18:35:36 +02:00
# Config
2019-05-06 22:01:07 +02:00
- ./config/orthanc.json:/etc/orthanc/orthanc.json:ro
2019-05-07 18:35:36 +02:00
# Persist data
# - ./volumes/orthanc-db/:/var/lib/orthanc/db/
restart: unless-stopped
2019-05-05 03:51:53 +02:00
2019-05-07 18:34:58 +02:00
# LINK: https://hub.docker.com/r/jboss/keycloak
2019-05-05 03:51:53 +02:00
keycloak:
image: jboss/keycloak:6.0.1
2019-05-07 18:34:58 +02:00
hostname: keycloak
container_name: keycloak
volumes:
# Theme: https://www.keycloak.org/docs/latest/server_development/index.html#_themes
- ./volumes/keycloak-themes/ohif:/opt/jboss/keycloak/themes/ohif
2019-05-07 18:34:58 +02:00
# Previous Realm Config
- ./config/ohif-keycloak-realm.json:/tmp/ohif-keycloak-realm.json
2019-05-05 03:51:53 +02:00
environment:
2019-05-07 18:34:58 +02:00
# Database
DB_VENDOR: postgres
DB_ADDR: postgres
DB_PORT: 5432
DB_DATABASE: keycloak
DB_SCHEMA: public
DB_USER: keycloak
DB_PASSWORD: password
2019-05-05 03:51:53 +02:00
# Keycloak
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
2019-05-07 18:34:58 +02:00
KEYCLOAK_IMPORT: /tmp/ohif-keycloak-realm.json
# KEYCLOAK_WELCOME_THEME: <theme-name>
# KEYCLOAK_DEFAULT_THEME: <theme-name>
# KEYCLOAK_HOSTNAME: (recommended in prod)
# KEYCLOAK_LOGLEVEL: DEBUG
2019-05-05 03:51:53 +02:00
PROXY_ADDRESS_FORWARDING: 'true'
depends_on:
2019-05-07 18:34:58 +02:00
- 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_PASSWORD: password
restart: unless-stopped
volumes:
postgres_data:
driver: local