-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
224 lines (210 loc) · 6.01 KB
/
docker-compose.yml
File metadata and controls
224 lines (210 loc) · 6.01 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
networks:
easyp_network:
name: easyp_network
driver: bridge
volumes:
registry-data:
postgres-data:
rustfs-data:
grafana-data:
services:
traefik:
image: traefik:v3.6
container_name: easyp-traefik
restart: unless-stopped
command:
- "--configFile=/etc/traefik/traefik.yml"
volumes:
- "./configs/traefik/traefik.yml:/etc/traefik/traefik.yml:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
ports:
- "${EASYP_TRAEFIK_PORT:-80}:80"
networks:
- easyp_network
rustfs:
image: rustfs/rustfs:latest
container_name: easyp-rustfs
restart: unless-stopped
environment:
- RUSTFS_ACCESS_KEY=rustfsadmin
- RUSTFS_SECRET_KEY=rustfsadmin
volumes:
- rustfs-data:/data
ports:
- "9000:9000"
- "9001:9001"
labels:
traefik.enable: "true"
traefik.http.routers.rustfs.rule: "Host(`easyp.s3.localhost`)"
traefik.http.services.rustfs.loadbalancer.server.port: "9001"
networks:
- easyp_network
init-buckets:
image: minio/mc:latest
container_name: easyp-init-buckets
entrypoint: >
/bin/sh -c "
until /usr/bin/mc alias set rustfs http://rustfs:9000 rustfsadmin rustfsadmin; do echo '...waiting for S3...'; sleep 1; done;
/usr/bin/mc mb --ignore-existing rustfs/tempo;
/usr/bin/mc mb --ignore-existing rustfs/mimir-blocks;
/usr/bin/mc mb --ignore-existing rustfs/mimir-ruler;
/usr/bin/mc mb --ignore-existing rustfs/mimir-alertmanager;
/usr/bin/mc mb --ignore-existing rustfs/loki-chunks;
/usr/bin/mc mb --ignore-existing rustfs/loki-ruler;
/usr/bin/mc mb --ignore-existing rustfs/pyroscope;
exit 0;
"
networks:
- easyp_network
mimir:
image: grafana/mimir:2.16.0
container_name: easyp-mimir
restart: unless-stopped
depends_on:
init-buckets:
condition: service_completed_successfully
volumes:
- "./configs/mimir/mimir.yaml:/etc/mimir/mimir.yaml:ro"
command: ["-config.file=/etc/mimir/mimir.yaml"]
networks:
- easyp_network
loki:
image: grafana/loki:3.5.0
container_name: easyp-loki
restart: unless-stopped
depends_on:
init-buckets:
condition: service_completed_successfully
volumes:
- "./configs/loki/loki.yml:/etc/loki/loki.yml:ro"
command: ["-config.file=/etc/loki/loki.yml"]
networks:
- easyp_network
tempo:
image: grafana/tempo:2.7.2
container_name: easyp-tempo
restart: unless-stopped
depends_on:
init-buckets:
condition: service_completed_successfully
volumes:
- "./configs/tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro"
command: ["-config.file=/etc/tempo/tempo.yaml"]
networks:
- easyp_network
alloy:
image: grafana/alloy:v1.9.1
container_name: easyp-alloy
restart: unless-stopped
depends_on:
- loki
- mimir
- tempo
volumes:
- "./configs/alloy/config.alloy:/etc/alloy/config.alloy:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/var/lib/docker/containers:/var/lib/docker/containers:ro"
command:
- "run"
- "/etc/alloy/config.alloy"
- "--storage.path=/var/lib/alloy/data"
ports:
- "12345:12345"
networks:
- easyp_network
pyroscope:
image: grafana/pyroscope:1.13.5
container_name: easyp-pyroscope
restart: unless-stopped
depends_on:
init-buckets:
condition: service_completed_successfully
volumes:
- "./configs/pyroscope/pyroscope.yaml:/etc/pyroscope/pyroscope.yaml:ro"
command: ["-config.file=/etc/pyroscope/pyroscope.yaml"]
networks:
- easyp_network
grafana:
image: grafana/grafana:12.3.0
container_name: easyp-grafana
restart: unless-stopped
depends_on:
- loki
- mimir
- tempo
- pyroscope
volumes:
- "./configs/grafana/config.ini:/etc/grafana/grafana.ini:ro"
- "./configs/grafana/provisioning:/etc/grafana/provisioning:ro"
- grafana-data:/var/lib/grafana
environment:
GF_PATHS_CONFIG: "/etc/grafana/grafana.ini"
GF_PATHS_PROVISIONING: "/etc/grafana/provisioning"
ports:
- "${EASYP_GRAFANA_PORT:-3000}:3000"
labels:
traefik.enable: "true"
traefik.http.routers.grafana.rule: "Host(`easyp.grafana.localhost`)"
traefik.http.services.grafana.loadbalancer.server.port: "3000"
networks:
- easyp_network
registry:
image: registry:3.0.0
container_name: easyp-registry
restart: unless-stopped
volumes:
- registry-data:/var/lib/registry
ports:
- "${EASYP_REGISTRY_PORT:-5005}:5000"
networks:
- easyp_network
postgres:
image: postgres:17.7
container_name: easyp-postgres
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: easyp_db
POSTGRES_USER: easyp_svc
POSTGRES_PASSWORD: easyp_pass
ports:
- "${EASYP_POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U easyp_svc -d easyp_db"]
interval: 2s
timeout: 3s
retries: 10
networks:
- easyp_network
service:
build:
context: .
dockerfile: ./Dockerfile
args:
LICENSE_PUBLIC_KEY: "${LICENSE_PUBLIC_KEY:-}"
container_name: easyp-api-service
restart: always
depends_on:
postgres:
condition: service_healthy
alloy:
condition: service_started
command: ["-cfg=/config.yml", "-log_level=debug"]
volumes:
- "./config.yml:/config.yml:ro"
- "./migrate:/migrate:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
OTEL_EXPORTER_OTLP_ENDPOINT: "http://alloy:4317"
OTEL_SERVICE_NAME: "easyp-api-service"
LICENSE_KEY: "${LICENSE_KEY:-}"
ports:
- "${EASYP_GRPC_PORT:-8080}:8080"
- "${EASYP_METRICS_PORT:-8081}:8081"
- "${EASYP_HEALTH_PORT:-8082}:8082"
- "${EASYP_GATEWAY_PORT:-8083}:8083"
labels:
service: easyp-api-service
networks:
- easyp_network