96 lines
2.5 KiB
YAML
96 lines
2.5 KiB
YAML
# https://eclipsesource.com/blogs/2018/01/11/authenticating-reverse-proxy-with-keycloak/
|
|
|
|
version: '3.5'
|
|
|
|
# https://docs.docker.com/compose/compose-file/#volume-configuration-reference
|
|
volumes:
|
|
keycloak_postgres_data:
|
|
driver: local
|
|
external: true
|
|
|
|
services:
|
|
# Exposed server that's handling incoming web requests
|
|
# Underlying image: openresty/openresty:alpine-fat
|
|
ohif_viewer:
|
|
#
|
|
#
|
|
build:
|
|
# Project root
|
|
context: ./../../
|
|
# Relative to context
|
|
dockerfile: ./docker/OpenResty-Orthanc-Keycloak/dockerfile
|
|
#
|
|
#
|
|
image: webapp:latest
|
|
container_name: webapp
|
|
restart: on-failure
|
|
volumes:
|
|
# Nginx config
|
|
- ./config/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro
|
|
# Logs
|
|
- ./logs/nginx/access.log:/var/logs/nginx/mydomain.access.log
|
|
- ./logs/nginx/error.log:/var/logs/nginx/mydomain.error.log
|
|
# Let's Encrypt
|
|
# - letsencrypt_certificates:/etc/letsencrypt
|
|
# - letsencrypt_challenges:/var/www/letsencrypt
|
|
ports:
|
|
# HOST_PORT:CONTAINER_PORT
|
|
# EXTERNAL:INTERNAL
|
|
- '443:443' # SSL
|
|
- '80:80' # Web
|
|
depends_on:
|
|
- orthanc
|
|
- keycloak
|
|
|
|
# Our image archive (PACS)
|
|
# A client protected by keycloak
|
|
# authenticated reverse proxy via `authproxy`
|
|
orthanc:
|
|
container_name: orthanc
|
|
image: jodogne/orthanc-plugins
|
|
volumes:
|
|
- ./config/orthanc.json:/etc/orthanc/orthanc.json:ro
|
|
restart: always
|
|
|
|
# Database for our Keycloak instance
|
|
keycloak_postgres:
|
|
hostname: keycloak-db
|
|
restart: on-failure
|
|
image: postgres:11.2
|
|
volumes:
|
|
- keycloak_postgres_data:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_DB: keycloak
|
|
POSTGRES_USER: keycloak
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_ROOT_PASSWORD: password
|
|
dns:
|
|
- 8.8.8.8
|
|
|
|
# Example Config:
|
|
# https://github.com/jboss-dockerfiles/keycloak/blob/master/docker-compose-examples/keycloak-postgres.yml
|
|
#
|
|
keycloak:
|
|
hostname: keycloak
|
|
restart: on-failure
|
|
image: jboss/keycloak:6.0.1
|
|
environment:
|
|
# Keycloak
|
|
KEYCLOAK_USER: admin
|
|
KEYCLOAK_PASSWORD: password
|
|
# DB
|
|
POSTGRES_PORT_5432_TCP_ADDR: keycloak_postgres
|
|
POSTGRES_PORT_5432_TCP_PORT: 5432
|
|
POSTGRES_DATABASE: keycloak
|
|
POSTGRES_USER: keycloak
|
|
POSTGRES_PASSWORD: password
|
|
PROXY_ADDRESS_FORWARDING: 'true'
|
|
# volumes:
|
|
# - ./keycloak_data/themes:/opt/jboss/keycloak/themes
|
|
depends_on:
|
|
- keycloak_postgres
|
|
dns:
|
|
- 8.8.8.8
|
|
links:
|
|
- keycloak_postgres
|