Docker Compose – Setting log size limit

By default, Docker Compose does not set any size limits for logs. For example, let’s set the limit to 10 MB and the maximum number of files for rotation – 10.

version: "3.8"
services:
  some-service:
    image: some-service
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "10"

 

 

Tagged: Tags

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments