Log policy for docker containers - 2 files 100MB 19/7819/3
authorcalvinosanch <guillermo.calvinosanchez@altran.com>
Tue, 30 Jul 2019 07:11:56 +0000 (07:11 +0000)
committercalvinosanch <guillermo.calvinosanchez@altran.com>
Thu, 19 Sep 2019 10:03:18 +0000 (12:03 +0200)
Change-Id: I3dfb36ced68ccd0d95c5d2f0bfc725e9629675a2
Signed-off-by: calvinosanch <guillermo.calvinosanchez@altran.com>
installers/docker/docker-compose.yaml

index c325776..6675e97 100644 (file)
@@ -44,6 +44,11 @@ services:
       interval: 10s
       timeout: 10s
       retries: 3
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
   kafka:
     image: wurstmeister/kafka:${KAFKA_TAG:-latest}
     ports:
@@ -62,6 +67,11 @@ services:
       interval: 20s
       timeout: 10s
       retries: 5
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
     #depends_on:
     #  - zookeeper
   mongo:
@@ -82,6 +92,11 @@ services:
       - prom_db:/prometheus
     networks:
       - netOSM
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
   keystone:
     image: ${DOCKER_USER:-opensourcemano}/keystone:${TAG:-6}
     networks:
@@ -92,6 +107,11 @@ services:
       - ./keystone.env
     ports:
       - "${OSM_KEYSTONE_PORTS:-5000:5000}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
   nbi:
     image: ${DOCKER_USER:-opensourcemano}/nbi:${TAG:-6}
     networks:
@@ -105,6 +125,11 @@ services:
       - ./nbi.env
     ports:
       - "${OSM_NBI_PORTS:-9999:9999}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
     #depends_on:
     #  - kafka
     #  - mongo
@@ -120,6 +145,11 @@ services:
       OSMLCM_MESSAGE_HOST: kafka
     env_file:
       - ./lcm.env
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
     #depends_on:
     #  - kafka
     #  - mongo
@@ -134,6 +164,11 @@ services:
       - ro_db:/var/lib/mysql
     env_file:
       - ./ro-db.env
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
 #    ports:
 #      - "3306:3306"
   ro:
@@ -150,6 +185,11 @@ services:
       - ro:/var/log/osm
     ports:
       - "${OSM_RO_PORTS:-9090:9090}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"
   mon:
     image: ${DOCKER_USER:-opensourcemano}/mon:${TAG:-6}
     networks:
@@ -201,3 +241,8 @@ services:
       - ./lwui.env
     ports:
       - "${OSM_UI_PORTS:-80:80}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "100m"
+        max-file: "2"