version: '2.1'
services:
  portal:
    image: duosecurity/network-gateway@sha256:1f976d6b673c08ddb9cf3624fcd1f630de4a5a953294ac079282287c5b46dc4a
    environment:
      - APERTURE_NPROCS
    ports:
        - "80:80"
        - "443:443"
    container_name: network-gateway-portal
    depends_on:
        - redis
    sysctls:
        - net.core.somaxconn=32768
    restart: always
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    logging: &syslog_logger
      driver: syslog
      options:
        syslog-address: "udp://127.0.0.1:514"
        tag: "{{.Name}}"
  admin:
    image: duosecurity/network-gateway@sha256:f537ff3f9866388cb88dd2b698b3534ad4519800ad92640e1e3ca280dbe562f2
    ports:
        - "8443:443"
    container_name: network-gateway-admin
    depends_on:
        - redis
    restart: always
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    logging: *syslog_logger
  redis:
    image: duosecurity/network-gateway@sha256:d846b2522abd37cb10d8d252284f06aa2b57c7dbf768944f3c1aa69ae591b637
    container_name: network-gateway-redis
    volumes:
        - data:/data
    restart: always
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    logging: *syslog_logger
  dns:
    image: duosecurity/network-gateway@sha256:dcb25e552d2b4f6f11039c78c7d2a4eea18dac195d472763e7ce496c9cc005d8
    ports:
        - "${DNGDNS_IP:-0.0.0.0}:53:53/tcp"
        - "${DNGDNS_IP:-0.0.0.0}:53:53/udp"
    container_name: network-gateway-dns
    depends_on:
        - redis
    restart: always
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    logging: *syslog_logger
  syslog:
    image: duosecurity/network-gateway@sha256:3a826f7d1eb6de908fc0702f0ff621ce155f2d9ad50f08e357578e9bc64da32b
    container_name: network-gateway-syslog
    volumes:
      - "${SYSLOG_LOG_PATH:-./syslog}:/var/log"
    ports:
      - 127.0.0.1:514:514/udp
    profiles:
      - syslog

volumes:
    data:
