Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
227 lines (171 loc) · 4.85 KB
/
Copy pathdocker-compose.yml
File metadata and controls
227 lines (171 loc) · 4.85 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
225
226
227
services:
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
volumes:
- redis_data:/data
api:
build:
context: ..
dockerfile: docker/api.Dockerfile
env_file:
- ../.env
environment:
AUTOPR_SERVICE_NAME: autopr-api
AUTOPR_REDIS_URL: redis://redis:6379/0
AUTOPR_REPOS_DIR: /app/repos
AUTOPR_LOG_EXPORTER: otlp
AUTOPR_TRACE_EXPORTER: otlp
AUTOPR_METRICS_EXPORTER: otlp
AUTOPR_LOG_LEVEL: INFO
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: otel-collector:4317
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: otel-collector:4317
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: otel-collector:4317
AUTOPR_DATABASE_URL: postgresql+psycopg://postgres:postgres@postgres:5432/postgres
AUTOPR_DATABASE_ASYNC_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/postgres
ports:
- "8000:8000"
- "11434:11434"
depends_on:
redis:
condition: service_healthy
otel-collector:
condition: service_started
postgres:
condition: service_healthy
restart: unless-stopped
worker:
build:
context: ..
dockerfile: docker/worker.Dockerfile
env_file:
- ../.env
environment:
AUTOPR_SERVICE_NAME: autopr-worker
AUTOPR_REDIS_URL: redis://redis:6379/0
AUTOPR_REPOS_DIR: /app/repos
AUTOPR_LOG_EXPORTER: otlp
AUTOPR_TRACE_EXPORTER: otlp
AUTOPR_METRICS_EXPORTER: otlp
AUTOPR_LOG_LEVEL: INFO
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: otel-collector:4317
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: otel-collector:4317
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: otel-collector:4317
AUTOPR_DATABASE_URL: postgresql+psycopg://postgres:postgres@postgres:5432/postgres
AUTOPR_DATABASE_ASYNC_URL: postgresql+asyncpg://postgres:postgres@postgres:5432/postgres
RAY_DASHBOARD_HOST: 0.0.0.0
ports:
- "8265:8265"
depends_on:
redis:
condition: service_healthy
otel-collector:
condition: service_started
postgres:
condition: service_healthy
restart: unless-stopped
loki:
image: grafana/loki:latest
command: ["-config.file=/etc/loki/loki-config.yaml"]
ports:
- "3100:3100"
volumes:
- ./loki-config.yaml:/etc/loki/loki-config.yaml
- loki_data:/loki
restart: unless-stopped
grafana:
image: grafana/grafana:latest
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
ports:
- "3000:3000"
volumes:
- grafana-storage:/var/lib/grafana
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/dashboards:/var/lib/grafana/dashboards
depends_on:
- tempo
- prometheus
- loki
- otel-collector
restart: unless-stopped
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
command: ["--config=/etc/otel-collector.yaml"]
volumes:
- ./otel-collector.yaml:/etc/otel-collector.yaml
ports:
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "8889:8889" # Prometheus exporter (scraped by Prometheus)
depends_on:
- tempo
- loki
restart: unless-stopped
tempo:
image: grafana/tempo:latest
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
ports:
- "14317:4317"
- "14318:4318"
- "13200:3200"
depends_on:
- prometheus
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-remote-write-receiver"
- "--enable-feature=exemplar-storage"
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stopped
postgres:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4:latest
restart: unless-stopped
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: admin@autopr.com
PGADMIN_DEFAULT_PASSWORD: admin
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
- postgres
volumes:
redis_data:
postgres_data:
pgadmin_data:
grafana-storage:
loki_data: