services:
  crowdsec:
    extends:
      file: ${TEMPLATES_PATH}
      service: default
    container_name: crowdsec
    image: crowdsecurity/crowdsec:v1.7.7
    environment:
      COLLECTIONS: crowdsecurity/traefik crowdsecurity/appsec-virtual-patching crowdsecurity/appsec-generic-rules crowdsecurity/http-cve
      CROWDSEC_BOUNCER_API_KEY: ${CROWDSEC_API_KEY}
      CUSTOM_HOSTNAME: crowdsec
    ports:
      - 6061:8080
      - 6060:6060
    networks:
      - ip4net
      - ip6net
    volumes:
      - ${INFRA_PATH}/crowdsec/config/acquis.yaml:/etc/crowdsec/acquis.yaml:ro
      - ${INFRA_PATH}/crowdsec/config:/etc/crowdsec
      - ${INFRA_PATH}/crowdsec/data:/var/lib/crowdsec/data
      - /var/log/crowdsec:/var/log/crowdsec:ro
      - /var/log/syslog:/var/log/syslog:ro
      - /var/log/kern.log:/var/log/kern.log:ro
