version: '3'

volumes:
  restheart-datadb:
  mysql-datadb:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /media/dbdata/mysql

services:
  #################################################
  mysql:
    image: vtpl/vsaasedgemysql:prod
    command: --default-authentication-plugin=mysql_native_password
    network_mode: host
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: Root#156#
    volumes:
      - /media/dbdata/mysql-data1:/var/lib/mysql
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  license-server:
    image: vtpl/licenseserver:1.2.4b
    network_mode: host
    restart: always
    volumes:
      - ./license:/root/workfiles/license
      - ./logs/LicenseServer:/root/workfiles/logs
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    privileged: true
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  # ###############################################
  vms:
    image: vtpl/vms:1.2.4b
    network_mode: host
    pid: "host"
    restart: always
    depends_on:
      mysql:
        condition: service_started
    volumes:
      - /media/vdata:/media/vdata
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/VMS:/root/workfiles/VMS/logs
      - ./logs/VMS/Debug:/root/workfiles/VMS/Debug
      - ./logs/VMS/Debug2:/root/workfiles/VMS/Debug2
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /proc:/host_proc:ro
      - /sys:/host_sys:ro
    environment:
      VTPL_VSAAS_USER_ID: "site.vms_1@vtpl.com"
      VTPL_VSAAS_PD: "9b760e94cfb111dddd9b2921291b2200b3834e21251bed187b8d80e094ad0af5782a92d1570b93f2ccf24039cfaee35bdfabdb01393deb33956e611b56c719bf"
      VTPL_VSAAS_DOMAIN: "http://172.232.96.139:80"
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
 ## ###############################################
  mediaserver:
    image: vtpl/mediaserver:1.2.4b
    network_mode: host
    restart: always
    depends_on:
      vms:
        condition: service_started
    volumes:
      - /media/vdata:/media/vdata
      - ./logs/MediaServer/Debug:/root/workfiles/MediaServer/Debug
      - ./logs/MediaServer/Debug2:/root/workfiles/MediaServer/Debug2
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/MediaServer:/root/workfiles/MediaServer/logs
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  nasuploader:
    image: vtpl/nasuploader:1.2.4b
    network_mode: host
    restart: always
    volumes:
      - /media/vdata:/media/vdata
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/NasUploader:/root/workfiles/NasUploader/logs
      - ./logs/NasUploader/Debug:/root/workfiles/NasUploader/Debug
      - ./logs/NasUploader/Debug2:/root/workfiles/NasUploader/Debug2
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      VTPL_VSAAS_USER_ID: "site.vms_1@vtpl.com"
      VTPL_VSAAS_PD: "9b760e94cfb111dddd9b2921291b2200b3834e21251bed187b8d80e094ad0af5782a92d1570b93f2ccf24039cfaee35bdfabdb01393deb33956e611b56c719bf"
      VTPL_VSAAS_DOMAIN: "http://172.232.96.139:80"
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  cameramanager:
    image: vtpl/vcameramanager:1.2.4b
    network_mode: host
    restart: always
    depends_on:
      vms:
        condition: service_started
    volumes:
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/V-Camera-Manager/logs:/root/workfiles/V-Camera-Manager/logs
      - ./logs/V-Camera-Manager/Debug:/root/workfiles/V-Camera-Manager/Debug
      - ./logs/V-Camera-Manager/Debug2:/root/workfiles/V-Camera-Manager/Debug2
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  vmsapigprc:
    image: vtpl/vmsapigrpc:1.2.4b
    network_mode: host
    restart: always
    depends_on:
      vms:
        condition: service_started
    volumes:
      - /media/vdata:/media/vdata
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/V-IVMS-API-GRPC/Debug:/root/workfiles/V-IVMS-API-GRPC/Debug
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  snapmanager:
    image: vtpl/snapmanager:1.2.4b
    network_mode: host
    restart: always
    volumes:
      - /media/vdata:/media/vdata
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/V-Snap-Manager/Debug:/root/workfiles/V-Snap-Manager/Debug
      - ./logs/V-Snap-Manager/Debug2:/root/workfiles/V-Snap-Manager/Debug2
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  filestreamer:
    image: vtpl/filestreamer:1.2.2b
    network_mode: host
    restart: always
    volumes:
      - /media/vdata:/media/vdata
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/VFileStreamer/Debug:/root/workfiles/VFileStreamer/Debug
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  live_rec_service:
    image: vtpl/live_rec_service:1.2.2b
    restart: always
    depends_on:
      mysql:
        condition: service_started
    volumes:
      - ./session:/workfiles/session
      - ./logs:/workfiles/logs
      - /media/vdata:/media/vdata
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    network_mode: host
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################
  streamer_edge:
    image: vtpl/streamer_edge:1.2.2b
    environment:
      - MASTER_SERVER_USER=site.vms_1@vtpl.com
      - MASTER_SERVER_PASS=9b760e94cfb111dddd9b2921291b2200b3834e21251bed187b8d80e094ad0af5782a92d1570b93f2ccf24039cfaee35bdfabdb01393deb33956e611b56c719bf
      - MASTER_SERVER_DOMAIN=http://172.232.96.139:80
    restart: always
    network_mode: host
    depends_on:
      live_rec_service:
        condition: service_started
    volumes:
      - ./session:/workfiles/session:rw
      - ./logs:/workfiles/logs:rw
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  # # ## ###############################################
  pva_service:
    image: vtpl/pva:1.2.2b
    user: root
    environment:
      - DISPLAY=${DISPLAY}
      - GST_DEBUG=3
    devices:
      - /dev/dri
    group_add:
      - 109
    restart: always
    network_mode: host
    volumes:
      - ./session:/workfiles/session:rw
      - ./logs:/workfiles/logs:rw
      - /media/vdata/vimages:/media/vdata/vimages:rw
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
       driver: "json-file"
       options:
         max-size: "50k"
         max-file: "2"
   # ## ###############################################
  meta_sync_client:
    image: vtpl/meta_sync_client:1.2.2b
    environment:
      - MASTER_SERVER_USER=site.vms_1@vtpl.com
      - MASTER_SERVER_PASS=9b760e94cfb111dddd9b2921291b2200b3834e21251bed187b8d80e094ad0af5782a92d1570b93f2ccf24039cfaee35bdfabdb01393deb33956e611b56c719bf
      - MASTER_SERVER_DOMAIN=http://172.232.96.139:80
    restart: always
    network_mode: host
    volumes:
      - ./session:/workfiles/session
      - ./logs:/workfiles/logs
      - /media/vdata/Fileserverdata:/media/vdata/Fileserverdata
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
       driver: "json-file"
       options:
         max-size: "50k"
         max-file: "2"
  ## ###############################################
  portal:
    image: "vcpaas/deeperlookportal:1.5"
    restart: always
    environment:
      server.port: 9191
      server.servlet.contextPath: "/"
      spring.data.mongodb.uri: "mongodb://root:root%40central1234@127.0.0.1:27017/v1?authSource=admin"
      fileserver.host: "masterfileserver"
    network_mode: host
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"

  ## ############################################### 
  eveapi:
    image: backend_server_eveapi:latest
    command: python run.py
    environment:
      MONGODB_URI: "mongodb://root:root%40central1234@127.0.0.1:27017/v1?authSource=admin"
    restart: always
    network_mode: host
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"

  ## ############################################### 
  masterfileserver:
    image: meraface/fileserver:v2.0.1.4
    restart: always
    depends_on:
      eveapi:
        condition: service_started
    volumes:
      - /media/vdata/Fileserverdata:/srv
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    network_mode: host
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"

  ## ############################################### 
  attribute:
    image: vtpl/attribute:1.2.2b
    restart: always
    network_mode: host
    volumes:
      - ./attribute/session:/workfiles/session:rw
      - /media/vdata/vimages:/media/vdata/vimages:rw
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"

  ## ###############################################
  data-analytic-server:
    image: vtpl/edataanalyticsserver:1.2.4b
    restart: always
    volumes:
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/VSaaS:/root/workfiles/V-Data-Analytics-Server/logs
      - ./logs/V-Data-Analytics-Server/Debug:/root/workfiles/V-Data-Analytics-Server/Debug
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    network_mode: host
    environment:
      VTPL_VSAAS_USER_ID: "site.vms_1@vtpl.com"
      VTPL_VSAAS_PD: "9b760e94cfb111dddd9b2921291b2200b3834e21251bed187b8d80e094ad0af5782a92d1570b93f2ccf24039cfaee35bdfabdb01393deb33956e611b56c719bf"
      VTPL_VSAAS_DOMAIN: "http://172.232.96.139:80"
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"

  #  # ###############################################
  cameradefultsettings:
    image: vtpl/cameradefultsettings:1.2.4b
    network_mode: host
    restart: always
    depends_on:
      mysql:
        condition: service_started
    volumes:
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/cameradefultsettings:/root/workfiles/CameraDefaultSettings/logs
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
  ## ###############################################    
  cloudarchiveproxy:
    image: vtpl/edgearchiveproxy:1.2.4b
    restart: always
    volumes:
      - /media/vdata:/media/vdata
      - /media/vdata/ArchiveProxy/cache:/root/workfiles/ArchiveProxy/cache
      - ./vtpl_cnf:/root/workfiles/vtpl_cnf
      - ./logs/ArchiveProxy:/root/workfiles/ArchiveProxy/logs
      - ./logs/ArchiveProxy/Debug:/root/workfiles/ArchiveProxy/Debug
      - ./logs/ArchiveProxy/Debug2:/root/workfiles/ArchiveProxy/Debug2
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    network_mode: host
    depends_on:
      mediaserver:
        condition: service_started
    logging:
      driver: "json-file"
      options:
        max-size: "50k"
        max-file: "2"
#   # ###############################################      
#   event_verifier:
#     image: vtpl/edge_event_verifier:v1.2.2b
#     container_name: event_verifier
#     restart: always
#     command: --config_path /workspace/config.json --port 2532  --log_level DEBUG
#     network_mode: host
#     logging:
#       driver: "json-file"
#       options:
#         max-size: "1000k"
#         max-file: "2"
# # #  # ###############################################
