version: '3.5'

networks:
  es_net:
  oracle_net:
    external: true

volumes:
  cms-shared:
  esdata:

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1
    environment:
      - cluster.name=elastic-cluster
      - discovery.type=single-node
      - data
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xmx1G "
    ports:
      - 9200:9200
      - 9600:9600
    volumes:
      - esdata:/usr/share/elasticsearch/data
    networks:
      - es_net

  dotcms:
    image: dotcms/dotcms:latest
    environment:
        "CATALINA_OPTS": ' -Xms1g -Xmx1g '
        "DB_BASE_URL": "jdbc:oracle:thin:@{ip_address}:1521:XE"
        "DB_USERNAME": 'oracle'
        "DB_PASSWORD": 'oracle'
        "DOT_ES_AUTH_BASIC_PASSWORD": 'admin'
        "DOT_ES_ENDPOINTS": 'http://elasticsearch:9200'
        "DB_DRIVER": 'oracle.jdbc.OracleDriver'
        "ES_ADMIN_PASSWORD": 'admin'
        "TZ": UTC
        #"CUSTOM_STARTER_URL": 'https://repo.dotcms.com/artifactory/libs-release-local/com/dotcms/starter/20211201/starter-20211201.zip'
    depends_on:
      - elasticsearch
    volumes:
      #- {local_data_path}:/data/shared
      - {license_local_path}/license.zip:/data/shared/assets/license.zip
    networks:
      - oracle_net
      - es_net
    ports:
      - "8080:8081"
      - "8443:8443"