-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (42 loc) · 1.16 KB
/
docker-compose.yml
File metadata and controls
42 lines (42 loc) · 1.16 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
services:
pets-api:
build: pets-api/.
image: pet-store-api/pets-api
container_name: pets-api
restart: unless-stopped
ports:
- 8081:8080
environment:
- OTEL_TRACES_EXPORTER=otlp
- OTEL_METRICS_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
depends_on:
postgresql:
condition: service_started
otel-collector:
condition: service_started
postgresql:
image: postgres
container_name: postgres-db
restart: unless-stopped
environment:
POSTGRES_DB: pet-store
POSTGRES_USER: pet-store
POSTGRES_PASSWORD: pa55w0rd
POSTGRES_ROOT_PASSWORD: pa55w0rd
ports:
- 54321:5432
volumes:
- ./postgres/data:/var/lib/postgresql/data
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
otel-collector:
image: otel/opentelemetry-collector-contrib
container_name: otel-collector
restart: unless-stopped
command: [ "--config=/etc/otelcol-contrib/config.yml" ]
volumes:
- ./otel/collector-config.yml:/etc/otelcol-contrib/config.yml
ports:
- 4317:4317
- 4318:4318