From cf506e3cd2272683590f137d73b246978cebf49c Mon Sep 17 00:00:00 2001 From: iamshen Date: Wed, 29 May 2024 10:58:35 +0800 Subject: [PATCH 1/3] Change aspir8 outputFormat to docker compose and clear NuGet.Config --- NuGet.Config | 3 - .../aspirate-output/admin/deployment.yaml | 41 ----- .../aspirate-output/admin/kustomization.yaml | 18 -- .../aspirate-output/admin/service.yaml | 16 -- .../auth-admin/deployment.yaml | 41 ----- .../auth-admin/kustomization.yaml | 18 -- .../aspirate-output/auth-admin/service.yaml | 16 -- .../aspirate-output/auth-api/deployment.yaml | 41 ----- .../auth-api/kustomization.yaml | 18 -- .../aspirate-output/auth-api/service.yaml | 16 -- .../aspirate-output/auth-sts/deployment.yaml | 41 ----- .../auth-sts/kustomization.yaml | 18 -- .../aspirate-output/auth-sts/service.yaml | 16 -- .../aspirate-output/dashboard.yaml | 52 ------ .../aspirate-output/docker-compose.yaml | 174 ++++++++++++++++++ .../aspirate-output/kustomization.yaml | 17 -- .../aspirate-output/namespace.yaml | 4 - .../aspirate-output/order-api/deployment.yaml | 41 ----- .../order-api/kustomization.yaml | 18 -- .../aspirate-output/order-api/service.yaml | 16 -- .../proxy-monitor/deployment.yaml | 31 ---- .../proxy-monitor/kustomization.yaml | 18 -- .../proxy-monitor/service.yaml | 16 -- .../proxy-server/deployment.yaml | 31 ---- .../proxy-server/kustomization.yaml | 23 --- .../aspirate-output/proxy-server/service.yaml | 16 -- .../aspirate-state.json | 4 +- src/Web/WebAdmin/Program.cs | 1 + 28 files changed, 177 insertions(+), 588 deletions(-) delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/admin/deployment.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/admin/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/admin/service.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/deployment.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/service.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-api/deployment.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-api/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-api/service.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/deployment.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/service.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/dashboard.yaml create mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/namespace.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/order-api/deployment.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/order-api/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/order-api/service.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/deployment.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/service.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/deployment.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/kustomization.yaml delete mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/service.yaml diff --git a/NuGet.Config b/NuGet.Config index c4cf7bd..b142f6c 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -2,9 +2,6 @@ - - - \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/admin/deployment.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/admin/deployment.yaml deleted file mode 100644 index 1a45619..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/admin/deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: admin - labels: - app: admin - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: admin - dapr.io/enable-api-logging: 'true' -spec: - minReadySeconds: 60 - replicas: 1 - selector: - matchLabels: - app: admin - strategy: - type: Recreate - template: - metadata: - labels: - app: admin - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: admin - dapr.io/enable-api-logging: 'true' - spec: - containers: - - name: admin - image: registry.cn-shenzhen.aliyuncs.com/project-workspace/web-admin:1.0.5-alpha1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - - containerPort: 8443 - envFrom: - - configMapRef: - name: admin-env - terminationGracePeriodSeconds: 180 \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/admin/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/admin/kustomization.yaml deleted file mode 100644 index 5933d65..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/admin/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- name: admin-env - literals: - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=in_memory - - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true - - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire-dashboard:18889 - - OTEL_SERVICE_NAME=admin - - ASPNETCORE_URLS=http://+:8080; - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/admin/service.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/admin/service.yaml deleted file mode 100644 index 2b8ba15..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/admin/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: admin -spec: - type: ClusterIP - selector: - app: admin - ports: - - name: http - port: 51871 - targetPort: 8080 - - name: https - port: 8443 - targetPort: 8443 diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/deployment.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/deployment.yaml deleted file mode 100644 index 7d05837..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: auth-admin - labels: - app: auth-admin - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: auth-admin - dapr.io/enable-api-logging: 'true' -spec: - minReadySeconds: 60 - replicas: 1 - selector: - matchLabels: - app: auth-admin - strategy: - type: Recreate - template: - metadata: - labels: - app: auth-admin - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: auth-admin - dapr.io/enable-api-logging: 'true' - spec: - containers: - - name: auth-admin - image: registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-admin:1.0.5-alpha1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - - containerPort: 8443 - envFrom: - - configMapRef: - name: auth-admin-env - terminationGracePeriodSeconds: 180 \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/kustomization.yaml deleted file mode 100644 index 2a22d12..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- name: auth-admin-env - literals: - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=in_memory - - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true - - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire-dashboard:18889 - - OTEL_SERVICE_NAME=auth-admin - - ASPNETCORE_URLS=http://+:8080; - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/service.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/service.yaml deleted file mode 100644 index caa03a0..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-admin/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: auth-admin -spec: - type: ClusterIP - selector: - app: auth-admin - ports: - - name: http - port: 53871 - targetPort: 8080 - - name: https - port: 8443 - targetPort: 8443 diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/deployment.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/deployment.yaml deleted file mode 100644 index aec53fc..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: auth-api - labels: - app: auth-api - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: auth-api - dapr.io/enable-api-logging: 'true' -spec: - minReadySeconds: 60 - replicas: 1 - selector: - matchLabels: - app: auth-api - strategy: - type: Recreate - template: - metadata: - labels: - app: auth-api - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: auth-api - dapr.io/enable-api-logging: 'true' - spec: - containers: - - name: auth-api - image: registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-api:1.0.5-alpha1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - - containerPort: 8443 - envFrom: - - configMapRef: - name: auth-api-env - terminationGracePeriodSeconds: 180 \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/kustomization.yaml deleted file mode 100644 index 9b6b0fa..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- name: auth-api-env - literals: - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=in_memory - - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true - - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire-dashboard:18889 - - OTEL_SERVICE_NAME=auth-api - - ASPNETCORE_URLS=http://+:8080; - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/service.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/service.yaml deleted file mode 100644 index d6deea6..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-api/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: auth-api -spec: - type: ClusterIP - selector: - app: auth-api - ports: - - name: http - port: 54871 - targetPort: 8080 - - name: https - port: 8443 - targetPort: 8443 diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/deployment.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/deployment.yaml deleted file mode 100644 index f1c71f8..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: auth-sts - labels: - app: auth-sts - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: auth-sts - dapr.io/enable-api-logging: 'true' -spec: - minReadySeconds: 60 - replicas: 1 - selector: - matchLabels: - app: auth-sts - strategy: - type: Recreate - template: - metadata: - labels: - app: auth-sts - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: auth-sts - dapr.io/enable-api-logging: 'true' - spec: - containers: - - name: auth-sts - image: registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-sts:1.0.5-alpha1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - - containerPort: 8443 - envFrom: - - configMapRef: - name: auth-sts-env - terminationGracePeriodSeconds: 180 \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/kustomization.yaml deleted file mode 100644 index d8c748b..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- name: auth-sts-env - literals: - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=in_memory - - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true - - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire-dashboard:18889 - - OTEL_SERVICE_NAME=auth-sts - - ASPNETCORE_URLS=http://+:8080; - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/service.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/service.yaml deleted file mode 100644 index 32354fa..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/auth-sts/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: auth-sts -spec: - type: ClusterIP - selector: - app: auth-sts - ports: - - name: http - port: 52871 - targetPort: 8080 - - name: https - port: 8443 - targetPort: 8443 diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/dashboard.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/dashboard.yaml deleted file mode 100644 index 78c0a53..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/dashboard.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: aspire-dashboard - labels: - app: aspire-dashboard -spec: - replicas: 1 - selector: - matchLabels: - app: aspire-dashboard - template: - metadata: - labels: - app: aspire-dashboard - spec: - terminationGracePeriodSeconds: 30 - containers: - - name: aspire-dashboard - image: mcr.microsoft.com/dotnet/aspire-dashboard:8.0 - resources: - requests: - cpu: "500m" - memory: "512Mi" - limits: - memory: "512Mi" - ports: - - name: dashboard-ui - containerPort: 18888 - - name: otlp - containerPort: 18889 - env: - - name: DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS - value: "true" ---- -apiVersion: v1 -kind: Service -metadata: - name: aspire-dashboard -spec: - selector: - app: aspire-dashboard - ports: - - name: dashboard-ui - protocol: TCP - port: 18888 - targetPort: 18888 - - name: otlp - protocol: TCP - port: 18889 - targetPort: 18889 - type: ClusterIP \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml new file mode 100644 index 0000000..4a69854 --- /dev/null +++ b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml @@ -0,0 +1,174 @@ +services: + aspire-dashboard: + container_name: "aspire-dashboard" + image: "mcr.microsoft.com/dotnet/aspire-dashboard:8.0" + environment: + DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS: "true" + ASPIRE_ALLOW_UNSECURED_TRANSPORT: "true" + DASHBOARD__OTLP__AUTHMODE: "ApiKey" + DASHBOARD__OTLP__PRIMARYAPIKEY: "8A7EF26BA0DC22D4FBFEC5CEAB178478" + ports: + - target: 18888 + published: 18888 + restart: unless-stopped + admin: + container_name: "admin" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/web-admin:1.0.6-alpha1" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_SERVICE_NAME: "admin" + ports: + - target: 8080 + published: 10000 + - target: 8443 + published: 10001 + restart: unless-stopped + admin-dapr: + network_mode: "service:admin" + image: "daprio/daprd:latest" + command: + - "./daprd" + - "-app-id" + - "admin" + - "-app-port" + - "51871" + restart: unless-stopped + depends_on: + - "admin" + auth-sts: + container_name: "auth-sts" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-sts:1.0.6-alpha1" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_SERVICE_NAME: "auth-sts" + ports: + - target: 8080 + published: 10002 + - target: 8443 + published: 10003 + restart: unless-stopped + auth-sts-dapr: + network_mode: "service:auth-sts" + image: "daprio/daprd:latest" + command: + - "./daprd" + - "-app-id" + - "auth-sts" + - "-app-port" + - "52871" + restart: unless-stopped + depends_on: + - "auth-sts" + auth-admin: + container_name: "auth-admin" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-admin:1.0.6-alpha1" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_SERVICE_NAME: "auth-admin" + ports: + - target: 8080 + published: 10004 + - target: 8443 + published: 10005 + restart: unless-stopped + auth-admin-dapr: + network_mode: "service:auth-admin" + image: "daprio/daprd:latest" + command: + - "./daprd" + - "-app-id" + - "auth-admin" + - "-app-port" + - "53871" + restart: unless-stopped + depends_on: + - "auth-admin" + auth-api: + container_name: "auth-api" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-api:1.0.6-alpha1" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_SERVICE_NAME: "auth-api" + ports: + - target: 8080 + published: 10006 + - target: 8443 + published: 10007 + restart: unless-stopped + auth-api-dapr: + network_mode: "service:auth-api" + image: "daprio/daprd:latest" + command: + - "./daprd" + - "-app-id" + - "auth-api" + - "-app-port" + - "54871" + restart: unless-stopped + depends_on: + - "auth-api" + order-api: + container_name: "order-api" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/order-api:1.0.6-alpha1" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_SERVICE_NAME: "order-api" + ports: + - target: 8080 + published: 10008 + - target: 8443 + published: 10009 + restart: unless-stopped + order-api-dapr: + network_mode: "service:order-api" + image: "daprio/daprd:latest" + command: + - "./daprd" + - "-app-id" + - "order-api" + - "-app-port" + - "31441" + restart: unless-stopped + depends_on: + - "order-api" + proxy-server: + container_name: "proxy-server" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/proxy-server:1.0.6-alpha1" + environment: + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" + OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" + ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" + services__admin__http__0: "http://admin:8080" + services__auth-admin__http__0: "http://auth-admin:8080" + services__auth-sts__http__0: "http://auth-sts:8080" + services__auth-api__http__0: "http://auth-api:8080" + services__order-api__http__0: "http://order-api:8080" + OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" + OTEL_SERVICE_NAME: "proxy-server" + ports: + - target: 8080 + published: 10010 + - target: 8443 + published: 10011 + restart: unless-stopped diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/kustomization.yaml deleted file mode 100644 index 3f3ba56..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/kustomization.yaml +++ /dev/null @@ -1,17 +0,0 @@ -namespace: dapr-playground - -resources: -- admin -- auth-sts -- auth-admin -- auth-api -- order-api -- proxy-monitor -- proxy-server -- namespace.yaml -- dashboard.yaml - -generatorOptions: - disableNameSuffixHash: true - - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/namespace.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/namespace.yaml deleted file mode 100644 index cd0442d..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: dapr-playground \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/order-api/deployment.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/order-api/deployment.yaml deleted file mode 100644 index 69db7c1..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/order-api/deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: order-api - labels: - app: order-api - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: order-api - dapr.io/enable-api-logging: 'true' -spec: - minReadySeconds: 60 - replicas: 1 - selector: - matchLabels: - app: order-api - strategy: - type: Recreate - template: - metadata: - labels: - app: order-api - annotations: - dapr.io/enabled: 'true' - dapr.io/config: tracing - dapr.io/app-id: order-api - dapr.io/enable-api-logging: 'true' - spec: - containers: - - name: order-api - image: registry.cn-shenzhen.aliyuncs.com/project-workspace/order-api:1.0.5-alpha1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - - containerPort: 8443 - envFrom: - - configMapRef: - name: order-api-env - terminationGracePeriodSeconds: 180 \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/order-api/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/order-api/kustomization.yaml deleted file mode 100644 index 0af8212..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/order-api/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- name: order-api-env - literals: - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=in_memory - - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true - - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire-dashboard:18889 - - OTEL_SERVICE_NAME=order-api - - ASPNETCORE_URLS=http://+:8080; - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/order-api/service.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/order-api/service.yaml deleted file mode 100644 index 5d5aea3..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/order-api/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: order-api -spec: - type: ClusterIP - selector: - app: order-api - ports: - - name: http - port: 31441 - targetPort: 8080 - - name: https - port: 8443 - targetPort: 8443 diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/deployment.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/deployment.yaml deleted file mode 100644 index 7cb9ad3..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/deployment.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: proxy-monitor - labels: - app: proxy-monitor -spec: - minReadySeconds: 60 - replicas: 1 - selector: - matchLabels: - app: proxy-monitor - strategy: - type: Recreate - template: - metadata: - labels: - app: proxy-monitor - spec: - containers: - - name: proxy-monitor - image: registry.cn-shenzhen.aliyuncs.com/project-workspace/proxy-monitor:1.0.5-alpha1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - - containerPort: 8443 - envFrom: - - configMapRef: - name: proxy-monitor-env - terminationGracePeriodSeconds: 180 \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/kustomization.yaml deleted file mode 100644 index 7eda7cf..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- name: proxy-monitor-env - literals: - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=in_memory - - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true - - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire-dashboard:18889 - - OTEL_SERVICE_NAME=proxy-monitor - - ASPNETCORE_URLS=http://+:8080; - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/service.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/service.yaml deleted file mode 100644 index b98f60e..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-monitor/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: proxy-monitor -spec: - type: ClusterIP - selector: - app: proxy-monitor - ports: - - name: http - port: 44430 - targetPort: 8080 - - name: https - port: 8443 - targetPort: 8443 diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/deployment.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/deployment.yaml deleted file mode 100644 index df0a426..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/deployment.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: proxy-server - labels: - app: proxy-server -spec: - minReadySeconds: 60 - replicas: 1 - selector: - matchLabels: - app: proxy-server - strategy: - type: Recreate - template: - metadata: - labels: - app: proxy-server - spec: - containers: - - name: proxy-server - image: registry.cn-shenzhen.aliyuncs.com/project-workspace/proxy-server:1.0.5-alpha1 - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - - containerPort: 8443 - envFrom: - - configMapRef: - name: proxy-server-env - terminationGracePeriodSeconds: 180 \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/kustomization.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/kustomization.yaml deleted file mode 100644 index be37258..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/kustomization.yaml +++ /dev/null @@ -1,23 +0,0 @@ -resources: -- deployment.yaml -- service.yaml - -generatorOptions: - disableNameSuffixHash: true - -configMapGenerator: -- name: proxy-server-env - literals: - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES=true - - OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY=in_memory - - ASPNETCORE_FORWARDEDHEADERS_ENABLED=true - - services__admin__http__0=http://admin:8080 - - services__auth-admin__http__0=http://auth-admin:8080 - - services__auth-sts__http__0=http://auth-sts:8080 - - services__auth-api__http__0=http://auth-api:8080 - - services__order-api__http__0=http://order-api:8080 - - OTEL_EXPORTER_OTLP_ENDPOINT=http://aspire-dashboard:18889 - - OTEL_SERVICE_NAME=proxy-server - - ASPNETCORE_URLS=http://+:8080; - diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/service.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/service.yaml deleted file mode 100644 index 222329f..0000000 --- a/build/DaprTool.Solution.AppHost/aspirate-output/proxy-server/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: proxy-server -spec: - type: ClusterIP - selector: - app: proxy-server - ports: - - name: http - port: 8080 - targetPort: 8080 - - name: https - port: 8443 - targetPort: 8443 diff --git a/build/DaprTool.Solution.AppHost/aspirate-state.json b/build/DaprTool.Solution.AppHost/aspirate-state.json index db47f1f..45a3d47 100644 --- a/build/DaprTool.Solution.AppHost/aspirate-state.json +++ b/build/DaprTool.Solution.AppHost/aspirate-state.json @@ -4,13 +4,13 @@ "namespace": "dapr-playground", "containerRegistry": "registry.cn-shenzhen.aliyuncs.com", "containerImageTags": [ - "1.0.5-alpha1", + "1.0.6-alpha1", "latest" ], "imagePullPolicy": "IfNotPresent", "containerBuilder": "docker", "containerRepositoryPrefix": "project-workspace", - "outputFormat": "kustomize", + "outputFormat": "compose", "skipFinalKustomizeGeneration": false, "privateRegistryEmail": "aspir8@aka.ms", "includeDashboard": true, diff --git a/src/Web/WebAdmin/Program.cs b/src/Web/WebAdmin/Program.cs index f95acbb..4940606 100644 --- a/src/Web/WebAdmin/Program.cs +++ b/src/Web/WebAdmin/Program.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.HttpOverrides; using Microsoft.FluentUI.AspNetCore.Components; using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Tokens; +using OpenTelemetry.Exporter; using WebAdmin.Components; using WebAdmin.Plumbing; using WebAdmin.Shared.Configurations; -- Gitee From bf6a33ab410af5b121ab14907b31a6a053f35400 Mon Sep 17 00:00:00 2001 From: iamshen Date: Tue, 4 Jun 2024 16:02:36 +0800 Subject: [PATCH 2/3] Update Docker compose config --- DaprTool.Solution.sln.DotSettings | 1 + Directory.Packages.props | 4 +- build/DaprTool.Solution.AppHost/Program.cs | 38 +++++----- .../Properties/launchSettings.json | 7 +- .../aspirate-output/docker-compose.yaml | 41 +++++----- .../aspirate-state.json | 2 +- build/DaprTool.Solution.AppHost/aspirate.json | 1 + build/DaprTool.Solution.AppHost/manifest.json | 76 +++++++------------ .../Utils/Constant/Constants.cs | 16 ++-- src/BuildingBlocks/Utils/Utils.xml | 6 +- .../Properties/launchSettings.json | 13 +++- .../Properties/launchSettings.json | 12 ++- .../src/Idsrv4.Admin/Idsrv4.Admin.csproj | 2 +- .../Properties/launchSettings.json | 12 ++- src/ProxyServer/Program.cs | 1 - .../Properties/launchSettings.json | 11 ++- .../Properties/launchSettings.json | 15 +++- .../Ordering.Api/appsettings.json | 6 +- src/Web/WebAdmin/Program.cs | 6 -- .../WebAdmin/Properties/launchSettings.json | 11 ++- src/Web/WebAdmin/WebAdmin.csproj | 6 -- 21 files changed, 155 insertions(+), 132 deletions(-) diff --git a/DaprTool.Solution.sln.DotSettings b/DaprTool.Solution.sln.DotSettings index 1066fd9..b73a902 100644 --- a/DaprTool.Solution.sln.DotSettings +++ b/DaprTool.Solution.sln.DotSettings @@ -1,4 +1,5 @@  + True True True True diff --git a/Directory.Packages.props b/Directory.Packages.props index 46c9520..7619a56 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -123,8 +123,8 @@ - - + + diff --git a/build/DaprTool.Solution.AppHost/Program.cs b/build/DaprTool.Solution.AppHost/Program.cs index 328e891..19e3b9e 100644 --- a/build/DaprTool.Solution.AppHost/Program.cs +++ b/build/DaprTool.Solution.AppHost/Program.cs @@ -1,41 +1,41 @@ using DaprTool.BuildingBlocks.Utils.Constant; using Microsoft.Extensions.DependencyInjection; +using Projects; var builder = DistributedApplication.CreateBuilder(args); builder.Services.AddProblemDetails(); -// web admin -var webAdmin = builder.AddProject(Constants.WebAdmin.AppId) +var webAdmin = builder.AddProject(Constants.WebAdmin.AppId) .WithDaprSidecar(Constants.WebAdmin.GetSideCarOptions()) - .WithHttpEndpoint(port: Constants.WebAdmin.ResourceHttpPort); + .WithExternalHttpEndpoints(); -// auth-server -var authSts = builder.AddProject(Constants.AuthSts.AppId) +var authSts = builder.AddProject(Constants.AuthSts.AppId) .WithDaprSidecar(Constants.AuthSts.GetSideCarOptions()) - .WithHttpEndpoint(port: Constants.AuthSts.ResourceHttpPort); + .WithExternalHttpEndpoints(); -var authAdmin = builder.AddProject(Constants.AuthAdmin.AppId) +var authAdmin = builder.AddProject(Constants.AuthAdmin.AppId) .WithDaprSidecar(Constants.AuthAdmin.GetSideCarOptions()) - .WithHttpEndpoint(port: Constants.AuthAdmin.ResourceHttpPort); + .WithExternalHttpEndpoints(); -var authApi = builder.AddProject(Constants.AuthApi.AppId) +var authApi = builder.AddProject(Constants.AuthApi.AppId) .WithDaprSidecar(Constants.AuthApi.GetSideCarOptions()) - .WithHttpEndpoint(port: Constants.AuthApi.ResourceHttpPort); + .WithExternalHttpEndpoints(); // api services -var orderApi = builder.AddProject(Constants.Ordering.AppId) +var orderApi = builder.AddProject(Constants.Ordering.AppId) .WithDaprSidecar(Constants.Ordering.GetSideCarOptions()) - .WithHttpEndpoint(port: Constants.Ordering.ResourceHttpPort); + .WithExternalHttpEndpoints(); // proxy server -builder.AddProject(Constants.ProxyServer.AppId) - .WithReference(webAdmin) - .WithReference(authAdmin) - .WithReference(authSts) - .WithReference(authApi) - .WithReference(orderApi); +builder.AddProject(Constants.ProxyServer.AppId) + .WithReference(webAdmin) + .WithReference(authAdmin) + .WithReference(authSts) + .WithReference(authApi) + .WithReference(orderApi) + .WithExternalHttpEndpoints(); var app = builder.Build(); -app.Run(); +app.Run(); \ No newline at end of file diff --git a/build/DaprTool.Solution.AppHost/Properties/launchSettings.json b/build/DaprTool.Solution.AppHost/Properties/launchSettings.json index b916666..b8e2591 100644 --- a/build/DaprTool.Solution.AppHost/Properties/launchSettings.json +++ b/build/DaprTool.Solution.AppHost/Properties/launchSettings.json @@ -10,7 +10,8 @@ "ASPNETCORE_ENVIRONMENT": "Development", "DOTNET_ENVIRONMENT": "Development", "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21298", - "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22061" + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22061", + "DOTNET_ASPIRE_SHOW_DASHBOARD_RESOURCES": "true" } }, "http": { @@ -22,7 +23,9 @@ "ASPNETCORE_ENVIRONMENT": "Development", "DOTNET_ENVIRONMENT": "Development", "DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19293", - "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20129" + "DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20129", + "DOTNET_ASPIRE_SHOW_DASHBOARD_RESOURCES": "true", + "ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true" } } } diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml index 4a69854..788efa4 100644 --- a/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml +++ b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml @@ -4,16 +4,13 @@ services: image: "mcr.microsoft.com/dotnet/aspire-dashboard:8.0" environment: DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS: "true" - ASPIRE_ALLOW_UNSECURED_TRANSPORT: "true" - DASHBOARD__OTLP__AUTHMODE: "ApiKey" - DASHBOARD__OTLP__PRIMARYAPIKEY: "8A7EF26BA0DC22D4FBFEC5CEAB178478" ports: - target: 18888 published: 18888 restart: unless-stopped admin: container_name: "admin" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/web-admin:1.0.6-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/web-admin:1.0.10-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -35,13 +32,13 @@ services: - "-app-id" - "admin" - "-app-port" - - "51871" + - "8080" restart: unless-stopped depends_on: - "admin" auth-sts: container_name: "auth-sts" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-sts:1.0.6-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-sts:1.0.10-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -63,13 +60,13 @@ services: - "-app-id" - "auth-sts" - "-app-port" - - "52871" + - "8080" restart: unless-stopped depends_on: - "auth-sts" auth-admin: container_name: "auth-admin" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-admin:1.0.6-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-admin:1.0.10-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -91,13 +88,13 @@ services: - "-app-id" - "auth-admin" - "-app-port" - - "53871" + - "8080" restart: unless-stopped depends_on: - "auth-admin" auth-api: container_name: "auth-api" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-api:1.0.6-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-api:1.0.10-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -119,41 +116,41 @@ services: - "-app-id" - "auth-api" - "-app-port" - - "54871" + - "8080" restart: unless-stopped depends_on: - "auth-api" - order-api: - container_name: "order-api" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/order-api:1.0.6-alpha1" + order: + container_name: "order" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/order-api:1.0.10-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY: "in_memory" ASPNETCORE_FORWARDEDHEADERS_ENABLED: "true" OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" - OTEL_SERVICE_NAME: "order-api" + OTEL_SERVICE_NAME: "order" ports: - target: 8080 published: 10008 - target: 8443 published: 10009 restart: unless-stopped - order-api-dapr: - network_mode: "service:order-api" + order-dapr: + network_mode: "service:order" image: "daprio/daprd:latest" command: - "./daprd" - "-app-id" - - "order-api" + - "order" - "-app-port" - - "31441" + - "8080" restart: unless-stopped depends_on: - - "order-api" + - "order" proxy-server: container_name: "proxy-server" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/proxy-server:1.0.6-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/proxy-server:1.0.10-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -163,7 +160,7 @@ services: services__auth-admin__http__0: "http://auth-admin:8080" services__auth-sts__http__0: "http://auth-sts:8080" services__auth-api__http__0: "http://auth-api:8080" - services__order-api__http__0: "http://order-api:8080" + services__order__http__0: "http://order:8080" OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:18889" OTEL_SERVICE_NAME: "proxy-server" ports: diff --git a/build/DaprTool.Solution.AppHost/aspirate-state.json b/build/DaprTool.Solution.AppHost/aspirate-state.json index 45a3d47..b16280e 100644 --- a/build/DaprTool.Solution.AppHost/aspirate-state.json +++ b/build/DaprTool.Solution.AppHost/aspirate-state.json @@ -4,7 +4,7 @@ "namespace": "dapr-playground", "containerRegistry": "registry.cn-shenzhen.aliyuncs.com", "containerImageTags": [ - "1.0.6-alpha1", + "1.0.11-alpha1", "latest" ], "imagePullPolicy": "IfNotPresent", diff --git a/build/DaprTool.Solution.AppHost/aspirate.json b/build/DaprTool.Solution.AppHost/aspirate.json index 55d43af..a964fe5 100644 --- a/build/DaprTool.Solution.AppHost/aspirate.json +++ b/build/DaprTool.Solution.AppHost/aspirate.json @@ -4,6 +4,7 @@ "Registry": "registry.cn-shenzhen.aliyuncs.com", "RepositoryPrefix": "project-workspace", "Tags": [ + "1.0.7-alpha1", "latest" ], "Builder": "docker" diff --git a/build/DaprTool.Solution.AppHost/manifest.json b/build/DaprTool.Solution.AppHost/manifest.json index 5ee701a..f742026 100644 --- a/build/DaprTool.Solution.AppHost/manifest.json +++ b/build/DaprTool.Solution.AppHost/manifest.json @@ -13,18 +13,14 @@ "http": { "scheme": "http", "protocol": "tcp", - "transport": "http" + "transport": "http", + "external": true }, "https": { "scheme": "https", "protocol": "tcp", - "transport": "http" - }, - "http": { - "scheme": "http", - "protocol": "tcp", "transport": "http", - "port": 51871 + "external": true } } }, @@ -34,7 +30,7 @@ "application": "admin", "appId": "admin", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12010, + "daprHttpPort": 12040, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" @@ -54,18 +50,14 @@ "http": { "scheme": "http", "protocol": "tcp", - "transport": "http" + "transport": "http", + "external": true }, "https": { "scheme": "https", "protocol": "tcp", - "transport": "http" - }, - "http": { - "scheme": "http", - "protocol": "tcp", "transport": "http", - "port": 52871 + "external": true } } }, @@ -75,7 +67,7 @@ "application": "auth-sts", "appId": "auth-sts", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12020, + "daprHttpPort": 12030, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" @@ -95,18 +87,14 @@ "http": { "scheme": "http", "protocol": "tcp", - "transport": "http" + "transport": "http", + "external": true }, "https": { "scheme": "https", "protocol": "tcp", - "transport": "http" - }, - "http": { - "scheme": "http", - "protocol": "tcp", "transport": "http", - "port": 53871 + "external": true } } }, @@ -116,7 +104,7 @@ "application": "auth-admin", "appId": "auth-admin", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12030, + "daprHttpPort": 12010, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" @@ -136,18 +124,14 @@ "http": { "scheme": "http", "protocol": "tcp", - "transport": "http" + "transport": "http", + "external": true }, "https": { "scheme": "https", "protocol": "tcp", - "transport": "http" - }, - "http": { - "scheme": "http", - "protocol": "tcp", "transport": "http", - "port": 54871 + "external": true } } }, @@ -157,14 +141,14 @@ "application": "auth-api", "appId": "auth-api", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12040, + "daprHttpPort": 12020, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" ] } }, - "order-api": { + "order": { "type": "project.v0", "path": "../../src/Services/Ordering/Presentation/Ordering.Api/Ordering.Api.csproj", "env": { @@ -177,26 +161,22 @@ "http": { "scheme": "http", "protocol": "tcp", - "transport": "http" + "transport": "http", + "external": true }, "https": { "scheme": "https", "protocol": "tcp", - "transport": "http" - }, - "http": { - "scheme": "http", - "protocol": "tcp", "transport": "http", - "port": 31441 + "external": true } } }, - "order-api-dapr": { + "order-dapr": { "type": "dapr.v0", "dapr": { - "application": "order-api", - "appId": "order-api", + "application": "order", + "appId": "order", "daprHttpMaxRequestSize": 60, "daprHttpPort": 12050, "daprHttpReadBufferSize": 128, @@ -221,19 +201,21 @@ "services__auth-sts__https__0": "{auth-sts.bindings.https.url}", "services__auth-api__http__0": "{auth-api.bindings.http.url}", "services__auth-api__https__0": "{auth-api.bindings.https.url}", - "services__order-api__http__0": "{order-api.bindings.http.url}", - "services__order-api__https__0": "{order-api.bindings.https.url}" + "services__order__http__0": "{order.bindings.http.url}", + "services__order__https__0": "{order.bindings.https.url}" }, "bindings": { "http": { "scheme": "http", "protocol": "tcp", - "transport": "http" + "transport": "http", + "external": true }, "https": { "scheme": "https", "protocol": "tcp", - "transport": "http" + "transport": "http", + "external": true } } } diff --git a/src/BuildingBlocks/Utils/Constant/Constants.cs b/src/BuildingBlocks/Utils/Constant/Constants.cs index 9c52cc9..f8f292a 100644 --- a/src/BuildingBlocks/Utils/Constant/Constants.cs +++ b/src/BuildingBlocks/Utils/Constant/Constants.cs @@ -26,21 +26,21 @@ public static class Constants /// public const string DaprServiceInvocation = "/v1.0/invoke/{0}/method{1}"; /// - public static DaprApp ProxyServer = new("proxy-server", 12001, 44440, 44444); + public static DaprApp ProxyServer = new("proxy-server", 12000, 55444, 44444); /// - public static DaprApp WebAdmin = new("admin", 12010, 51871, 7273, "/admin"); + public static DaprApp AuthAdmin = new("auth-admin", 12010, 55303, 44303, "/auth/admin", 90); /// - public static DaprApp AuthAdmin = new("auth-admin", 12030, 53871, 44303, "/auth/admin", 90); + public static DaprApp AuthApi = new("auth-api", 12020, 55302, 44302, "/api/auth", 95); /// - public static DaprApp AuthApi = new("auth-api", 12040, 54871, 44302, "/api/auth", 95); + public static DaprApp AuthSts = new("auth-sts", 12030, 55310, 44310, "/auth"); /// - public static DaprApp AuthSts = new("auth-sts", 12020, 52871, 44310, "/auth"); + public static DaprApp WebAdmin = new("admin", 12040, 55510, 44510, "/admin"); /// - public static DaprApp Ordering = new("order-api", 12050, 31441, 5510); + public static DaprApp Ordering = new("order", 12050, 55610, 44610); /// - public static DaprApp Identity = new("identity-api", 12060, 32441, 5520); + public static DaprApp Identity = new("identity", 12060, 55620, 44620); /// - public static DaprApp Catalog = new("catalog-api", 12070, 33441, 5530); + public static DaprApp Catalog = new("catalog", 12070, 55630, 44630); /// /// api 服务应用 ,Yarp 转发到 dapr cli 通过 dapr service invoke 调用 应用服务 diff --git a/src/BuildingBlocks/Utils/Utils.xml b/src/BuildingBlocks/Utils/Utils.xml index 953903c..d308da7 100644 --- a/src/BuildingBlocks/Utils/Utils.xml +++ b/src/BuildingBlocks/Utils/Utils.xml @@ -50,9 +50,6 @@ - - - @@ -62,6 +59,9 @@ + + + diff --git a/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json b/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json index 8eb5998..9382915 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json @@ -1,14 +1,23 @@ { "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { + "http": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:55302", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, "https": { "commandName": "Project", "launchBrowser": true, "launchUrl": "swagger", + "applicationUrl": "https://localhost:44302;http://localhost:55302", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:44302" + } } } } \ No newline at end of file diff --git a/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json b/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json index 75510af..efe90e3 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json @@ -1,12 +1,20 @@ { "profiles": { + "http": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "http://localhost:55310", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, "https": { "commandName": "Project", "launchBrowser": true, + "applicationUrl": "https://localhost:44310;http://localhost:55310", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:44310" + } } } } \ No newline at end of file diff --git a/src/IdentityServer4/src/Idsrv4.Admin/Idsrv4.Admin.csproj b/src/IdentityServer4/src/Idsrv4.Admin/Idsrv4.Admin.csproj index 589576c..a4f06eb 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin/Idsrv4.Admin.csproj +++ b/src/IdentityServer4/src/Idsrv4.Admin/Idsrv4.Admin.csproj @@ -36,7 +36,7 @@ - + diff --git a/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json b/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json index 0b02cb6..d5a5b3d 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json @@ -1,12 +1,20 @@ { "profiles": { + "http": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "http://localhost:55303", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, "https": { "commandName": "Project", "launchBrowser": true, + "applicationUrl": "https://localhost:44303;http://localhost:55303", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - }, - "applicationUrl": "https://localhost:44303" + } } } } \ No newline at end of file diff --git a/src/ProxyServer/Program.cs b/src/ProxyServer/Program.cs index 08821d9..d24e113 100644 --- a/src/ProxyServer/Program.cs +++ b/src/ProxyServer/Program.cs @@ -34,7 +34,6 @@ var app = builder.Build(); app.UseMiddleware(); app.UseWebSockets(); -app.UseStaticFiles(); app.UseRouting(); app.UseAntiforgery(); app.MapDefaultEndpoints(); diff --git a/src/ProxyServer/Properties/launchSettings.json b/src/ProxyServer/Properties/launchSettings.json index 0d382ec..c2bf168 100644 --- a/src/ProxyServer/Properties/launchSettings.json +++ b/src/ProxyServer/Properties/launchSettings.json @@ -1,11 +1,20 @@ { "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:55444", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, "https": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "applicationUrl": "https://localhost:44444", + "applicationUrl": "https://localhost:44444;http://localhost:55444", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json b/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json index bc0a7ac..f75ba6b 100644 --- a/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json +++ b/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json @@ -1,13 +1,22 @@ { "profiles": { - "https": { + "http": { "commandName": "Project", "launchBrowser": true, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:55610", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - }, + } + }, + "https": { + "commandName": "Project", + "launchBrowser": true, "dotnetRunMessages": true, - "applicationUrl": "https://localhost:5510" + "applicationUrl": "https://localhost:44610;http://localhost:55610", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } } } } \ No newline at end of file diff --git a/src/Services/Ordering/Presentation/Ordering.Api/appsettings.json b/src/Services/Ordering/Presentation/Ordering.Api/appsettings.json index 57f2811..27c7d85 100644 --- a/src/Services/Ordering/Presentation/Ordering.Api/appsettings.json +++ b/src/Services/Ordering/Presentation/Ordering.Api/appsettings.json @@ -10,9 +10,9 @@ } }, "ConnectionStrings": { - "catalog-api": "Server=192.168.8.112;Port=5432;Database=dapr_catalog;User Id=dapr;Password=Local@Db;Pooling=true;MaxPoolSize=100;", - "identity-api": "Server=192.168.8.112;Port=5432;Database=dapr_identity;User Id=dapr;Password=Local@Db;Pooling=true;MaxPoolSize=100;", - "order-api": "Server=192.168.8.112;Port=5432;Database=dapr_ordering;User Id=dapr;Password=Local@Db;Pooling=true;MaxPoolSize=100;" + "catalog": "Server=192.168.8.112;Port=5432;Database=dapr_catalog;User Id=dapr;Password=Local@Db;Pooling=true;MaxPoolSize=100;", + "identity": "Server=192.168.8.112;Port=5432;Database=dapr_identity;User Id=dapr;Password=Local@Db;Pooling=true;MaxPoolSize=100;", + "order": "Server=192.168.8.112;Port=5432;Database=dapr_ordering;User Id=dapr;Password=Local@Db;Pooling=true;MaxPoolSize=100;" }, "AllowedHosts": "*", "GracePeriodTime": "1", diff --git a/src/Web/WebAdmin/Program.cs b/src/Web/WebAdmin/Program.cs index 4940606..5addc89 100644 --- a/src/Web/WebAdmin/Program.cs +++ b/src/Web/WebAdmin/Program.cs @@ -7,7 +7,6 @@ using Microsoft.AspNetCore.HttpOverrides; using Microsoft.FluentUI.AspNetCore.Components; using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Tokens; -using OpenTelemetry.Exporter; using WebAdmin.Components; using WebAdmin.Plumbing; using WebAdmin.Shared.Configurations; @@ -151,11 +150,6 @@ forwardingOptions.KnownProxies.Clear(); app.UseForwardedHeaders(forwardingOptions); -app.UseXXssProtection(options => options.EnabledWithBlockMode()); -app.UseXContentTypeOptions(); -app.UseXfo(options => options.SameOrigin()); -app.UseReferrerPolicy(options => options.NoReferrer()); - #endregion app.UseStaticFiles(); diff --git a/src/Web/WebAdmin/Properties/launchSettings.json b/src/Web/WebAdmin/Properties/launchSettings.json index 543b23e..8654f6c 100644 --- a/src/Web/WebAdmin/Properties/launchSettings.json +++ b/src/Web/WebAdmin/Properties/launchSettings.json @@ -1,12 +1,21 @@ { "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "http://localhost:55510", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, "https": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:7273", + "applicationUrl": "https://localhost:44510;http://localhost:55510", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/Web/WebAdmin/WebAdmin.csproj b/src/Web/WebAdmin/WebAdmin.csproj index dbc7198..bb8a14b 100644 --- a/src/Web/WebAdmin/WebAdmin.csproj +++ b/src/Web/WebAdmin/WebAdmin.csproj @@ -12,7 +12,6 @@ - @@ -20,9 +19,4 @@ - - - Designer - - -- Gitee From 86363f6273ca7a2b7409cfa047a779d6ce5ca205 Mon Sep 17 00:00:00 2001 From: iamshen Date: Thu, 6 Jun 2024 14:10:49 +0800 Subject: [PATCH 3/3] Update App service's port --- Directory.Packages.props | 12 +-- build/DaprTool.Solution.AppHost/Program.cs | 12 +-- .../docker-compose.override.yaml | 84 +++++++++++++++++++ .../aspirate-output/docker-compose.yaml | 12 +-- .../aspirate-state.json | 2 +- build/DaprTool.Solution.AppHost/manifest.json | 10 +-- .../Extensions.cs | 7 ++ build/aspirate-state.json | 15 ++++ .../Utils/Constant/Constants.cs | 18 ++-- src/BuildingBlocks/Utils/Utils.xml | 12 +-- .../Utils/ValueObjects/DaprApp.cs | 2 +- .../Properties/launchSettings.json | 4 +- .../src/Idsrv4.Admin.Api/appsettings.json | 4 +- .../Properties/launchSettings.json | 4 +- .../appsettings.json | 2 +- .../Properties/launchSettings.json | 4 +- .../src/Idsrv4.Admin/appsettings.json | 2 +- .../Properties/launchSettings.json | 4 +- ...ReverseProxyServiceCollectionExtensions.cs | 3 +- .../Properties/launchSettings.json | 4 +- src/Web/WebAdmin/Program.cs | 12 ++- .../WebAdmin/Properties/launchSettings.json | 20 ++--- src/Web/WebAdmin/WebAdmin.csproj | 2 +- src/Web/WebAdmin/appsettings.Development.json | 4 +- 24 files changed, 182 insertions(+), 73 deletions(-) create mode 100644 build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.override.yaml create mode 100644 build/aspirate-state.json diff --git a/Directory.Packages.props b/Directory.Packages.props index 7619a56..a64a94d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -68,7 +68,7 @@ - + @@ -123,20 +123,20 @@ - - + + - - + + - + diff --git a/build/DaprTool.Solution.AppHost/Program.cs b/build/DaprTool.Solution.AppHost/Program.cs index 19e3b9e..a625615 100644 --- a/build/DaprTool.Solution.AppHost/Program.cs +++ b/build/DaprTool.Solution.AppHost/Program.cs @@ -6,10 +6,6 @@ var builder = DistributedApplication.CreateBuilder(args); builder.Services.AddProblemDetails(); -var webAdmin = builder.AddProject(Constants.WebAdmin.AppId) - .WithDaprSidecar(Constants.WebAdmin.GetSideCarOptions()) - .WithExternalHttpEndpoints(); - var authSts = builder.AddProject(Constants.AuthSts.AppId) .WithDaprSidecar(Constants.AuthSts.GetSideCarOptions()) .WithExternalHttpEndpoints(); @@ -22,12 +18,16 @@ var authApi = builder.AddProject(Constants.AuthApi.AppId) .WithDaprSidecar(Constants.AuthApi.GetSideCarOptions()) .WithExternalHttpEndpoints(); -// api services +var webAdmin = builder.AddProject(Constants.WebAdmin.AppId) + .WithDaprSidecar(Constants.WebAdmin.GetSideCarOptions()) + .WithReference(authSts) + .WithReference(authApi) + .WithExternalHttpEndpoints(); + var orderApi = builder.AddProject(Constants.Ordering.AppId) .WithDaprSidecar(Constants.Ordering.GetSideCarOptions()) .WithExternalHttpEndpoints(); -// proxy server builder.AddProject(Constants.ProxyServer.AppId) .WithReference(webAdmin) .WithReference(authAdmin) diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.override.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.override.yaml new file mode 100644 index 0000000..9cd5771 --- /dev/null +++ b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.override.yaml @@ -0,0 +1,84 @@ +version: '3.8' + +services: + admin: + ports: + - target: 8080 + published: 24401 + - target: 8443 + published: 25501 + + admin-dapr: + command: + - "./daprd" + - "-app-id" + - "admin" + - "-app-port" + - "24401" + + auth-sts: + ports: + - target: 8080 + published: 24404 + - target: 8443 + published: 25504 + + auth-sts-dapr: + command: + - "./daprd" + - "-app-id" + - "auth-sts" + - "-app-port" + - "24404" + + auth-admin: + ports: + - target: 8080 + published: 24403 + - target: 8443 + published: 25503 + + auth-admin-dapr: + command: + - "./daprd" + - "-app-id" + - "auth-admin" + - "-app-port" + - "24403" + + auth-api: + ports: + - target: 8080 + published: 24402 + - target: 8443 + published: 25502 + + auth-api-dapr: + command: + - "./daprd" + - "-app-id" + - "auth-api" + - "-app-port" + - "24402" + + order: + ports: + - target: 8080 + published: 24405 + - target: 8443 + published: 25505 + + order-dapr: + command: + - "./daprd" + - "-app-id" + - "order" + - "-app-port" + - "24405" + + proxy-server: + ports: + - target: 8080 + published: 24400 + - target: 8443 + published: 25500 diff --git a/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml index 788efa4..bf1eca3 100644 --- a/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml +++ b/build/DaprTool.Solution.AppHost/aspirate-output/docker-compose.yaml @@ -10,7 +10,7 @@ services: restart: unless-stopped admin: container_name: "admin" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/web-admin:1.0.10-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/web-admin:1.0.12-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -38,7 +38,7 @@ services: - "admin" auth-sts: container_name: "auth-sts" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-sts:1.0.10-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-sts:1.0.12-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -66,7 +66,7 @@ services: - "auth-sts" auth-admin: container_name: "auth-admin" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-admin:1.0.10-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-admin:1.0.12-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -94,7 +94,7 @@ services: - "auth-admin" auth-api: container_name: "auth-api" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-api:1.0.10-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/auth-api:1.0.12-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -122,7 +122,7 @@ services: - "auth-api" order: container_name: "order" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/order-api:1.0.10-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/order-api:1.0.12-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" @@ -150,7 +150,7 @@ services: - "order" proxy-server: container_name: "proxy-server" - image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/proxy-server:1.0.10-alpha1" + image: "registry.cn-shenzhen.aliyuncs.com/project-workspace/proxy-server:1.0.12-alpha1" environment: OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES: "true" OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES: "true" diff --git a/build/DaprTool.Solution.AppHost/aspirate-state.json b/build/DaprTool.Solution.AppHost/aspirate-state.json index b16280e..04e60c5 100644 --- a/build/DaprTool.Solution.AppHost/aspirate-state.json +++ b/build/DaprTool.Solution.AppHost/aspirate-state.json @@ -4,7 +4,7 @@ "namespace": "dapr-playground", "containerRegistry": "registry.cn-shenzhen.aliyuncs.com", "containerImageTags": [ - "1.0.11-alpha1", + "1.0.12-alpha1", "latest" ], "imagePullPolicy": "IfNotPresent", diff --git a/build/DaprTool.Solution.AppHost/manifest.json b/build/DaprTool.Solution.AppHost/manifest.json index f742026..de940a1 100644 --- a/build/DaprTool.Solution.AppHost/manifest.json +++ b/build/DaprTool.Solution.AppHost/manifest.json @@ -30,7 +30,7 @@ "application": "admin", "appId": "admin", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12040, + "daprHttpPort": 23301, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" @@ -67,7 +67,7 @@ "application": "auth-sts", "appId": "auth-sts", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12030, + "daprHttpPort": 23304, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" @@ -104,7 +104,7 @@ "application": "auth-admin", "appId": "auth-admin", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12010, + "daprHttpPort": 23303, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" @@ -141,7 +141,7 @@ "application": "auth-api", "appId": "auth-api", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12020, + "daprHttpPort": 23302, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" @@ -178,7 +178,7 @@ "application": "order", "appId": "order", "daprHttpMaxRequestSize": 60, - "daprHttpPort": 12050, + "daprHttpPort": 23305, "daprHttpReadBufferSize": 128, "resourcesPath": [ "../../dapr/components" diff --git a/build/DaprTool.Solution.ServiceDefaults/Extensions.cs b/build/DaprTool.Solution.ServiceDefaults/Extensions.cs index b6e8000..1eb5e1e 100644 --- a/build/DaprTool.Solution.ServiceDefaults/Extensions.cs +++ b/build/DaprTool.Solution.ServiceDefaults/Extensions.cs @@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.ServiceDiscovery; using OpenTelemetry; using OpenTelemetry.Metrics; using OpenTelemetry.Trace; @@ -28,6 +29,12 @@ public static class Extensions http.AddServiceDiscovery(); }); + builder.Services.Configure(options => + { + options.AllowAllSchemes = true; + options.AllowedSchemes = ["https", "http"]; + }); + return builder; } diff --git a/build/aspirate-state.json b/build/aspirate-state.json new file mode 100644 index 0000000..12e8b01 --- /dev/null +++ b/build/aspirate-state.json @@ -0,0 +1,15 @@ +{ + "projectPath": ".", + "outputPath": "aspirate-output", + "containerImageTags": [ + "latest" + ], + "containerBuilder": "docker", + "outputFormat": "kustomize", + "privateRegistryEmail": "aspir8@aka.ms", + "secrets": { + "salt": "ehVft6Nfok4\u002BqKwF", + "hash": "DK2b5FoZgvZbMiIvg7zVq45iIkk08F\u002BRAZkUCQUYzIY=", + "secrets": {} + } +} \ No newline at end of file diff --git a/src/BuildingBlocks/Utils/Constant/Constants.cs b/src/BuildingBlocks/Utils/Constant/Constants.cs index f8f292a..76a8200 100644 --- a/src/BuildingBlocks/Utils/Constant/Constants.cs +++ b/src/BuildingBlocks/Utils/Constant/Constants.cs @@ -16,7 +16,7 @@ public static class Constants /// public const string ConfigurationStore = "dt-configurationstore"; /// - public static string DefaultActorId = "0"; + public static readonly string DefaultActorId = "0"; /// public const string ClusterSuffix = "Cluster"; /// @@ -26,21 +26,21 @@ public static class Constants /// public const string DaprServiceInvocation = "/v1.0/invoke/{0}/method{1}"; /// - public static DaprApp ProxyServer = new("proxy-server", 12000, 55444, 44444); + public static readonly DaprApp WebAdmin = new(AppId: "admin", DaprHttpPort: 23301, HttpPort: 24401, BasePath: "/admin"); /// - public static DaprApp AuthAdmin = new("auth-admin", 12010, 55303, 44303, "/auth/admin", 90); + public static readonly DaprApp AuthApi = new(AppId: "auth-api", DaprHttpPort: 23302, HttpPort: 24402, BasePath: "/api/auth", Order: 95); /// - public static DaprApp AuthApi = new("auth-api", 12020, 55302, 44302, "/api/auth", 95); + public static readonly DaprApp AuthAdmin = new(AppId: "auth-admin", DaprHttpPort: 23303, HttpPort: 24403, BasePath: "/auth/admin", Order: 90); /// - public static DaprApp AuthSts = new("auth-sts", 12030, 55310, 44310, "/auth"); + public static readonly DaprApp AuthSts = new(AppId: "auth-sts", DaprHttpPort: 23304, HttpPort: 24404, BasePath: "/auth"); /// - public static DaprApp WebAdmin = new("admin", 12040, 55510, 44510, "/admin"); + public static readonly DaprApp Ordering = new(AppId: "order", DaprHttpPort: 23305, HttpPort: 24405); /// - public static DaprApp Ordering = new("order", 12050, 55610, 44610); + public static readonly DaprApp Identity = new(AppId: "identity", DaprHttpPort: 23306, HttpPort: 24406); /// - public static DaprApp Identity = new("identity", 12060, 55620, 44620); + public static readonly DaprApp Catalog = new(AppId: "catalog", DaprHttpPort: 23307, HttpPort: 24407); /// - public static DaprApp Catalog = new("catalog", 12070, 55630, 44630); + public static readonly DaprApp ProxyServer = new(AppId: "proxy-server", DaprHttpPort: 23300, HttpPort: 24400); /// /// api 服务应用 ,Yarp 转发到 dapr cli 通过 dapr service invoke 调用 应用服务 diff --git a/src/BuildingBlocks/Utils/Utils.xml b/src/BuildingBlocks/Utils/Utils.xml index d308da7..024ddec 100644 --- a/src/BuildingBlocks/Utils/Utils.xml +++ b/src/BuildingBlocks/Utils/Utils.xml @@ -47,19 +47,16 @@ - - - - + - + - + @@ -71,6 +68,9 @@ + + + api 服务应用 ,Yarp 转发到 dapr cli 通过 dapr service invoke 调用 应用服务 diff --git a/src/BuildingBlocks/Utils/ValueObjects/DaprApp.cs b/src/BuildingBlocks/Utils/ValueObjects/DaprApp.cs index 911efda..9d46d28 100644 --- a/src/BuildingBlocks/Utils/ValueObjects/DaprApp.cs +++ b/src/BuildingBlocks/Utils/ValueObjects/DaprApp.cs @@ -2,7 +2,7 @@ namespace DaprTool.BuildingBlocks.Utils.ValueObjects; -public record DaprApp(string AppId, int? DaprHttpPort, int? ResourceHttpPort, int? AppHttpsPort, string? BasePath = "", int? Order = 100) +public record DaprApp(string AppId, int? DaprHttpPort, int? HttpPort, string? BasePath = "", int? Order = 100) { public string? ResourceHttpsEndpoint => string.Concat(AppId, "-https"); public string? ResourceHttpEndpoint => string.Concat(AppId, "-http"); diff --git a/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json b/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json index 9382915..cb51a84 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin.Api/Properties/launchSettings.json @@ -5,7 +5,7 @@ "commandName": "Project", "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "http://localhost:55302", + "applicationUrl": "http://localhost:24402", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -14,7 +14,7 @@ "commandName": "Project", "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:44302;http://localhost:55302", + "applicationUrl": "https://localhost:25502;http://localhost:24402", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/IdentityServer4/src/Idsrv4.Admin.Api/appsettings.json b/src/IdentityServer4/src/Idsrv4.Admin.Api/appsettings.json index 3be2da1..06a8a13 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin.Api/appsettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin.Api/appsettings.json @@ -10,8 +10,8 @@ "AdminApiConfiguration": { "ApiName": "IdentityServer4 Admin Api", "ApiVersion": "v1", - "ApiBaseUrl": "https://localhost:44444/api/auth", - "IdentityServerBaseUrl": "https://localhost:44444/auth", + "ApiBaseUrl": "http://localhost:24400/api/auth", + "IdentityServerBaseUrl": "http://localhost:24400/auth", "OidcSwaggerUIClientId": "identity_admin_api_swaggerui", "OidcApiName": "identity_admin_api", "AdministrationRole": "Administrator", diff --git a/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json b/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json index efe90e3..7fd1c52 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/Properties/launchSettings.json @@ -3,7 +3,7 @@ "http": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "http://localhost:55310", + "applicationUrl": "http://localhost:24404", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -11,7 +11,7 @@ "https": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "https://localhost:44310;http://localhost:55310", + "applicationUrl": "https://localhost:25504;http://localhost:24404", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/appsettings.json b/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/appsettings.json index 6f885bc..f66eb09 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/appsettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin.STS.Identity/appsettings.json @@ -68,7 +68,7 @@ "CustomThemeCss": null, "IdentityAdminBasePath": "/auth/admin", "WebAdminBasePath": "/admin", - "ProxyServerUrl": "https://localhost:44444", + "ProxyServerUrl": "http://localhost:24400", "AdministrationRole": "Administrator" }, "CspTrustedDomains": [ diff --git a/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json b/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json index d5a5b3d..e27c3c4 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin/Properties/launchSettings.json @@ -3,7 +3,7 @@ "http": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "http://localhost:55303", + "applicationUrl": "http://localhost:24403", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -11,7 +11,7 @@ "https": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "https://localhost:44303;http://localhost:55303", + "applicationUrl": "https://localhost:25503;http://localhost:24403", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/IdentityServer4/src/Idsrv4.Admin/appsettings.json b/src/IdentityServer4/src/Idsrv4.Admin/appsettings.json index 3374c5b..f1a6df3 100644 --- a/src/IdentityServer4/src/Idsrv4.Admin/appsettings.json +++ b/src/IdentityServer4/src/Idsrv4.Admin/appsettings.json @@ -22,7 +22,7 @@ "IdentityAdminRedirectPath": "/auth/admin/signin-oidc", "IdentityServerBasePath": "/auth", "WebAdminBasePath": "/admin", - "ProxyServerUrl": "https://localhost:44444", + "ProxyServerUrl": "http://localhost:24400", "IdentityAdminCookieName": "IdentityServerAdmin", "IdentityAdminCookieExpiresUtcHours": 12, "RequireHttpsMetadata": false, diff --git a/src/ProxyServer/Properties/launchSettings.json b/src/ProxyServer/Properties/launchSettings.json index c2bf168..2a5863f 100644 --- a/src/ProxyServer/Properties/launchSettings.json +++ b/src/ProxyServer/Properties/launchSettings.json @@ -5,7 +5,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "applicationUrl": "http://localhost:55444", + "applicationUrl": "http://localhost:24400", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -14,7 +14,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "applicationUrl": "https://localhost:44444;http://localhost:55444", + "applicationUrl": "https://localhost:25500;http://localhost:24400", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/ProxyServer/ReverseProxyServiceCollectionExtensions.cs b/src/ProxyServer/ReverseProxyServiceCollectionExtensions.cs index 7d596a7..530f1ff 100644 --- a/src/ProxyServer/ReverseProxyServiceCollectionExtensions.cs +++ b/src/ProxyServer/ReverseProxyServiceCollectionExtensions.cs @@ -64,9 +64,8 @@ internal static class ReverseProxyServiceCollectionExtensions LoadBalancingPolicy = LoadBalancingPolicies.PowerOfTwoChoices, Destinations = new Dictionary(StringComparer.OrdinalIgnoreCase) { - { "destination1", new DestinationConfig() { Address = string.Concat("https://localhost:", x.AppHttpsPort) } }, + { "destination1", new DestinationConfig() { Address = string.Concat("http://localhost:", x.HttpPort) } }, { "destination2", new DestinationConfig() { Address = string.Concat("http://", x.AppId) } }, - { "destination3", new DestinationConfig() { Address = string.Concat("http://localhost:", x.ResourceHttpPort) } }, } }); diff --git a/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json b/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json index f75ba6b..0cb8087 100644 --- a/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json +++ b/src/Services/Ordering/Presentation/Ordering.Api/Properties/launchSettings.json @@ -4,7 +4,7 @@ "commandName": "Project", "launchBrowser": true, "dotnetRunMessages": true, - "applicationUrl": "http://localhost:55610", + "applicationUrl": "http://localhost:24405", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -13,7 +13,7 @@ "commandName": "Project", "launchBrowser": true, "dotnetRunMessages": true, - "applicationUrl": "https://localhost:44610;http://localhost:55610", + "applicationUrl": "https://localhost:25505;http://localhost:24405", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/Web/WebAdmin/Program.cs b/src/Web/WebAdmin/Program.cs index 5addc89..b122158 100644 --- a/src/Web/WebAdmin/Program.cs +++ b/src/Web/WebAdmin/Program.cs @@ -74,7 +74,7 @@ builder.Services.AddAuthentication(options => options.SaveTokens = true; options.GetClaimsFromUserInfoEndpoint = true; - + options.TokenValidationParameters = new TokenValidationParameters { NameClaimType = adminConfiguration.TokenValidationClaimName, @@ -83,6 +83,13 @@ builder.Services.AddAuthentication(options => options.Events = new OpenIdConnectEvents { + OnAuthenticationFailed = context => + { + Console.WriteLine(context.Exception?.Message); + Console.WriteLine(context.Exception?.InnerException?.Message); + + return Task.CompletedTask; + }, OnMessageReceived = context => { if (context.Properties is null) return Task.CompletedTask; @@ -123,7 +130,6 @@ builder.Services.AddAuthorization(options => options.FallbackPolicy = options.DefaultPolicy; }); - var app = builder.Build(); app.MapDefaultEndpoints(); @@ -205,4 +211,4 @@ app.MapRazorComponents() .AddInteractiveWebAssemblyRenderMode() .AddAdditionalAssemblies(typeof(_Imports).Assembly); -app.Run(); \ No newline at end of file +app.Run(); diff --git a/src/Web/WebAdmin/Properties/launchSettings.json b/src/Web/WebAdmin/Properties/launchSettings.json index 8654f6c..e86130c 100644 --- a/src/Web/WebAdmin/Properties/launchSettings.json +++ b/src/Web/WebAdmin/Properties/launchSettings.json @@ -1,24 +1,22 @@ { - "$schema": "http://json.schemastore.org/launchsettings.json", "profiles": { "http": { "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "applicationUrl": "http://localhost:55510", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:24401" }, "https": { "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:44510;http://localhost:55510", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "dotnetRunMessages": true, + "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", + "applicationUrl": "https://localhost:25501;http://localhost:24401" } - } + }, + "$schema": "http://json.schemastore.org/launchsettings.json" } \ No newline at end of file diff --git a/src/Web/WebAdmin/WebAdmin.csproj b/src/Web/WebAdmin/WebAdmin.csproj index bb8a14b..19100b8 100644 --- a/src/Web/WebAdmin/WebAdmin.csproj +++ b/src/Web/WebAdmin/WebAdmin.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/Web/WebAdmin/appsettings.Development.json b/src/Web/WebAdmin/appsettings.Development.json index b8010de..5198043 100644 --- a/src/Web/WebAdmin/appsettings.Development.json +++ b/src/Web/WebAdmin/appsettings.Development.json @@ -19,8 +19,8 @@ "AdminConfiguration": { "PageTitle": "管理后台", "FaviconUri": "~/favicon.ico", - "AdminRedirectUri": "https://localhost:44444/admin/signin-oidc", - "IdentityServerBaseUrl": "https://localhost:44444/auth", + "AdminRedirectUri": "http://localhost:24400/admin/signin-oidc", + "IdentityServerBaseUrl": "http://localhost:24400/auth", "AdminCookieName": "WebAdmin", "AdminCookieExpiresUtcHours": 12, "RequireHttpsMetadata": false, -- Gitee