-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-base.yaml
More file actions
55 lines (55 loc) · 1.67 KB
/
docker-compose-base.yaml
File metadata and controls
55 lines (55 loc) · 1.67 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
services:
discount-db:
image: postgres:16
restart: unless-stopped
volumes:
- discount-db-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=discount
healthcheck:
test: pg_isready -U postgres -d discount -h localhost -p 5432
interval: 10s
timeout: 5s
retries: 3
discount:
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
environment:
- SPRING_R2DBC_URL=r2dbc:postgresql://discount-db:5432/discount
- SPRING_FLYWAY_URL=jdbc:postgresql://discount-db:5432/discount
- SPRING_R2DBC_USERNAME=postgres
- SPRING_R2DBC_PASSWORD=postgres
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_METRIC_EXPORT_INTERVAL=5000
- OTEL_LOGS_EXPORTER=none
- OTEL_INSTRUMENTATION_HTTP_CLIENT_EMIT_EXPERIMENTAL_TELEMETRY=true
- OTEL_INSTRUMENTATION_HTTP_SERVER_EMIT_EXPERIMENTAL_TELEMETRY=true
- OTEL_SERVICE_NAME=discount
- OTEL_TRACES_EXPORTER=none
healthcheck:
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
start_period: 3s
depends_on:
discount-db:
condition: service_healthy
discount-dapr:
image: "daprio/daprd:edge"
command: [
"./daprd",
"--app-id", "discount",
"--app-port", "${EXPERIMENT_CONFIG_SIDECAR_PORT:-8080}",
"--dapr-http-port", "3500",
"-placement-host-address", "placement:50006",
"--config", "/config.yaml",
"--resources-path", "/components"
]
network_mode: "service:discount"
volumes:
discount-db-data: