Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETL-240: Investigate in process hosting model in combination with 2 apps #32

Merged
merged 15 commits into from
Jul 30, 2024

Conversation

edekoning
Copy link
Contributor

No description provided.

<PropertyGroup>
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
</PropertyGroup>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In process hosting is default

</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Enigmatry.Entry.Blueprint.Infrastructure\Enigmatry.Entry.Blueprint.Infrastructure.csproj"/>
<ProjectReference Include="..\Enigmatry.Entry.Blueprint.Domain\Enigmatry.Entry.Blueprint.Domain.csproj"/>
<ProjectReference Include="..\enigmatry-entry-blueprint-app\Enigmatry.Entry.Blueprint.App.esproj" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reference was added

@@ -11,7 +11,7 @@ public static class SwaggerAuthenticationStartupExtensions
public static void AppUseSwaggerWithAzureAdAuth(this IApplicationBuilder app, IConfiguration configuration)
{
var aadOptions = configuration.GetSection(AuthenticationStartupExtensions.AzureAdSection).Get<MicrosoftIdentityOptions>()!;
app.UseEntrySwaggerWithOAuth2Client(aadOptions.ClientId!);
app.UseEntrySwaggerWithOAuth2Client(aadOptions.ClientId!, path: "/swagger");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swagger UI will now be hosted on /swagger, since /api will no longer be there.

<ShouldRunBuildScript>false</ShouldRunBuildScript>
<!-- Folder where production build objects will be placed -->
<BuildOutputFolder>$(MSBuildProjectDirectory)\dist\</BuildOutputFolder>
<BuildCommand>npm run build -- --configuration production</BuildCommand>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will automatically be called when the API project builds, because of the project reference.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually develop FE in VS Code and BE (API) in VS. This is convenient for CI/CD since it's gonna simplify steps needed for build, but will slow down API development? Can we say that this is for release builds only?

Copy link
Contributor Author

@edekoning edekoning Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ShouldRunBuildScript parameter on line 6 is set to false, which prevents running build from Visual Studio. However, the command on line 9 is still triggered when the dotnet publish command is used (for example, in a CI/CD scenario). (Yes, it took me some time to figure that out)

}
},
"Enigmatry.Entry.Blueprint.Api": {
"commandName": "Project",
"launchBrowser": false,
"applicationUrl": "http://localhost:5441/",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this on app service, or it's needed only in local dev?

<ItemGroup>
<ParameterValue Include="SQLDB Connection String">
Copy link
Contributor

@zsrdjan zsrdjan Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are going to deploy only app.proj? This might require a bit of work to combine publish profiles of angular with the api. Not sure if we are goging to have naming collisions (same properties, different values).

@edekoning edekoning merged commit e125406 into master Jul 30, 2024
8 of 13 checks passed
@edekoning edekoning deleted the hosting-experiment branch July 30, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants