Skip to content

Commit 89515e2

Browse files
committed
use local driver with log rotation by default
1 parent b0cd90c commit 89515e2

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

hosting/docker/.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ OBJECT_STORE_SECRET_ACCESS_KEY=very-safe-password
101101
# - Applies to all services, adjust as needed
102102
# RESTART_POLICY=unless-stopped
103103

104+
# Docker logging
105+
# - See the official docs: https://docs.docker.com/engine/logging/configure/
106+
# LOGGING_DRIVER=local
107+
# LOGGING_MAX_SIZE=20m
108+
# LOGGING_MAX_FILES=5
109+
# LOGGING_COMPRESS=true
110+
104111
# Traefik
105112
# - Reverse proxy settings only serve as an example and require further configuration
106113
# - See the partial overrides in docker-compose.traefik.yml for more details

hosting/docker/webapp/docker-compose.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
name: trigger
22

3+
x-logging: &logging-config
4+
driver: ${LOGGING_DRIVER:-local}
5+
options:
6+
max-size: ${LOGGING_MAX_SIZE:-20m}
7+
max-file: ${LOGGING_MAX_FILES:-5}
8+
compress: ${LOGGING_COMPRESS:-true}
9+
310
services:
411
webapp:
512
image: ghcr.io/triggerdotdev/trigger.dev:${TRIGGER_IMAGE_TAG:-v4-beta}
613
restart: ${RESTART_POLICY:-unless-stopped}
14+
logging: *logging-config
715
ports:
816
- ${WEBAPP_PUBLISH_IP:-0.0.0.0}:8030:3000
917
depends_on:
@@ -61,6 +69,7 @@ services:
6169
postgres:
6270
image: postgres:${POSTGRES_IMAGE_TAG:-14}
6371
restart: ${RESTART_POLICY:-unless-stopped}
72+
logging: *logging-config
6473
ports:
6574
- ${POSTGRES_PUBLISH_IP:-127.0.0.1}:5433:5432
6675
volumes:
@@ -84,6 +93,7 @@ services:
8493
redis:
8594
image: redis:${REDIS_IMAGE_TAG:-7}
8695
restart: ${RESTART_POLICY:-unless-stopped}
96+
logging: *logging-config
8797
ports:
8898
- ${REDIS_PUBLISH_IP:-127.0.0.1}:6389:6379
8999
volumes:
@@ -100,6 +110,7 @@ services:
100110
electric:
101111
image: electricsql/electric:${ELECTRIC_IMAGE_TAG:-1.0.13}
102112
restart: ${RESTART_POLICY:-unless-stopped}
113+
logging: *logging-config
103114
depends_on:
104115
- postgres
105116
networks:
@@ -118,6 +129,7 @@ services:
118129
clickhouse:
119130
image: bitnami/clickhouse:${CLICKHOUSE_IMAGE_TAG:-latest}
120131
restart: ${RESTART_POLICY:-unless-stopped}
132+
logging: *logging-config
121133
ports:
122134
- ${CLICKHOUSE_PUBLISH_IP:-127.0.0.1}:9090:9000
123135
environment:
@@ -138,6 +150,7 @@ services:
138150
registry:
139151
image: registry:${REGISTRY_IMAGE_TAG:-2}
140152
restart: ${RESTART_POLICY:-unless-stopped}
153+
logging: *logging-config
141154
ports:
142155
- ${REGISTRY_PUBLISH_IP:-127.0.0.1}:5000:5000
143156
networks:
@@ -159,6 +172,7 @@ services:
159172
minio:
160173
image: minio/minio:${MINIO_IMAGE_TAG:-latest}
161174
restart: ${RESTART_POLICY:-unless-stopped}
175+
logging: *logging-config
162176
ports:
163177
- ${MINIO_PUBLISH_IP:-127.0.0.1}:9000:9000
164178
- ${MINIO_PUBLISH_IP:-127.0.0.1}:9001:9001
@@ -190,4 +204,4 @@ networks:
190204
supervisor:
191205
name: supervisor
192206
webapp:
193-
name: webapp
207+
name: webapp

hosting/docker/worker/docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
name: trigger
22

3+
x-logging: &logging-config
4+
driver: ${LOGGING_DRIVER:-local}
5+
options:
6+
max-size: ${LOGGING_MAX_SIZE:-20m}
7+
max-file: ${LOGGING_MAX_FILES:-5}
8+
compress: ${LOGGING_COMPRESS:-true}
9+
310
services:
411
supervisor:
512
image: ghcr.io/triggerdotdev/supervisor:${TRIGGER_IMAGE_TAG:-v4-beta}
613
restart: ${RESTART_POLICY:-unless-stopped}
14+
logging: *logging-config
715
depends_on:
816
- docker-proxy
917
networks:
@@ -48,6 +56,7 @@ services:
4856
docker-proxy:
4957
image: tecnativa/docker-socket-proxy:${DOCKER_PROXY_IMAGE_TAG:-latest}
5058
restart: ${RESTART_POLICY:-unless-stopped}
59+
logging: *logging-config
5160
volumes:
5261
- /var/run/docker.sock:/var/run/docker.sock:ro
5362
networks:

0 commit comments

Comments
 (0)