From 20ce352f6e6867a5cbc4082510ce33e9138236a6 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Sat, 12 Sep 2020 13:41:23 +0200 Subject: [PATCH] Change docker-compose.yml version to 2, add logging settings (#2) - `docker-compose.yml` 2.0 and 3.0+ have different compatibility with different Docker versions and it's [preferable](https://stackoverflow.com/a/53636006/961092) to use 2.0 when you don't use swarm; - without logging settings in `docker-compose.yml` Monit container could clog host machine disk space with log in a long-running scenario --- docker-compose.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e11f133..d2c6df2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,12 @@ -version: '3' +version: "2" services: monit: image: "kijart/monit" + logging: + driver: json-file + options: + max-size: "10m" + max-file: "5" ports: - 2812:2812 volumes: