From d9e8844f8ddd27f3ffd2cc1179d5717a483fd4f3 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 12 Dec 2024 14:23:48 -0800 Subject: [PATCH] Update gitea containers to use journald logging This replaces syslog logging for containes with journald. Our syslog rules for /var/log/containers/ log files should continue working because journald emits to syslog. This is in preparation for an eventual docker compose backed by podman setup on newer platforms. We also update the haproxy role as gitea relies on it. This will also side effect zuul web service. Change-Id: I00bbc79a2196aebbd5c5da1b740eae395a97c9c4 --- playbooks/roles/gitea/templates/docker-compose.yaml.j2 | 6 +++--- playbooks/roles/haproxy/templates/docker-compose.yaml.j2 | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/playbooks/roles/gitea/templates/docker-compose.yaml.j2 b/playbooks/roles/gitea/templates/docker-compose.yaml.j2 index 12c382f2ac..f64881141e 100644 --- a/playbooks/roles/gitea/templates/docker-compose.yaml.j2 +++ b/playbooks/roles/gitea/templates/docker-compose.yaml.j2 @@ -17,7 +17,7 @@ services: - /var/gitea/db:/var/lib/mysql - /var/gitea/conf/99-max_conn_my.cnf:/etc/mysql/conf.d/99-max_conn_my.cnf:ro logging: - driver: syslog + driver: journald options: tag: "docker-mariadb" gitea-web: @@ -39,7 +39,7 @@ services: - /var/gitea/logs:/logs - /var/gitea/certs:/certs logging: - driver: syslog + driver: journald options: tag: "docker-gitea" gitea-ssh: @@ -56,6 +56,6 @@ services: - /var/gitea/conf:/custom/conf - /var/gitea/logs:/logs logging: - driver: syslog + driver: journald options: tag: "docker-gitea-ssh" diff --git a/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 b/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 index efd26f2d10..30d8f237f2 100644 --- a/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 +++ b/playbooks/roles/haproxy/templates/docker-compose.yaml.j2 @@ -39,7 +39,7 @@ services: - /var/haproxy/etc:/usr/local/etc/haproxy:ro - /var/haproxy/run:/var/haproxy/run logging: - driver: syslog + driver: journald options: tag: "docker-haproxy" @@ -55,7 +55,7 @@ services: STATSD_HOST: graphite.opendev.org STATSD_PORT: 8125 logging: - driver: syslog + driver: journald options: tag: "docker-haproxy-statsd" {% endif %}