services:
  ldap:
    image: dcm4che/slapd-dcm4chee:2.6.3-30.0
    logging:
      driver: json-file
      options:
        max-size: "10m"
    ports:
      - "396:389"
    environment:
      STORAGE_DIR: /storage/fs1
    volumes:
      - ./dcm4chee-arc/ldap:/var/lib/openldap/openldap-data
      - ./dcm4chee-arc/slapd.d:/etc/openldap/slapd.d
    restart: always

  db:
    image: dcm4che/postgres-dcm4chee:15.2-30
    logging:
      driver: json-file
      options:
        max-size: "10m"
    ports:
      - "5440:5432"
    environment:
      POSTGRES_DB: pacsdb_g2i_ciclo
      POSTGRES_USER: pacsdb_g2i_ciclo
      POSTGRES_PASSWORD: GFJRnEUgGobaUHE9n
    volumes:
      - ./etc/localtime:/etc/localtime:ro
      - ./etc/timezone:/etc/timezone:ro
      - ./dcm4chee-arc/db:/var/lib/postgresql/data
    restart: always

  arc:
    image: dcm4che/dcm4chee-arc-psql:5.30.0
    logging:
      driver: json-file
      options:
        max-size: "10m"
    ports:
      - "8895:8080"
      - "8451:8443"
      - "9977:9990"
      - "10000:9993"
      - "11119:11112"
      - "2769:2762"
      - "2582:2575"
      - "12582:12575"
    environment:
      POSTGRES_DB: pacsdb_g2i_ciclo
      POSTGRES_USER: pacsdb_g2i_ciclo
      POSTGRES_PASSWORD: GFJRnEUgGobaUHE9n
      WILDFLY_CHOWN: /storage
      WILDFLY_WAIT_FOR: ldap:389 db:5432
      KEYSTORE: /opt/wildfly/standalone/configuration/keystores/keystore.pkcs12
      KEYSTORE_PASSWORD: "051390"
    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
      - ./path/keystore.pkcs12:/opt/wildfly/standalone/configuration/keystores/keystore.pkcs12
    restart: always

  ohif-viewer-container:
    image: ohif/app:v3.7.0-beta.62
    ports:
      - "3011:4443"
    environment:
      SSL_PORT: 4443
    volumes:
      - /home/wwg2iz/www/dcm4chee-pacs/dcm4chee_ciclo/path/server.crt:/etc/ssl/certs/ssl-certificate.crt:ro
      - /home/wwg2iz/www/dcm4chee-pacs/dcm4chee_ciclo/path/server.key:/etc/ssl/private/ssl-private-key.key:ro
      - ./config.js:/usr/share/nginx/html/default.js:ro
      - ./my-ohif.js:/usr/share/nginx/html/app-config.js:ro
    restart: always