fix(docker): Limiting size of logging

This commit is contained in:
Chris Troutner
2022-05-10 07:05:34 -07:00
parent 26d530158a
commit f138d32022
+15 -1
View File
@@ -1,5 +1,9 @@
version: '3.9'
services:
bch-api-main: bch-api-main:
build: . build:
context: ./
dockerfile: Dockerfile dockerfile: Dockerfile
#image: bitcore #image: bitcore
container_name: bch-api-main container_name: bch-api-main
@@ -9,11 +13,21 @@ bch-api-main:
- "3000:3000" - "3000:3000"
volumes: volumes:
- ../../logs:/home/safeuser/bch-api/logs - ../../logs:/home/safeuser/bch-api/logs
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '10'
restart: always restart: always
redis-main: redis-main:
image: redis:latest image: redis:latest
container_name: redis-main container_name: redis-main
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '10'
restart: always restart: always
ports: ports:
- "172.17.0.1:6379:6379" - "172.17.0.1:6379:6379"