services:
  fluentbit:
    image: fluent/fluent-bit:4.1.1-amd64
    container_name: fluentbit
    restart: unless-stopped
    command: fluent-bit --config /fluent-bit.yaml
    ports:
      - "21883:1883"
      - "24224:24224"
      - "24224:24224/udp"
    volumes:
      - /opt/fluentbit/config.yaml:/fluent-bit.yaml
      - /opt/collectd/usr/collectd/types.db:/usr/share/collectd/types.db
    environment:
      - MQTT_USER=${FLUENTBIT_MQTT_USER}
      - MQTT_PASS=${FLUENTBIT_MQTT_PASS}
      - DATABASE_HOST=${FLUENTBIT_DATABASE_HOST}
      - DATABASE_PORT=${FLUENTBIT_DATABASE_PORT}
      - DATABASE_USER=${FLUENTBIT_DATABASE_USER}
      - DATABASE_PASS=${FLUENTBIT_DATABASE_PASS}
      - DATABASE_NAME=${FLUENTBIT_DATABASE_NAME}
    extra_hosts:
      - host:192.168.2.200
