version: '3.5'

services:
  edrms-api:
    hostname: edrms-api
    image: registry.edoc2.com:5000/edoc2v5/edrms-api:edrms-v6.1.0.0
    labels:
      "type": "2"
    environment:
      - ServerModule=webapi
    env_file:
      ./envfile.env
    networks:
      - edoc2
    cap_add:
      - SYS_PTRACE
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.labels.nodetype == InDrive
      endpoint_mode: dnsrr
    logging:
      driver: "json-file"
      options:
        max-size: "2000k"
        max-file: "10"
  edrms-ioservice:
    hostname: edrms-ioservice
    image: registry.edoc2.com:5000/edoc2v5/edrms-api:edrms-v6.1.0.0
    labels:
      "type": "2"
    environment:
      - ServerModule=ioservice
    env_file:
      ./envfile.env
    networks:
      - edoc2
    cap_add:
      - SYS_PTRACE
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.labels.nodetype == InDrive
      endpoint_mode: dnsrr
    logging:
      driver: "json-file"
      options:
        max-size: "2000k"
        max-file: "10"
  edrms-backend:
    hostname: edrms-backend
    image: registry.edoc2.com:5000/edoc2v5/edrms-api:edrms-v6.1.0.0
    labels:
      "type": "2"
    environment:
      - ServerModule=backend
    env_file:
      ./envfile.env
    networks:
      - edoc2
    cap_add:
      - SYS_PTRACE
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.labels.nodetype == InDrive
    logging:
      driver: "json-file"
      options:
        max-size: "2000k"
        max-file: "10"
  edrms-datainit:
    hostname: edrms-datainit
    image: registry.edoc2.com:5000/edoc2v5/edrms-api:edrms-v6.1.0.0
    labels:
      "type": "2"
    environment:
      - ServerModule=datainit
    env_file:
      ./envfile.env
    networks:
      - edoc2
    cap_add:
      - SYS_PTRACE
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - node.labels.nodetype == InDrive
      endpoint_mode: dnsrr
    logging:
      driver: "json-file"
      options:
        max-size: "2000k"
        max-file: "10"
  edrms-tool:
    hostname: edrms-tool
    image: registry.edoc2.com:5000/edoc2v5/edrms-tool:edrms-v6.1.0.0
    env_file:
      ./envfile.env
    ports:
      - "8001:8001"
    deploy:
      placement:
        constraints:
          - node.labels.nodetype == InDrive
      replicas: 1
      restart_policy:
        condition: on-failure
    logging:
      driver: "json-file"
      options:
        max-size: "2000k"
        max-file: "10"
    networks:
      - edoc2
networks:
  edoc2:
    external: true
    name: macrowing
