From 853430a4e320ff258936595c01ca02432ba2dbdf Mon Sep 17 00:00:00 2001 From: Unai Date: Fri, 4 Nov 2016 10:11:15 +0100 Subject: [PATCH] Remove settings on environment --- .../Catalog.API/Infrastructure/CatalogContextSeed.cs | 2 -- src/Services/Catalog/Catalog.API/Startup.cs | 2 +- src/Services/Catalog/Catalog.API/project.json | 2 +- .../{settings.development.json => settings.json} | 0 .../Catalog/Catalog.API/settings.production.json | 11 ----------- 5 files changed, 2 insertions(+), 15 deletions(-) rename src/Services/Catalog/Catalog.API/{settings.development.json => settings.json} (100%) delete mode 100644 src/Services/Catalog/Catalog.API/settings.production.json diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs index a5852b331..76b1d1c53 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs @@ -15,8 +15,6 @@ using (context) { - context.Database.EnsureDeleted(); - context.Database.EnsureCreated(); if (!context.CatalogBrands.Any()) diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 9507678a2..8aa995f2d 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -21,7 +21,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API { var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) - .AddJsonFile($"settings.{env.EnvironmentName}.json",optional:false) + .AddJsonFile($"settings.json",optional:false) .AddEnvironmentVariables(); diff --git a/src/Services/Catalog/Catalog.API/project.json b/src/Services/Catalog/Catalog.API/project.json index 50733a295..e4c763cde 100644 --- a/src/Services/Catalog/Catalog.API/project.json +++ b/src/Services/Catalog/Catalog.API/project.json @@ -43,7 +43,7 @@ "wwwroot", "Views", "Areas/**/Views", - "settings.Production.json", + "settings.json", "web.config", "project.json", "Dockerfile" diff --git a/src/Services/Catalog/Catalog.API/settings.development.json b/src/Services/Catalog/Catalog.API/settings.json similarity index 100% rename from src/Services/Catalog/Catalog.API/settings.development.json rename to src/Services/Catalog/Catalog.API/settings.json diff --git a/src/Services/Catalog/Catalog.API/settings.production.json b/src/Services/Catalog/Catalog.API/settings.production.json deleted file mode 100644 index a562552b2..000000000 --- a/src/Services/Catalog/Catalog.API/settings.production.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "ConnectionString": "Server=127.0.0.1;Port=5432;Database=CatalogDB;username=postgres;password=postgres", - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -}