Start adding connection strings for VS launch profile

This commit is contained in:
Reuben Bond 2023-05-08 12:03:05 -07:00
parent 72c8167ec0
commit f5218e8087
10 changed files with 38 additions and 4 deletions

View File

@ -1,4 +1,6 @@
{ {
"ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word", "ConnectionStrings": {
"CatalogDB": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;Encrypt=false"
},
"PicBaseUrl": "http://localhost:5222/api/v1/catalog/items/[0]/pic/" "PicBaseUrl": "http://localhost:5222/api/v1/catalog/items/[0]/pic/"
} }

View File

@ -49,6 +49,14 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Services.Common\Services.Common.csproj" /> <ProjectReference Include="..\..\Services.Common\Services.Common.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Update="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>
<UserProperties appsettings_1json__JsonSchema="" /> <UserProperties appsettings_1json__JsonSchema="" />

View File

@ -2,7 +2,7 @@
public class SeedData public class SeedData
{ {
public static async Task EnsureSeedData(IServiceScope scope, IConfiguration configuration, Microsoft.Extensions.Logging.ILogger logger) public static async Task EnsureSeedData(IServiceScope scope, IConfiguration configuration, ILogger logger)
{ {
var retryPolicy = CreateRetryPolicy(configuration, logger); var retryPolicy = CreateRetryPolicy(configuration, logger);
var context = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>(); var context = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();

View File

@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"IdentityDB": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;Encrypt=false"
}
}

View File

@ -44,4 +44,13 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Update="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
</Project> </Project>

View File

@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"OrderingDB": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;Encrypt=false"
}
}

View File

@ -5,5 +5,8 @@
"System": "Information", "System": "Information",
"Microsoft": "Information" "Microsoft": "Information"
} }
},
"ConnectionStrings": {
"OrderingDB": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;Encrypt=false"
} }
} }

View File

@ -7,7 +7,7 @@
<handlers> <handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers> </handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"> <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" hostingModel="InProcess">
<environmentVariables /> <environmentVariables />
</aspNetCore> </aspNetCore>
</system.webServer> </system.webServer>

View File

@ -21,7 +21,7 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"applicationUrl": "https://localhost:5001;http://localhost:5000" "applicationUrl": "http://localhost:5228"
}, },
"Docker": { "Docker": {
"commandName": "Docker", "commandName": "Docker",

View File

@ -4,5 +4,7 @@
"Default": "Information" "Default": "Information"
} }
}, },
"IdentityUrl": "http://localhost:5223",
"CallBackUrl": "http://localhost:5228/",
"AllowedHosts": "*" "AllowedHosts": "*"
} }