Files
2025-03-07 13:47:44 +07:00

162 lines
4.1 KiB
YAML

version: '3.8'
services:
ldap:
image: dcm4che/slapd-dcm4chee:2.6.3-29.0
logging:
driver: json-file
options:
max-size: "10m"
ports:
- "389:389"
env_file: docker-compose.env
volumes:
- ~/dcm4chee-arc/ldap:/var/lib/ldap
- ~/dcm4chee-arc/slapd.d:/etc/ldap/slapd.d
db:
image: dcm4che/postgres-dcm4chee:14.5-29
logging:
driver: json-file
options:
max-size: "10m"
ports:
- "5432:5432"
env_file: docker-compose.env
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ~/dcm4chee-arc/db:/var/lib/postgresql/data
arc:
image: dcm4che/dcm4chee-arc-psql:5.29.0
logging:
driver: json-file
options:
max-size: "10m"
ports:
- "8080:8080"
- "8443:8443"
- "9990:9990"
- "9993:9993"
- "11112:11112"
- "2762:2762"
- "2575:2575"
- "12575:12575"
env_file: docker-compose.env
environment:
WILDFLY_CHOWN: /opt/wildfly/standalone /storage
WILDFLY_WAIT_FOR: ldap:389 db:5432
depends_on:
- ldap
- db
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ~/dcm4chee-arc/wildfly:/opt/wildfly/standalone
- ~/dcm4chee-arc/storage:/storage
ohif_viewer:
build:
context: ./../../../../
dockerfile: ./platform/app/.recipes/Nginx-Dcm4chee-Keycloak/dockerfile
image: webapp:latest
container_name: webapp
ports:
- '443:443' # SSL
- '80:80' # Web
depends_on:
keycloak:
condition: service_healthy
restart: on-failure
networks:
- default
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
- OAUTH2_PROXY_SKIP_PROVIDER_BUTTON=true
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf
- ./config/oauth2-proxy.cfg:/etc/oauth2-proxy/oauth2-proxy.cfg
- ./config/letsencrypt:/etc/letsencrypt
- ./config/certbot:/var/www/certbot
keycloak:
image: quay.io/keycloak/keycloak:24.0.5
command: 'start-dev --import-realm'
hostname: keycloak
container_name: keycloak
volumes:
- ./config/ohif-keycloak-realm.json:/opt/keycloak/data/import/ohif-keycloak-realm.json
environment:
KC_DB_URL_HOST: postgres
KC_DB: postgres
KC_DB_URL: 'jdbc:postgresql://postgres:5432/keycloak'
KC_DB_SCHEMA: public
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KC_HOSTNAME_ADMIN_URL: http://YOUR_DOMAIN/keycloak/
KC_HOSTNAME_URL: http://YOUR_DOMAIN/keycloak/
KC_HOSTNAME_STRICT_BACKCHANNEL: true
KC_HOSTNAME_STRICT_HTTPS: false
KC_HTTP_ENABLED: true
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_HEALTH_ENABLED: true
KC_METRICS_ENABLED: true
KC_PROXY: edge
KC_PROXY_HEADERS: xforwarded
KEYCLOAK_JDBC_PARAMS: connectTimeout=40000
KC_LOG_LEVEL: INFO
KC_HOSTNAME_DEBUG: true
PROXY_ADDRESS_FORWARDING: true
ports:
- 8081:8080
depends_on:
- postgres
restart: unless-stopped
networks:
- default
extra_hosts:
- 'host.docker.internal:host-gateway'
healthcheck:
test:
[
"CMD-SHELL",
"exec 3<>/dev/tcp/YOUR_DOMAIN/8080;echo -e \"GET /health/ready HTTP/1.1\r\nhost: http://localhost\r\nConnection: close\r\n\r\n\" >&3;grep \"HTTP/1.1 200 OK\" <&3"
]
interval: 1s
timeout: 5s
retries: 10
start_period: 60s
postgres:
image: postgres:15
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
networks:
- default
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./config/letsencrypt:/etc/letsencrypt
- ./config/certbot:/var/www/certbot
entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;"
volumes:
postgres_data:
driver: local
networks:
default:
driver: bridge