feat: adding docker log rotation by default in docker compose (#5295)

* feat: adding docker log rotation by default in docker compose

* add newline

* add compression
This commit is contained in:
Alexander Petric
2025-02-14 14:48:33 -05:00
committed by GitHub
parent 0503564b04
commit f2d05909e0
2 changed files with 19 additions and 0 deletions
+4
View File
@@ -7,3 +7,7 @@ WM_IMAGE=ghcr.io/windmill-labs/windmill:main
# To use another port than :80, setup the Caddyfile and the caddy section of the docker-compose to your needs: https://caddyserver.com/docs/getting-started
# To have caddy take care of automatic TLS
# To rotate logs, set the following variables:
#LOG_MAX_SIZE=10m
#LOG_MAX_FILE=3
+15
View File
@@ -1,5 +1,12 @@
version: "3.7"
x-logging: &default-logging
driver: "json-file"
options:
max-size: "${LOG_MAX_SIZE:-20m}"
max-file: "${LOG_MAX_FILE:-10}"
compress: "true"
services:
db:
deploy:
@@ -22,6 +29,7 @@ services:
interval: 10s
timeout: 5s
retries: 5
logging: *default-logging
windmill_server:
image: ${WM_IMAGE}
@@ -40,6 +48,7 @@ services:
condition: service_healthy
volumes:
- worker_logs:/tmp/windmill/logs
logging: *default-logging
windmill_worker:
image: ${WM_IMAGE}
@@ -65,6 +74,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
- worker_dependency_cache:/tmp/windmill/cache
- worker_logs:/tmp/windmill/logs
logging: *default-logging
## This worker is specialized for "native" jobs. Native jobs run in-process and thus are much more lightweight than other jobs
windmill_worker_native:
@@ -90,6 +100,7 @@ services:
condition: service_healthy
volumes:
- worker_logs:/tmp/windmill/logs
logging: *default-logging
# This worker is specialized for reports or scraping jobs. It is assigned the "reports" worker group which has an init script that installs chromium and can be targeted by using the "chromium" worker tag.
# windmill_worker_reports:
# image: ${WM_IMAGE}
@@ -135,6 +146,7 @@ services:
volumes:
- windmill_index:/tmp/windmill/search
- worker_logs:/tmp/windmill/logs
logging: *default-logging
lsp:
image: ghcr.io/windmill-labs/windmill-lsp:latest
@@ -144,6 +156,7 @@ services:
- 3001
volumes:
- lsp_cache:/pyls/.cache
logging: *default-logging
multiplayer:
image: ghcr.io/windmill-labs/windmill-multiplayer:latest
@@ -152,6 +165,7 @@ services:
restart: unless-stopped
expose:
- 3002
logging: *default-logging
caddy:
image: ghcr.io/windmill-labs/caddy-l4:latest
@@ -170,6 +184,7 @@ services:
- BASE_URL=":80"
# - BASE_URL=":443" # uncomment and comment line above to enable HTTPS via custom certificate and key files
# - BASE_URL=mydomain.com # Uncomment and comment line above to enable HTTPS handling by Caddy
logging: *default-logging
volumes:
db_data: null