I configured my application in docker compose to use rotating logs, following the in the following site: https://medium.com/@Quigley_Ja/rotating-docker-logs-keeping-your-overlay-folder-small-40cfa2155412
my-app:
image: my-app:latest
logging:
driver: "json-file"
options:
max-file: 5
max-size: 10m
But when I run the program now it cannot start with the following error: b'json: cannot unmarshal number into Go struct field LogConfig.Config of type string'
Turns out I had to put " " around the values:
my-app:
image: my-app:latest
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
If anyone has this problem, just update composer to latest version. How to upgrade docker-compose to latest version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With