add log rotation

This commit is contained in:
Ariel Rin 2023-11-09 18:12:36 +10:00
parent 3d92008069
commit 28fd1b07ea
No known key found for this signature in database

View File

@ -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: