From 7b1211e7d79bf532a7781146f72fcea4ab872035 Mon Sep 17 00:00:00 2001 From: pratishta Date: Tue, 6 Feb 2024 12:15:00 -0500 Subject: [PATCH 1/2] Add local logging driver to all active containers --- docker-compose.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5616b27..5fe93c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,8 @@ services: - "80:80" - "443:443" command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" + logging: + driver: "local" api: image: pelias/api:v5.53.0 @@ -22,6 +24,8 @@ services: ports: [ "4000:4000" ] volumes: - "./pelias.json:/code/pelias.json" + logging: + driver: "local" schema: image: pelias/schema:v6.4.0 @@ -36,6 +40,8 @@ services: user: "${DOCKER_USER}" restart: always ports: [ "4400:4400" ] + logging: + driver: "local" csv-importer: image: pelias/csv-importer:v2.13.0 @@ -63,6 +69,8 @@ services: volumes: - "./pelias.json:/code/pelias.json" - "${DATA_DIR}:/data" + logging: + driver: "local" elasticsearch: image: pelias/elasticsearch:7.16.1 @@ -82,3 +90,5 @@ services: soft: 65536 hard: 65536 cap_add: [ "IPC_LOCK" ] + logging: + driver: "local" From 3dc141f542dd6f136a7284556b1460b1787994bc Mon Sep 17 00:00:00 2001 From: pratishta Date: Thu, 8 Feb 2024 12:21:19 -0500 Subject: [PATCH 2/2] Increase logging max limit to 200mb per file, limit logging type to http and above --- docker-compose.yml | 12 +++++++++++- pelias.json | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5fe93c0..8abafba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,9 @@ services: command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" logging: driver: "local" - + options: + max-size: "200m" + api: image: pelias/api:v5.53.0 container_name: pelias_api @@ -26,6 +28,8 @@ services: - "./pelias.json:/code/pelias.json" logging: driver: "local" + options: + max-size: "200m" schema: image: pelias/schema:v6.4.0 @@ -42,6 +46,8 @@ services: ports: [ "4400:4400" ] logging: driver: "local" + options: + max-size: "200m" csv-importer: image: pelias/csv-importer:v2.13.0 @@ -71,6 +77,8 @@ services: - "${DATA_DIR}:/data" logging: driver: "local" + options: + max-size: "200m" elasticsearch: image: pelias/elasticsearch:7.16.1 @@ -92,3 +100,5 @@ services: cap_add: [ "IPC_LOCK" ] logging: driver: "local" + options: + max-size: "200m" diff --git a/pelias.json b/pelias.json index c9ef421..2b03280 100644 --- a/pelias.json +++ b/pelias.json @@ -39,5 +39,10 @@ "85977539" ] } + }, + "logger": { + "level": "http", + "timestamp": true, + "colorize": true } }