-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from SaintAngeLs/dev
Merge with dev -- update the sign-in with respect to the blazor component #19
- Loading branch information
Showing
15 changed files
with
165 additions
and
74 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build | ||
# Use the .NET 6 SDK for building the project | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
WORKDIR /app | ||
|
||
# Copy everything and publish the release | ||
COPY . . | ||
RUN dotnet publish src/MiniSpace.Web -c release -o out | ||
RUN dotnet publish src/MiniSpace.Web -c Release -o out | ||
|
||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 | ||
# Use the .NET 6 runtime for the final image | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 | ||
WORKDIR /app | ||
|
||
# Copy the published app from the build stage | ||
COPY --from=build /app/out . | ||
ENV ASPNETCORE_URLS http://*:80 | ||
ENV ASPNETCORE_ENVIRONMENT docker | ||
ENTRYPOINT dotnet MiniSpace.Web.dll | ||
|
||
# Set environment variables | ||
ENV ASPNETCORE_URLS=http://*:80 | ||
ENV ASPNETCORE_ENVIRONMENT=docker | ||
|
||
# Start the application | ||
ENTRYPOINT ["dotnet", "MiniSpace.Web.dll"] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
</PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
|
||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> | ||
<PackageReference Include="Polly" Version="7.1.1" /> | ||
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@page "/greeting" | ||
@using Microsoft.AspNetCore.Components.Authorization | ||
@inject AuthenticationStateProvider AuthenticationStateProvider | ||
|
||
<h1>Greeting</h1> | ||
|
||
|
||
@if (userName != null) | ||
{ | ||
<p>Hello, @userName!</p> | ||
} | ||
else | ||
{ | ||
<p>Loading...</p> | ||
} | ||
|
||
@code { | ||
private string userName; | ||
|
||
protected override async Task OnInitializedAsync() | ||
{ | ||
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); | ||
userName = authState.User.Identity.Name; | ||
} | ||
} |
Oops, something went wrong.