Ian Wienand 633c4c51ec haproxy: write to container log files
This moves the haproxy containers to syslog with tags that will get
each container's output filtered into /var/log/containers.

Change-Id: I65294baec3c092ede5ee97856d8d879174b0d8d4
2021-03-26 10:16:13 +11:00

31 lines
749 B
YAML

# Version 2 is the latest that is supported by docker-compose in
# Ubuntu Xenial.
version: '2'
services:
haproxy:
restart: always
image: docker.io/library/haproxy:latest
network_mode: host
volumes:
- /dev/log:/dev/log
- /var/haproxy/etc:/usr/local/etc/haproxy
- /var/haproxy/run:/var/haproxy/run
logging:
driver: syslog
options:
tag: "docker-haproxy"
haproxy-statsd:
restart: always
image: docker.io/opendevorg/haproxy-statsd:latest
network_mode: host
volumes:
- /var/haproxy/run:/var/haproxy/run
environment:
STATSD_HOST: graphite.opendev.org
STATSD_PORT: 8125
logging:
driver: syslog
options:
tag: "docker-haproxy-statsd"