|
| 1 | +services: |
| 2 | + api: |
| 3 | + build: |
| 4 | + context: . |
| 5 | + dockerfile: CentralizedLoggingApi/Dockerfile |
| 6 | + container_name: centralized_logging_api |
| 7 | + environment: |
| 8 | + - ASPNETCORE_ENVIRONMENT=Production |
| 9 | + # Jaeger (OpenTelemetry.Jaeger exporter) |
| 10 | + - JAEGER_HOST=jaeger |
| 11 | + - JAEGER_PORT=6831 |
| 12 | + ports: |
| 13 | + - "5000:8080" |
| 14 | + - "5001:8081" |
| 15 | + depends_on: |
| 16 | + db: |
| 17 | + condition: service_healthy |
| 18 | + jaeger: |
| 19 | + condition: service_started |
| 20 | + volumes: |
| 21 | + - ./CentralizedLoggingApi/logs:/app/logs |
| 22 | + |
| 23 | + userapi: |
| 24 | + build: |
| 25 | + context: . |
| 26 | + dockerfile: UserManagementApi/Dockerfile |
| 27 | + container_name: user_management_api |
| 28 | + environment: |
| 29 | + - ASPNETCORE_ENVIRONMENT=Production |
| 30 | + # Jaeger (OpenTelemetry.Jaeger exporter) |
| 31 | + - JAEGER_HOST=jaeger |
| 32 | + - JAEGER_PORT=6831 |
| 33 | + ports: |
| 34 | + - "6000:8080" |
| 35 | + depends_on: |
| 36 | + db: |
| 37 | + condition: service_healthy |
| 38 | + jaeger: |
| 39 | + condition: service_started |
| 40 | + volumes: |
| 41 | + - ./UserManagementApi/logs:/app/logs |
| 42 | + |
| 43 | + web: |
| 44 | + build: |
| 45 | + context: . |
| 46 | + dockerfile: ApiIntegrationMvc/Dockerfile |
| 47 | + container_name: api_integration_web |
| 48 | + environment: |
| 49 | + - ASPNETCORE_ENVIRONMENT=Production |
| 50 | + - ASPNETCORE_URLS=http://+:8080 |
| 51 | + # APIs base URLs (service DNS names provided by Compose) |
| 52 | + - Services__CentralizedLogging__BaseUrl=http://api:8080 |
| 53 | + - Services__UserManagement__BaseUrl=http://userapi:8080 |
| 54 | + # Jaeger (OpenTelemetry.Jaeger exporter) |
| 55 | + - JAEGER_HOST=jaeger |
| 56 | + - JAEGER_PORT=6831 |
| 57 | + ports: |
| 58 | + - "7000:8080" # browse http://localhost:7000 |
| 59 | + depends_on: |
| 60 | + api: |
| 61 | + condition: service_started |
| 62 | + userapi: |
| 63 | + condition: service_started |
| 64 | + jaeger: |
| 65 | + condition: service_started |
| 66 | + |
| 67 | + db: |
| 68 | + image: mcr.microsoft.com/mssql/server:2022-latest |
| 69 | + container_name: centralized_logging_db |
| 70 | + environment: |
| 71 | + - ACCEPT_EULA=Y |
| 72 | + - SA_PASSWORD=Bisp@123 |
| 73 | + ports: |
| 74 | + - "1433:1433" |
| 75 | + healthcheck: |
| 76 | + test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P 'Bisp@123' -C -Q \"SELECT 1\""] |
| 77 | + interval: 10s |
| 78 | + timeout: 5s |
| 79 | + retries: 10 |
| 80 | + start_period: 30s |
| 81 | + volumes: |
| 82 | + - sql_data:/var/opt/mssql |
| 83 | + |
| 84 | + # 🔎 Jaeger (all-in-one: UI + collector + agent + storage) |
| 85 | + jaeger: |
| 86 | + image: jaegertracing/all-in-one:1.57 |
| 87 | + container_name: jaeger |
| 88 | + ports: |
| 89 | + - "16686:16686" # Jaeger UI -> http://localhost:16686 |
| 90 | + - "6831:6831/udp" # Jaeger agent (UDP) for Jaeger exporter |
| 91 | + |
| 92 | +volumes: |
| 93 | + sql_data: |
0 commit comments