From 633c4c51ecf14e98b72830b638f84db11f6f9e41 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 26 Mar 2021 10:16:13 +1100 Subject: [PATCH] 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 --- playbooks/roles/haproxy/files/docker/docker-compose.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/playbooks/roles/haproxy/files/docker/docker-compose.yaml b/playbooks/roles/haproxy/files/docker/docker-compose.yaml index bd20660780..b4e0bac2b2 100644 --- a/playbooks/roles/haproxy/files/docker/docker-compose.yaml +++ b/playbooks/roles/haproxy/files/docker/docker-compose.yaml @@ -11,6 +11,10 @@ services: - /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 @@ -20,3 +24,7 @@ services: environment: STATSD_HOST: graphite.opendev.org STATSD_PORT: 8125 + logging: + driver: syslog + options: + tag: "docker-haproxy-statsd"