Merge pull request #436 from NebulousLabs/setup-docker-logrotate

limit docker stdout/stderr log files to 10m and rotate 3
This commit is contained in:
Ivaylo Novakov 2020-09-30 13:21:01 +02:00 committed by GitHub
commit 54fbba95b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,12 @@
version: "3.7" version: "3.7"
x-logging:
&default-logging
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks: networks:
shared: shared:
ipam: ipam:
@ -19,6 +26,7 @@ services:
branch: v1.5.0 branch: v1.5.0
container_name: sia container_name: sia
restart: unless-stopped restart: unless-stopped
logging: *default-logging
environment: environment:
- SIA_MODULES=gctwr - SIA_MODULES=gctwr
env_file: env_file:
@ -37,6 +45,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: caddy container_name: caddy
restart: unless-stopped restart: unless-stopped
logging: *default-logging
env_file: env_file:
- .env - .env
volumes: volumes:
@ -56,6 +65,7 @@ services:
image: openresty/openresty:1.15.8.3-2-xenial image: openresty/openresty:1.15.8.3-2-xenial
container_name: nginx container_name: nginx
restart: unless-stopped restart: unless-stopped
logging: *default-logging
env_file: env_file:
- .env - .env
volumes: volumes:
@ -81,6 +91,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: webapp container_name: webapp
restart: unless-stopped restart: unless-stopped
logging: *default-logging
tty: true tty: true
volumes: volumes:
- webapp:/usr/app/public - webapp:/usr/app/public
@ -91,6 +102,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: handshake container_name: handshake
restart: unless-stopped restart: unless-stopped
logging: *default-logging
environment: environment:
- HSD_LOG_CONSOLE=false - HSD_LOG_CONSOLE=false
- HSD_HTTP_HOST=0.0.0.0 - HSD_HTTP_HOST=0.0.0.0
@ -112,6 +124,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: handshake-api container_name: handshake-api
restart: unless-stopped restart: unless-stopped
logging: *default-logging
environment: environment:
- HOSTNAME=0.0.0.0 - HOSTNAME=0.0.0.0
- HSD_HOST=handshake - HSD_HOST=handshake
@ -133,6 +146,7 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: health-check container_name: health-check
restart: unless-stopped restart: unless-stopped
logging: *default-logging
volumes: volumes:
- ./docker/data/health-check/state:/usr/app/state - ./docker/data/health-check/state:/usr/app/state
networks: networks: