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.
Example Docker Compose file for WordPress docker-compose.yaml
An example deployment in Docker Swarm from Jenkins using stack deploy. Jenkinsfile: