Use /etc to configure docker logging (#52)
This commit is contained in:
parent
51c92e143d
commit
d9dac7dac5
3 changed files with 10 additions and 20 deletions
7
files/docker-daemon.json
Normal file
7
files/docker-daemon.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-file": "10",
|
||||
"max-size": "100m"
|
||||
}
|
||||
}
|
|
@ -31,6 +31,9 @@
|
|||
- 'certbot'
|
||||
- 'python3-certbot-nginx'
|
||||
|
||||
- name: copy docker config
|
||||
copy: src='../files/docker-daemon.json' dest='/etc/docker/daemon.json' mode='0644'
|
||||
|
||||
- name: request initial letsencrypt certificate
|
||||
command: certbot certonly --nginx --agree-tos --cert-name '{{ domain }}' -d '{{ domain }}' -m '{{ letsencrypt_contact_email }}'
|
||||
args:
|
||||
|
|
|
@ -13,10 +13,6 @@ services:
|
|||
depends_on:
|
||||
- postgres
|
||||
- pictrs
|
||||
logging:
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
|
||||
lemmy-ui:
|
||||
image: {{ lemmy_docker_ui_image }}
|
||||
|
@ -31,10 +27,6 @@ services:
|
|||
- ./volumes/lemmy-ui/extra_themes:/app/extra_themes
|
||||
depends_on:
|
||||
- lemmy
|
||||
logging:
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
|
@ -45,10 +37,6 @@ services:
|
|||
volumes:
|
||||
- ./volumes/postgres:/var/lib/postgresql/data
|
||||
restart: always
|
||||
logging:
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
|
||||
pictrs:
|
||||
image: asonix/pictrs:0.3.1
|
||||
|
@ -59,17 +47,9 @@ services:
|
|||
- ./volumes/pictrs:/mnt
|
||||
restart: always
|
||||
mem_limit: 200m
|
||||
logging:
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
|
||||
postfix:
|
||||
image: mwader/postfix-relay
|
||||
environment:
|
||||
- POSTFIX_myhostname={{ domain }}
|
||||
restart: "always"
|
||||
logging:
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
|
|
Loading…
Reference in a new issue