Skip to content

Commit 4ef79a8

Browse files
author
root
committed
2 parents e8e20fb + b28ca48 commit 4ef79a8

File tree

2 files changed

+94
-55
lines changed

2 files changed

+94
-55
lines changed

docker-compose.yaml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ services:
1010
proxy:
1111
container_name: zmq_proxy
1212
image: ghcr.io/kile/zmq-proxy:latest
13-
deploy:
14-
resources:
15-
limits:
16-
memory: 512M
13+
logging:
14+
driver: "json-file"
15+
options:
16+
max-file: "3" # number of files or file count
17+
max-size: "10m" # file size
1718
build:
1819
context: "./zmq_proxy"
1920
target: ${MODE:-prod}
@@ -52,6 +53,11 @@ services:
5253
restart: unless-stopped
5354
depends_on:
5455
- proxy
56+
logging:
57+
driver: "json-file"
58+
options:
59+
max-file: "5" # number of files or file count
60+
max-size: "10m" # file size
5561
<<: *common-labels
5662

5763
bot:
@@ -75,15 +81,16 @@ services:
7581
depends_on:
7682
- api
7783
- proxy
84+
logging:
85+
driver: "json-file"
86+
options:
87+
max-file: "10" # number of files or file count
88+
max-size: "10m" # file size
7889
<<: *common-labels
7990

8091
grafana:
8192
image: grafana/grafana:10.4.2
8293
restart: unless-stopped
83-
deploy:
84-
resources:
85-
limits:
86-
memory: 512M
8794
ports:
8895
- '3000:3000'
8996
volumes:
@@ -92,6 +99,11 @@ services:
9299
- ./grafana/datasources:/etc/grafana/provisioning/datasources
93100
env_file:
94101
- .env
102+
logging:
103+
driver: "json-file"
104+
options:
105+
max-file: "3" # number of files or file count
106+
max-size: "10m" # file size
95107

96108
prometheus:
97109
image: prom/prometheus
@@ -104,28 +116,30 @@ services:
104116
volumes:
105117
- ./prometheus:/etc/prometheus
106118
- prom_data:/prometheus
119+
logging:
120+
driver: "json-file"
121+
options:
122+
max-file: "3" # number of files or file count
123+
max-size: "10m" # file size
107124

108125
loki:
109126
image: grafana/loki:latest
110127
container_name: loki
111-
deploy:
112-
resources:
113-
limits:
114-
memory: 1024M
115128
ports:
116129
- "3100:3100"
117130
command: -config.file=/etc/loki/config.yml
118131
volumes:
119132
- ./loki/config.yml:/etc/loki/config.yml
120133
- loki_data:/loki
134+
logging:
135+
driver: "json-file"
136+
options:
137+
max-file: "5" # number of files or file count
138+
max-size: "10m" # file size
121139

122140
alloy:
123141
image: grafana/alloy:latest
124142
container_name: alloy
125-
deploy:
126-
resources:
127-
limits:
128-
memory: 1024M
129143
ports:
130144
- 12345:12345
131145
- 4317:4317
@@ -137,6 +151,11 @@ services:
137151
command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
138152
depends_on:
139153
- loki
154+
logging:
155+
driver: "json-file"
156+
options:
157+
max-file: "5" # number of files or file count
158+
max-size: "50m" # file size
140159

141160
volumes:
142161
prom_data:

0 commit comments

Comments
 (0)