+ Docker config to save on space
This commit is contained in:
parent
2f926b99c1
commit
a61ef4b841
15
playbooks/alpha/docker-config.yml
Normal file
15
playbooks/alpha/docker-config.yml
Normal file
@ -0,0 +1,15 @@
|
||||
# Here we basically install a config that limits all containers to having
|
||||
# a maxium amount of logs on disk. We do this to save on storage space
|
||||
---
|
||||
- hosts: alpha
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Copy over daemon.json config
|
||||
copy:
|
||||
src: docker/daemon.json
|
||||
dest: /etc/daemon.json
|
||||
|
||||
- name: Restart Docker service
|
||||
systemd:
|
||||
name: docker
|
||||
state: restarted
|
7
playbooks/alpha/docker/daemon.json
Normal file
7
playbooks/alpha/docker/daemon.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"log-driver" : "local",
|
||||
"log-opts": {
|
||||
"max-size": "10m",
|
||||
"max-file": "3"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user