# docker-compose -f docker-compose-tapmode.yaml pull && docker-compose -f docker-compose-tapmode.yaml up -d
#
#installing docker-compose -> sudo curl -L "https://github.com/docker/compose/releases/download/1.28.6/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
#https://docs.docker.com/compose/environment-variables/#substitute-environment-variables-in-compose-files && #https://docs.docker.com/compose/env-file/

version: "3.3"

volumes:
  appsentinels_onprem_config: {}

services:
  onprem_controller:
    container_name: onprem-controller
    restart: on-failure:5
    image: appsentinels/ng-controller:latest
    hostname: appsentinels-opc-sniffer
    environment:
      - SAAS_API_KEY_VALUE=<your api key>
      - APPLICATION_DOMAIN=<domain>
      - ENVIRONMENT=<environment>
      - SAAS_SERVER_NAME=in-cloud.appsentinels.ai
      - TAP_INTERFACE=<interface to sniff on>
      - TAP_FILTER=<bpf filter eg: port-3000-or-8090-and-tcp>
    network_mode: "host"
    logging:
      driver: local
      options:
        max-size: 10m    
    volumes:
      - appsentinels_onprem_config:/usr/local/appsentinels-onprem/config
      - /var/crash:/var/crash
      - /var/log/appsentinels:/var/log/appsentinels

