Skip to content

Deployment

Docker

The project includes a multi-stage Dockerfile for production deployment.

Build the Image

docker build \
  --build-arg DOTNET_VERSION=10.0 \
  -t virtufin-websocketmanager \
  -f src/Virtufin.WebSocketManager/Dockerfile \
  .

Run with Dapr

docker run \
  -p 5001:5001 \
  -p 5002:5002 \
  virtufin-websocketmanager

Configuration

All settings are configured via appsettings.json with environment variable overrides. See Configuration for all available options.

Environment Variables

Variable Default Description
HttpPort 5001 HTTP port (REST, Swagger, health)
GrpcPort 5002 gRPC port (native gRPC h2c)
DaprHttpPort 3500 Dapr sidecar HTTP port
DaprGrpcPort 50001 Dapr sidecar gRPC port
Logging__LogLevel__Default Information Minimum log level (env var override for Logging:LogLevel:Default)

Health Checks

The service exposes health check endpoints:

# HTTP/gRPC health check
curl http://localhost:5001/health

Monitoring

The service emits structured logs with OpenTelemetry trace context. Configure your observability backend in appsettings.json:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  }
}

Known Limitations

Dapr gRPC App Health Checks Not Supported

When using Dapr with app-protocol: grpc, the Dapr sidecar probes the application via the dapr.proto.runtime.v1.AppCallbackHealthCheck gRPC service. The Dapr .NET SDK does not currently provide a server-side implementation of this service. As a result, Dapr app health checks are disabled (dapr.io/enable-app-health-check: false).

Kubernetes liveness and readiness probes (/health endpoint) continue to handle pod health monitoring. Future improvement: implement the Dapr AppCallback gRPC service to enable Dapr's soft health check mechanism for pausing work delivery during unhealthy states.