Skip to content

Commit

Permalink
Use a central configuration file across all projects (#708)
Browse files Browse the repository at this point in the history
* chore: Add common appsettings.override.json (except AdminAPI)

* chore: Reference common appsettings.override.json from programs

* chore: Add questions for AdminApi appsettings.override.json

* chore: Finalize common appsettings.override.json

* fix: Use previous path for override json

* chore: Remove docker build summary

* chore: EventHandlerService: Remove own override file, change working directory, add build event to copy central file

* Fix: Only let copy command run in debug configuration

* chore: Re-add docker build summary, use own PR for the removal

* chore: Use MSBuild property for copy checking

* chore: Make appsettings.override file optional again

* chore: Remove specific override files

* chore: Remove custom property from Dockerfile

* chore: Set working directory for local builds

* chore: Include common override file into project (debug only)

* chore: Remove unnecessary whitespace

* chore: Move Content statements into own ItemGroups

* chore: use TargetFramework property for working directory

* chore: Add instanceUrl to common appsettings override

* chore: Remove separate appsettings override files

* chore: Rename InstanceUrl to DidDomainName

* chore: Remove unnecessary comment

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
MH321Productions and mergify[bot] authored Jul 3, 2024
1 parent f9c61a3 commit d7a15aa
Show file tree
Hide file tree
Showing 25 changed files with 305 additions and 679 deletions.
5 changes: 5 additions & 0 deletions AdminApi/src/AdminApi/AdminApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@
<ItemGroup>
<Folder Include="ClientApp\src\"/>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\appsettings.override.json" Condition="$(Configuration) == Debug">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
Expand Down
21 changes: 11 additions & 10 deletions AdminApi/src/AdminApi/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"Default": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Local",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy",
"ASPNETCORE_URLS": "http://*:8082"
}
}
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"Default": {
"commandName": "Project",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Local",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.SpaProxy",
"ASPNETCORE_URLS": "http://*:8082"
},
"workingDirectory": "bin/Debug/$(TargetFramework)"
}
}
}
94 changes: 0 additions & 94 deletions AdminApi/src/AdminApi/appsettings.override.json

This file was deleted.

7 changes: 6 additions & 1 deletion ConsumerApi/ConsumerApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<UserSecretsId>f114fba8-95dd-4fee-8385-af8e8a343c68</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="8.0.2"/>
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0"/>
Expand Down Expand Up @@ -44,4 +44,9 @@
<ProjectReference Include="..\Modules\Tokens\src\Tokens.ConsumerApi\Tokens.ConsumerApi.csproj"/>
</ItemGroup>

<ItemGroup>
<Content Include="..\appsettings.override.json" Condition="$(Configuration) == Debug">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion ConsumerApi/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"Modules__Files__Infrastructure__BlobStorage__ConnectionInfo": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;",
"ASPNETCORE_ENVIRONMENT": "Local",
"ASPNETCORE_URLS": "http://*:8081"
}
},
"workingDirectory": "bin/Debug/$(TargetFramework)"
}
}
}
145 changes: 0 additions & 145 deletions ConsumerApi/appsettings.override.json

This file was deleted.

8 changes: 7 additions & 1 deletion DatabaseMigrator/DatabaseMigrator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0"/>
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0"/>
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0"/>
<PackageReference Include="Serilog.Sinks.Http" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Http" Version="9.0.0"/>
<PackageReference Include="Serilog.Sinks.Seq" Version="8.0.0"/>
<PackageReference Include="System.Data.SqlClient" Version="4.8.6"/>
</ItemGroup>
Expand Down Expand Up @@ -53,4 +53,10 @@
<ProjectReference Include="..\Modules\Tokens\src\Tokens.Infrastructure.Database.SqlServer\Tokens.Infrastructure.Database.SqlServer.csproj"/>
<ProjectReference Include="..\Modules\Tokens\src\Tokens.Infrastructure\Tokens.Infrastructure.csproj"/>
</ItemGroup>

<ItemGroup>
<Content Include="..\appsettings.override.json" Condition="$(Configuration) == Debug">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion DatabaseMigrator/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"profiles": {
"Default": {
"commandName": "Project",
"environmentVariables": {}
"environmentVariables": {},
"workingDirectory": "bin/Debug/$(TargetFramework)"
}
}
}
28 changes: 0 additions & 28 deletions DatabaseMigrator/appsettings.override.json

This file was deleted.

Loading

0 comments on commit d7a15aa

Please sign in to comment.