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 - auth_mysql
working_dir: /home/allianceauth/myauth/ working_dir: /home/allianceauth/myauth/
stop_grace_period: 10m stop_grace_period: 10m
logging:
driver: "json-file"
options:
max-size: "10Mb"
max-file: "5"
x-allianceauth-health-check: &allianceauth-health-checks x-allianceauth-health-check: &allianceauth-health-checks
healthcheck: healthcheck:
@ -50,6 +55,11 @@ services:
healthcheck: healthcheck:
test: ["CMD", "healthcheck.sh", "--su=mysql", "--connect", "--innodb_initialized"] test: ["CMD", "healthcheck.sh", "--su=mysql", "--connect", "--innodb_initialized"]
restart: unless-stopped restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "1Mb"
max-file: "5"
nginx: nginx:
image: nginx:1.25 image: nginx:1.25
@ -59,6 +69,11 @@ services:
- static-volume:/var/www/myauth/static - static-volume:/var/www/myauth/static
depends_on: depends_on:
- allianceauth_gunicorn - allianceauth_gunicorn
logging:
driver: "json-file"
options:
max-size: "1Mb"
max-file: "5"
redis: redis:
image: redis:7 image: redis:7
@ -69,6 +84,11 @@ services:
- ./conf/redis_healthcheck.sh:/redis_healthcheck.sh - ./conf/redis_healthcheck.sh:/redis_healthcheck.sh
healthcheck: healthcheck:
test: ["CMD", "redis_healthcheck.sh"] test: ["CMD", "redis_healthcheck.sh"]
logging:
driver: "json-file"
options:
max-size: "1Mb"
max-file: "5"
allianceauth_gunicorn: allianceauth_gunicorn:
ports: ports:
@ -123,6 +143,11 @@ services:
environment: environment:
GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-clock-panel,grafana-simple-json-datasource GF_INSTALL_PLUGINS: grafana-piechart-panel,grafana-clock-panel,grafana-simple-json-datasource
GF_AUTH_DATABASE_PASSWORD: ${GRAFANA_DB_PASSWORD} GF_AUTH_DATABASE_PASSWORD: ${GRAFANA_DB_PASSWORD}
logging:
driver: "json-file"
options:
max-size: "1Mb"
max-file: "5"
proxy: proxy:
image: jc21/nginx-proxy-manager:latest image: jc21/nginx-proxy-manager:latest
@ -143,6 +168,11 @@ services:
- proxy-le:/etc/letsencrypt - proxy-le:/etc/letsencrypt
healthcheck: healthcheck:
test: ["CMD", "/bin/check-health"] 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 # Uncomment this section to use a dedicated database for Nginx Proxy Manager
# proxy-db: # proxy-db:
@ -157,6 +187,11 @@ services:
# - 3306 # - 3306
# volumes: # volumes:
# - proxy-db:/var/lib/mysql # - proxy-db:/var/lib/mysql
# logging:
# driver: "json-file"
# options:
# max-size: "1Mb"
# max-file: "5"
volumes: volumes:
redis-data: redis-data: