diff --git a/files/docker-daemon.json b/files/docker-daemon.json new file mode 100644 index 0000000..55ac195 --- /dev/null +++ b/files/docker-daemon.json @@ -0,0 +1,7 @@ +{ + "log-driver": "json-file", + "log-opts": { + "max-file": "10", + "max-size": "100m" + } +} diff --git a/lemmy.yml b/lemmy.yml index 8388fbf..9b17584 100644 --- a/lemmy.yml +++ b/lemmy.yml @@ -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: diff --git a/templates/docker-compose.yml b/templates/docker-compose.yml index 7c5cd92..0345a80 100644 --- a/templates/docker-compose.yml +++ b/templates/docker-compose.yml @@ -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"