From 233d7f657b032f2da2e2289382c938a9a34d26a0 Mon Sep 17 00:00:00 2001 From: klemek Date: Mon, 20 Apr 2026 23:04:44 +0200 Subject: [PATCH] build: add logs handling in compose file --- compose.example.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/compose.example.yml b/compose.example.yml index 62ba112..6185ee3 100644 --- a/compose.example.yml +++ b/compose.example.yml @@ -1,25 +1,31 @@ name: stapler +x-stapler-default: &stapler-default + build: . + restart: unless-stopped + env_file: .env + logging: + driver: "json-file" + options: + max-size: "10m" + max-file: "3" + services: stapler: - build: . - restart: unless-stopped + <<: *stapler-default ports: - "80:80" - "443:443" volumes: - "./data:/data" - "./letsencrypt:/etc/letsencrypt" - env_file: .env command: --debug run - + stapler-crontab: - build: . - restart: unless-stopped + <<: *stapler-default volumes: - "./data:/data" - "./letsencrypt:/etc/letsencrypt" - "./crontab:/etc/crontabs/root" - env_file: .env entrypoint: /usr/sbin/crond -f