version: '2.4'
services:
  node-init:
    image: "nexus.gz1.opensdn.io:5102/opensdn-node-init:nightly"
    env_file:
      - /etc/contrail/common_config.env
      - /etc/contrail/common_web.env
    environment:
      - CONTRAIL_STATUS_IMAGE="nexus.gz1.opensdn.io:5102/opensdn-status:nightly"
    privileged: true
    pid: host
    network_mode: "host"
    volumes:
      - /usr/bin:/host/usr/bin
      - /etc/contrail/ssl/controller:/etc/contrail/ssl
      - /etc/sysctl.d:/etc/sysctl.d
      - /etc/hosts:/etc/hosts
      - /var/log/contrail:/var/log/contrail
      - /etc/timezone:/etc/timezone
      - /etc/localtime:/etc/localtime
      - /var/crashes:/var/crashes
    logging:
      driver: json-file
      options:
        max-file: "5"
        max-size: "20m"

  web:
    image: "nexus.gz1.opensdn.io:5102/opensdn-controller-webui-web:nightly"
    network_mode: "host"
    env_file:
      - /etc/contrail/common_config.env
      - /etc/contrail/common_web.env
    volumes_from:
      - node-init
    depends_on:
      - node-init
    restart: always
    logging:
      driver: json-file
      options:
        max-file: "5"
        max-size: "20m"

  job:
    image: "nexus.gz1.opensdn.io:5102/opensdn-controller-webui-job:nightly"
    network_mode: "host"
    env_file:
      - /etc/contrail/common_config.env
      - /etc/contrail/common_web.env
    volumes_from:
      - node-init
    depends_on:
      - node-init
    restart: always
    logging:
      driver: json-file
      options:
        max-file: "5"
        max-size: "20m"
