Use /etc to configure docker logging (#52)

This commit is contained in:
Nutomic 2022-08-29 19:38:14 +00:00 committed by GitHub
parent 51c92e143d
commit d9dac7dac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 20 deletions

7
files/docker-daemon.json Normal file
View file

@ -0,0 +1,7 @@
{
"log-driver": "json-file",
"log-opts": {
"max-file": "10",
"max-size": "100m"
}
}

View file

@ -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:

View file

@ -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"