add log limits to container

This commit is contained in:
James 2022-06-02 14:42:45 +01:00
parent 6a3cfb5253
commit 167062ead8
2 changed files with 8 additions and 1 deletions

View File

@ -8,6 +8,11 @@ services:
context: ./ context: ./
args: args:
NGINX_TAG: ${NGINX_TAG-stable} NGINX_TAG: ${NGINX_TAG-stable}
logging:
driver: "json-file"
options:
max-size: ${LOG_MAX_SIZE-100M}
max-file: ${LOG_MAX_FILE-3}
restart: unless-stopped restart: unless-stopped
networks: networks:
- proxy - proxy

View File

@ -3,4 +3,6 @@ VOLUME_PATH=/data/nginx
PROXY_NETWORK=proxy PROXY_NETWORK=proxy
# Nginx settings # Nginx settings
NGINX_TAG=stable NGINX_TAG=stable
LOG_MAX_SIZE=100M
LOG_MAX_FILE=3