From 28fd1b07eaf698a036b2949feefd0f88584a7f67 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Thu, 9 Nov 2023 18:12:36 +1000 Subject: [PATCH] add log rotation --- docker/docker-compose.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index f6725995..bdfcb25c 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -22,6 +22,11 @@ x-allianceauth-base: &allianceauth-base - auth_mysql working_dir: /home/allianceauth/myauth/ stop_grace_period: 10m + logging: + driver: "json-file" + options: + max-size: "10Mb" + max-file: "5" x-allianceauth-health-check: &allianceauth-health-checks healthcheck: @@ -50,6 +55,11 @@ services: healthcheck: test: ["CMD", "healthcheck.sh", "--su=mysql", "--connect", "--innodb_initialized"] restart: unless-stopped + logging: + driver: "json-file" + options: + max-size: "1Mb" + max-file: "5" nginx: image: nginx:1.25 @@ -59,6 +69,11 @@ services: - static-volume:/var/www/myauth/static depends_on: - allianceauth_gunicorn + logging: + driver: "json-file" + options: + max-size: "1Mb" + max-file: "5" redis: image: redis:7 @@ -69,6 +84,11 @@ services: - ./conf/redis_healthcheck.sh:/redis_healthcheck.sh healthcheck: test: ["CMD", "redis_healthcheck.sh"] + logging: + driver: "json-file" + options: + max-size: "1Mb" + max-file: "5" allianceauth_gunicorn: ports: @@ -123,6 +143,11 @@ services: environment: GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-clock-panel,grafana-simple-json-datasource GF_AUTH_DATABASE_PASSWORD: ${GRAFANA_DB_PASSWORD} + logging: + driver: "json-file" + options: + max-size: "1Mb" + max-file: "5" proxy: image: jc21/nginx-proxy-manager:latest @@ -143,6 +168,11 @@ services: - proxy-le:/etc/letsencrypt healthcheck: test: ["CMD", "/bin/check-health"] + logging: + driver: "json-file" + options: + max-size: "1Mb" + max-file: "5" # Uncomment this section to use a dedicated database for Nginx Proxy Manager # proxy-db: @@ -157,6 +187,11 @@ services: # - 3306 # volumes: # - proxy-db:/var/lib/mysql + # logging: + # driver: "json-file" + # options: + # max-size: "1Mb" + # max-file: "5" volumes: redis-data: