-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
83 lines (79 loc) · 2.68 KB
/
compose.yml
File metadata and controls
83 lines (79 loc) · 2.68 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
services:
api:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_HTTP_PORTS: "8080"
ConnectionStrings__DefaultConnection: "Server=sqlserver;Database=DotnetApi;User Id=sa;Password=${MSSQL_SA_PASSWORD:-YourStrong@Passw0rd};TrustServerCertificate=true"
Jwt__Secret: "${JWT_SECRET:-dev-only-secret-key-minimum-32-characters-long}"
Jwt__Issuer: "dotnet-sqlserver"
Jwt__Audience: "dotnet-sqlserver-api"
Jwt__ExpirationHours: "24"
AllowedOrigins__0: "*"
OTEL_SERVICE_NAME: dotnet-sqlserver-api
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
depends_on:
sqlserver:
condition: service_healthy
otel-collector:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
worker:
build:
context: .
dockerfile: Dockerfile.worker
environment:
ConnectionStrings__DefaultConnection: "Server=sqlserver;Database=DotnetApi;User Id=sa;Password=${MSSQL_SA_PASSWORD:-YourStrong@Passw0rd};TrustServerCertificate=true"
JobProcessor__PollingIntervalMs: "1000"
OTEL_SERVICE_NAME: dotnet-sqlserver-worker
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4317
depends_on:
sqlserver:
condition: service_healthy
otel-collector:
condition: service_started
sqlserver:
image: ${SQL_IMAGE:-mcr.microsoft.com/azure-sql-edge:latest}
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: "${MSSQL_SA_PASSWORD:-YourStrong@Passw0rd}"
MSSQL_PID: "${MSSQL_PID:-Developer}"
ports:
- "1433:1433"
volumes:
- sqlserver-data:/var/opt/mssql
healthcheck:
test: ["CMD-SHELL", "grep -q ':0599' /proc/net/tcp || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
otel-collector:
image: otel/opentelemetry-collector-contrib:0.147.0
command: ["--config=/etc/otel-config.yaml"]
volumes:
- ./config/otel-config.yaml:/etc/otel-config.yaml:ro
ports:
- "4317:4317"
- "4318:4318"
- "13133:13133"
env_file:
- path: .env
required: false
environment:
- SCOUT_ENDPOINT=${SCOUT_ENDPOINT:-http://localhost:4318}
- SCOUT_CLIENT_ID=${SCOUT_CLIENT_ID:-}
- SCOUT_CLIENT_SECRET=${SCOUT_CLIENT_SECRET:-}
- SCOUT_TOKEN_URL=${SCOUT_TOKEN_URL:-}
- SCOUT_ENVIRONMENT=${SCOUT_ENVIRONMENT:-development}
volumes:
sqlserver-data: