-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.yaml
More file actions
150 lines (142 loc) · 3.71 KB
/
Copy pathcompose.yaml
File metadata and controls
150 lines (142 loc) · 3.71 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
x-logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "3"
services:
app:
build:
context: .
image: ${BACKEND_IMAGE:-redo-backend:local}
env_file:
- .env
environment:
SPRING_DATA_REDIS_HOST: redis
JAVA_TOOL_OPTIONS: -Xms128m -Xmx512m -Duser.timezone=Asia/Seoul
ports:
- "8080:8080"
- target: 9101
published: "9101"
host_ip: "${SERVICE_PRIVATE_IP:?SERVICE_PRIVATE_IP_required}"
protocol: tcp
depends_on:
redis:
condition: service_healthy
logging: *default-logging
restart: unless-stopped
redis:
image: redis:7.4-alpine
command:
- redis-server
- --appendonly
- "yes"
- --maxmemory
- 128mb
- --maxmemory-policy
- noeviction
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
logging: *default-logging
restart: unless-stopped
node-exporter:
image: quay.io/prometheus/node-exporter:v1.11.1
command:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/rootfs
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($$|/)
ports:
- target: 9100
published: "9100"
host_ip: "${SERVICE_PRIVATE_IP:?SERVICE_PRIVATE_IP_required}"
protocol: tcp
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro,rslave
- /run/udev/data:/run/udev/data:ro
cpus: "0.15"
mem_limit: 64m
read_only: true
security_opt:
- no-new-privileges:true
logging: *default-logging
restart: unless-stopped
redis-exporter:
image: oliver006/redis_exporter:v1.84.0
environment:
REDIS_ADDR: redis://redis:6379
ports:
- target: 9121
published: "9121"
host_ip: "${SERVICE_PRIVATE_IP:?SERVICE_PRIVATE_IP_required}"
protocol: tcp
depends_on:
redis:
condition: service_healthy
cpus: "0.10"
mem_limit: 64m
read_only: true
security_opt:
- no-new-privileges:true
logging: *default-logging
restart: unless-stopped
docker-socket-proxy:
image: lscr.io/linuxserver/socket-proxy:3.4.2
environment:
CONTAINERS: "1"
NETWORKS: "1"
EVENTS: "0"
POST: "0"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- docker-api
cpus: "0.10"
mem_limit: 64m
read_only: true
tmpfs:
- /run
security_opt:
- no-new-privileges:true
logging: *default-logging
restart: unless-stopped
alloy:
image: grafana/alloy:v1.16.1
command:
- run
- --server.http.listen-addr=127.0.0.1:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy/config.alloy
environment:
MONITORING_PRIVATE_IP: ${MONITORING_PRIVATE_IP:?MONITORING_PRIVATE_IP_required}
LOKI_TENANT_ID: ${LOKI_TENANT_ID:-redo}
LOKI_BASIC_AUTH_USERNAME: ${LOKI_BASIC_AUTH_USERNAME:?LOKI_BASIC_AUTH_USERNAME_required}
LOKI_BASIC_AUTH_PASSWORD: ${LOKI_BASIC_AUTH_PASSWORD:?LOKI_BASIC_AUTH_PASSWORD_required}
volumes:
- ./monitoring/alloy/config.alloy:/etc/alloy/config.alloy:ro
- ./monitoring/alloy/certs/loki-ca.crt:/etc/alloy/certs/loki-ca.crt:ro
- alloy-data:/var/lib/alloy/data
depends_on:
docker-socket-proxy:
condition: service_started
networks:
- default
- docker-api
cpus: "0.20"
mem_limit: 128m
security_opt:
- no-new-privileges:true
logging: *default-logging
restart: unless-stopped
volumes:
redis-data:
alloy-data:
networks:
docker-api:
internal: true