-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
52 lines (50 loc) · 1.38 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: '3.7'
services:
fluentd:
container_name: fluentd
image: mrecco/fluentd:v1.3.3
entrypoint:
- '/bin/sh'
- '-c'
- |
cp -r /conf/*.conf /fluentd/etc/
sleep 3
/conf/pre-entrypoint.sh
exec tini -- /fluentd/entrypoint.sh
environment:
FLUENT_GRAYLOG_HOST: "graylog.example.com"
FLUENT_GRAYLOG_PORT: "12201"
FLUENT_GRAYLOG_PROTOCOL: "tcp"
SPECIAL_TAG: "some_special_tag"
links:
- pglog-collector:pglog-collector # Start it at first
stop_grace_period: 1s
volumes:
- "./volumes/fluentd:/conf:ro"
- "./volumes/logrotate:/etc/logrotate:ro"
- "/run/log/journal:/var/log/journal"
- "/var/lib/docker/containers:/var/lib/docker/containers:ro"
- "/var/log:/var/log"
restart: on-failure
pglog-collector:
image: mrecco/pglog-collector:v1.1.0
command:
- "-f"
- "/var/log/postgresql/postgresql.csv"
stop_grace_period: 1s
volumes:
- "/var/log/postgresql:/var/log/postgresql:ro"
logging:
driver: "json-file"
options:
max-size: "64M" # 1G logs, for less than 2 hours of cold load
max-file: "16"
restart: on-failure
pglog-rotation:
image: mrecco/logrotate:v1.0.0
links:
- pglog-collector:pglog-collector # Start it at first
stop_grace_period: 1s
volumes:
- "./volumes/logrotate:/etc/jobber:ro"
restart: on-failure