services:
  crowdsec:
    image: ${CROWDSEC_IMAGE}:${CROWDSEC_VERSION}
    container_name: ${CROWDSEC_CONTAINER_NAME}
    restart: ${CROWDSEC_RESTART_POLICY}
    security_opt:
      - no-new-privileges:true
    networks:
      - proxy
      #proxy:
      #  ipv4_address: ${CROWDSEC_IP} # You can specify a static IP
    environment:
      GID: "${GID-1000}"
      COLLECTIONS: ${CROWDSEC_COLLECTIONS}
    volumes:
      - /etc/localtime:/etc/localtime:ro
      #- ${DOCKERDIR}/crowdsec/acquis.d:/etc/crowdsec/acquis.d
      #- ${DOCKERDIR}/crowdsec/acquis.yaml:/etc/crowdsec/acquis.yaml
      - ${DOCKERDIR}/crowdsec/db:/var/lib/crowdsec/data/
      - ${DOCKERDIR}/crowdsec/config:/etc/crowdsec/
      - ${DOCKERDIR}/traefik/logs:/var/log/traefik/:ro    
      - /var/log/auth.log:/logs/auth.log:ro
      - /var/log/syslog.log:/logs/syslog.log:ro 
