Skip to content

Commit

Permalink
Merge pull request #24 from WanderaOrg/hotfix/docker-logging
Browse files Browse the repository at this point in the history
add docker log rotation
  • Loading branch information
gerricchaplin authored Jan 22, 2020
2 parents 64cdf9d + 4fb1e88 commit 4c3f073
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions aws/templates/user-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ docker_setup() {
groupadd docker
curl -sSL https://get.docker.com/ | sh
until docker info; do echo 'Docker not ready yet ...'; sleep 1; done

cat << EOF > /etc/docker/daemon.json
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
EOF

systemctl restart docker
}

rancher_setup() {
Expand Down

0 comments on commit 4c3f073

Please sign in to comment.