diff --git a/aspnet-samples/AdvancedChatRoom/ChatSample.AspNet.csproj b/aspnet-samples/AdvancedChatRoom/ChatSample.AspNet.csproj index a7040b5a..4a16a96e 100644 --- a/aspnet-samples/AdvancedChatRoom/ChatSample.AspNet.csproj +++ b/aspnet-samples/AdvancedChatRoom/ChatSample.AspNet.csproj @@ -68,14 +68,14 @@ packages\Microsoft.AspNetCore.Http.Features.2.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll - - packages\Microsoft.Azure.SignalR.AspNet.1.4.0\lib\net461\Microsoft.Azure.SignalR.AspNet.dll + + packages\Microsoft.Azure.SignalR.AspNet.1.4.1\lib\net461\Microsoft.Azure.SignalR.AspNet.dll - - packages\Microsoft.Azure.SignalR.AspNet.1.4.0\lib\net461\Microsoft.Azure.SignalR.Common.dll + + packages\Microsoft.Azure.SignalR.AspNet.1.4.1\lib\net461\Microsoft.Azure.SignalR.Common.dll - - packages\Microsoft.Azure.SignalR.Protocols.1.4.0\lib\netstandard2.0\Microsoft.Azure.SignalR.Protocols.dll + + packages\Microsoft.Azure.SignalR.Protocols.1.4.1\lib\netstandard2.0\Microsoft.Azure.SignalR.Protocols.dll diff --git a/aspnet-samples/AdvancedChatRoom/packages.config b/aspnet-samples/AdvancedChatRoom/packages.config index 3cf83839..b95b076b 100644 --- a/aspnet-samples/AdvancedChatRoom/packages.config +++ b/aspnet-samples/AdvancedChatRoom/packages.config @@ -14,8 +14,8 @@ - - + + diff --git a/aspnet-samples/ChatRoom/ChatRoom.csproj b/aspnet-samples/ChatRoom/ChatRoom.csproj index 6e15e2a1..636abc65 100644 --- a/aspnet-samples/ChatRoom/ChatRoom.csproj +++ b/aspnet-samples/ChatRoom/ChatRoom.csproj @@ -62,14 +62,14 @@ packages\Microsoft.AspNetCore.Http.Features.2.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll - - packages\Microsoft.Azure.SignalR.AspNet.1.4.0\lib\net461\Microsoft.Azure.SignalR.AspNet.dll + + packages\Microsoft.Azure.SignalR.AspNet.1.4.1\lib\net461\Microsoft.Azure.SignalR.AspNet.dll - - packages\Microsoft.Azure.SignalR.AspNet.1.4.0\lib\net461\Microsoft.Azure.SignalR.Common.dll + + packages\Microsoft.Azure.SignalR.AspNet.1.4.1\lib\net461\Microsoft.Azure.SignalR.Common.dll - - packages\Microsoft.Azure.SignalR.Protocols.1.4.0\lib\netstandard2.0\Microsoft.Azure.SignalR.Protocols.dll + + packages\Microsoft.Azure.SignalR.Protocols.1.4.1\lib\netstandard2.0\Microsoft.Azure.SignalR.Protocols.dll diff --git a/aspnet-samples/ChatRoom/packages.config b/aspnet-samples/ChatRoom/packages.config index 73a3b934..2657ffb8 100644 --- a/aspnet-samples/ChatRoom/packages.config +++ b/aspnet-samples/ChatRoom/packages.config @@ -9,8 +9,8 @@ - - + + diff --git a/samples/AdvancedChatRoom/AdvancedChatRoom.csproj b/samples/AdvancedChatRoom/AdvancedChatRoom.csproj index 9c2c2a03..c780ddb8 100644 --- a/samples/AdvancedChatRoom/AdvancedChatRoom.csproj +++ b/samples/AdvancedChatRoom/AdvancedChatRoom.csproj @@ -12,6 +12,6 @@ - + diff --git a/samples/AdvancedChatRoom/Dockerfile b/samples/AdvancedChatRoom/Dockerfile deleted file mode 100644 index 566ad835..00000000 --- a/samples/AdvancedChatRoom/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) Microsoft. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. - -FROM microsoft/dotnet:2.1-sdk-stretch AS build-env -WORKDIR /app - -ARG SDKVersion - -# copy csproj and restore as distinct layers -RUN mkdir AdvancedChatRoom && cd AdvancedChatRoom/ -COPY *.csproj ./ -RUN dotnet restore - -# copy everything else and build -COPY ./ ./ -RUN dotnet publish -c Release -o out - -# build runtime image -FROM microsoft/dotnet:2.1-aspnetcore-runtime -WORKDIR /app -ENV Azure__SignalR__ConnectionString "" -EXPOSE 80 -COPY --from=build-env /app/out . -ENTRYPOINT ["dotnet", "AdvancedChatRoom.dll"] diff --git a/samples/AdvancedChatRoom/README.md b/samples/AdvancedChatRoom/README.md index f3fcfd0d..0f310e65 100644 --- a/samples/AdvancedChatRoom/README.md +++ b/samples/AdvancedChatRoom/README.md @@ -1,7 +1,7 @@ Azure SignalR Service Advanced Chat Room ================================= -Just like [ChatRoom sample](../ChatRoom), you can leverage Azure SignalR Service to handle more clients and offload the connection management part. This sample demonstrates more operations available in Azure SignalR Service. Also provided docker image to simplify build environment problems. +Just like [ChatRoom sample](../ChatRoom), you can leverage Azure SignalR Service to handle more clients and offload the connection management part. This sample demonstrates more operations available in Azure SignalR Service. Now the sample supports: @@ -13,22 +13,13 @@ Now the sample supports: * Cookie / JWT based Authentication * Role / Claim / Policy based Authrization -## Build Docker Images +## Run the sample locally -First check the SDK version needed. Each SDKVerison will build a separate docker image and the tag is the sdk version. -```bash -# build-image.sh -declare -a SDKVersion=("1.0.0-preview1-10009" "1.0.0-preview1-10011" "1.0.0-preview1-10015" "1.0.0-preview1-10200") +Type the following commands to run this app. ``` - -Then run the script to build docker images. -```bash -./build-image.sh -``` - -You can run the image with Azure Signalr Service. -```bash -docker run -e Azure__SignalR__ConnectionString="" -p 5000:80 signalr-advancedchatroom: +dotnet restore +dotnet user-secrets set Azure:SignalR:ConnectionString "" +dotnet run ``` Open the broswer with url `localhost:5000`, you can see the sample just like Chat Sample but has more operations. diff --git a/samples/AdvancedChatRoom/build-image.sh b/samples/AdvancedChatRoom/build-image.sh deleted file mode 100644 index a0ee9ca5..00000000 --- a/samples/AdvancedChatRoom/build-image.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -x - -DIR=$(cd `dirname $0`; pwd) -pushd ${DIR} - -declare -a SDKVersion=("1.0.0-preview1-10009" "1.0.0-preview1-10011" "1.0.0-preview1-10015" "1.0.0-preview1-10200") - -for version in "${SDKVersion[@]}"; do - docker build -t signalr-advancedchatroom:$version --build-arg SDKVersion=$version . -done - -popd diff --git a/samples/FlightMap/FlightMap.csproj b/samples/FlightMap/FlightMap.csproj index d0fa2fe4..f9afd532 100644 --- a/samples/FlightMap/FlightMap.csproj +++ b/samples/FlightMap/FlightMap.csproj @@ -12,6 +12,6 @@ - + diff --git a/samples/GitHubChat/GitHubChat.csproj b/samples/GitHubChat/GitHubChat.csproj index bd1327e1..9d69b61e 100644 --- a/samples/GitHubChat/GitHubChat.csproj +++ b/samples/GitHubChat/GitHubChat.csproj @@ -12,6 +12,6 @@ - + diff --git a/samples/Management/MessagePublisher/MessagePublisher.csproj b/samples/Management/MessagePublisher/MessagePublisher.csproj index 61fdd839..93d6e50e 100644 --- a/samples/Management/MessagePublisher/MessagePublisher.csproj +++ b/samples/Management/MessagePublisher/MessagePublisher.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/Management/NegotiationServer/NegotiationServer.csproj b/samples/Management/NegotiationServer/NegotiationServer.csproj index edd2114b..97cc9132 100644 --- a/samples/Management/NegotiationServer/NegotiationServer.csproj +++ b/samples/Management/NegotiationServer/NegotiationServer.csproj @@ -9,7 +9,7 @@ - + diff --git a/samples/Management/SignalRClient/SignalRClient.csproj b/samples/Management/SignalRClient/SignalRClient.csproj index c166d1b2..1a52b470 100644 --- a/samples/Management/SignalRClient/SignalRClient.csproj +++ b/samples/Management/SignalRClient/SignalRClient.csproj @@ -8,7 +8,7 @@ - + diff --git a/samples/ReliableChatRoom/ReliableChatRoom.csproj b/samples/ReliableChatRoom/ReliableChatRoom.csproj index 12d15048..6e77fa85 100644 --- a/samples/ReliableChatRoom/ReliableChatRoom.csproj +++ b/samples/ReliableChatRoom/ReliableChatRoom.csproj @@ -11,6 +11,6 @@ - + diff --git a/samples/ServerSideBlazor/ServerSideBlazor.csproj b/samples/ServerSideBlazor/ServerSideBlazor.csproj index eeab0c06..3c5380f2 100644 --- a/samples/ServerSideBlazor/ServerSideBlazor.csproj +++ b/samples/ServerSideBlazor/ServerSideBlazor.csproj @@ -5,7 +5,7 @@ - + diff --git a/samples/Serverless/Serverless.csproj b/samples/Serverless/Serverless.csproj index 56fadb95..84d815a3 100644 --- a/samples/Serverless/Serverless.csproj +++ b/samples/Serverless/Serverless.csproj @@ -9,7 +9,7 @@ - +