version: '3.4'


services:
  managing.api:
    environment:
      - ASPNETCORE_ENVIRONMENT=Oda-docker
      - ASPNETCORE_URLS=https://+:443;http://+:80
      - ASPNETCORE_Kestrel__Certificates__Default__Password=!Managing94
      - ASPNETCORE_Kestrel__Certificates__Default__Path=/app/managing_cert.pfx
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
      - ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
      - /Users/oda/ASP.NET/Https:/root/.aspnet/https:ro
      - /Users/oda/Microsoft/UserSecrets:/root/.microsoft/usersecrets/$USER_SECRETS_ID
    depends_on:
      - managingdb

  managing.api.workers:
    environment:
      - ASPNETCORE_ENVIRONMENT=Oda-docker
      - ASPNETCORE_URLS=https://+:443;http://+:80
      - ASPNETCORE_Kestrel__Certificates__Default__Password=!Managing94
      - ASPNETCORE_Kestrel__Certificates__Default__Path=/app/managing_cert.pfx
    ports:
      - "81:80"
      - "444:443"
    volumes:
      - ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
      - /Users/oda/ASP.NET/Https:/root/.aspnet/https:ro
    depends_on:
      - managingdb

  managingdb:
    restart: always
    volumes:
       - mongodata:/data/db
    ports:
       - "27017:27017"
       
  # elasticsearch:
  #   ports:
  #     - 9200:9200
  #   volumes:
  #     - elasticsearch-data:/usr/share/elasticsearch/data
  #   environment:
  #     - discovery.type=single-node
  #     - xpack.monitoring.templates.enabled=true  
  #     - ES_JAVA_OPTS=-Xms1g -Xmx1g
  #     - xpack.security.enabled=false

  # kibana:
  #   ports:
  #     - 5601:5601
  #   depends_on:
  #     - elasticsearch
  #   environment:
  #     - ELASTICSEARCH_URL=http://elasticsearch:9200

  influxdb:
    image: influxdb:latest
    volumes:
      - influxdata:/var/lib/influxdb2
    ports:
      - 8086:8086
    restart: always

