services: fluentbit: image: fluent/fluent-bit:3.1.7-debug ports: # Port 24224 intentionally fixed: the Docker fluentd log driver sets # fluentd-address at service-start time (see compose.yaml and # TestLoggingDriver in compose_up_test.go). Dynamic resolution would # require a two-phase compose up which is unnecessarily invasive. # TestLoggingDriver is serial (no t.Parallel()), so collision risk is nil. - "24224:24224" - "24224:24224/udp" environment: FOO: ${BAR} app: image: alpine init: true command: sleep infinity depends_on: fluentbit: condition: service_started restart: true logging: driver: fluentd options: fluentd-address: ${HOST:-127.0.0.1}:24224