Skip to content

Commit

Permalink
starting to work on Test DAPR integration and evaluate performance #8
Browse files Browse the repository at this point in the history
  • Loading branch information
macel94 committed Jan 19, 2024
1 parent 1e69bf4 commit 0a63fc7
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 11 deletions.
13 changes: 13 additions & 0 deletions src/.dapr/components/pubsub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: pubsub
namespace: pong
spec:
type: pubsub.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379
- name: redisPassword
value: ""
15 changes: 15 additions & 0 deletions src/.dapr/components/statestore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
namespace: pong
spec:
type: state.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379
- name: redisPassword
value: ""
- name: actorStateStore
value: "true"
10 changes: 10 additions & 0 deletions src/.dapr/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: config
namespace: pong
spec:
tracing:
samplingRate: "1"
zipkin:
endpointAddress: http://localhost:9411/api/v2/spans
35 changes: 29 additions & 6 deletions src/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ services:
- GameHubEndpoint=http://localhost:6351/gamehub
ports:
- "6350:8080"
# volumes:
# - ${APPDATA}/Microsoft/UserSecrets:/home/app/.microsoft/usersecrets:ro
depends_on:
- signalr

Expand All @@ -23,13 +21,24 @@ services:
- redis
- azuresql

signalr-dapr:
command: ["./daprd",
"-app-id", "signalr",
"-app-port", "8080",
"-components-path", "/components",
"-config", "/configuration/config.yaml"
]
volumes:
- "./.dapr/components/:/components"
- "./.dapr/:/configuration"
depends_on:
- signalr

redis:
image: "redis:latest"
ports:
- "6379:6379"

azuresql:
image: "mcr.microsoft.com/azure-sql-edge:latest"
volumes:
- ./Blazorpong.Database.AzureSql/Snapshots:/backup:ro
environment:
Expand All @@ -38,4 +47,18 @@ services:
- MSSQL_PID=Developer
- MSSQL_PACKAGE=/backup/v0.dacpac
ports:
- "1433:1433"
- "1433:1433"

dapr-dashboard:
command: [ "--docker-compose=true",
"--components-path=/home/nonroot/components",
"--config-path=/home/nonroot/configuration",
"--docker-compose-path=/home/nonroot/docker-compose.yml" ]
ports:
- "8080:8080"
volumes:
- "./.dapr/components/:/home/nonroot/components"
- "./.dapr/:/home/nonroot/configuration"
- ./docker-compose.yml:/home/nonroot/docker-compose.yml

# send logs to dapr and integrate opentelemetry with something like jaeger or zipkin or prometheus and grafana
15 changes: 10 additions & 5 deletions src/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ services:
build:
context: .
dockerfile: BlazorPong.Web/Server/Dockerfile

signalr:
image: ${DOCKER_REGISTRY-}blazorpongsignalr
build:
context: .
dockerfile: BlazorPong.SignalR/Dockerfile

signalr-dapr:
image: "daprio/daprd:latest"
depends_on:
- signalr

redis:
image: "redis:latest"

azuresql:
image: "mcr.microsoft.com/azure-sql-edge:latest"

# blazorpong.web.server.2:
# image: ${DOCKER_REGISTRY-}blazorpongwebserver
# build:
# context: .
# dockerfile: BlazorPong.Web/Server/Dockerfile
dapr-dashboard:
image: "daprio/dashboard:latest"

0 comments on commit 0a63fc7

Please sign in to comment.