From a49b457a85816c50b3ee70026a47f042df7b0f78 Mon Sep 17 00:00:00 2001 From: Ricardo Carneiro Date: Thu, 21 Aug 2025 17:23:48 -0300 Subject: [PATCH] feat: build appSettings prod, dev, etc --- src/BCards.Web/appSettings.Testing.json | 20 --- src/BCards.Web/appsettings.Development.json | 32 +--- src/BCards.Web/appsettings.Release.json | 159 +------------------- src/BCards.Web/appsettings.json | 47 +++--- 4 files changed, 34 insertions(+), 224 deletions(-) delete mode 100644 src/BCards.Web/appSettings.Testing.json diff --git a/src/BCards.Web/appSettings.Testing.json b/src/BCards.Web/appSettings.Testing.json deleted file mode 100644 index 037e03b..0000000 --- a/src/BCards.Web/appSettings.Testing.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning", - "Microsoft.EntityFrameworkCore": "Warning" - } - }, - "ConnectionStrings": { - "DefaultConnection": "mongodb://localhost:27017/BCardsDB_Testing" - }, - "AllowedHosts": "*", - "JWT": { - "Secret": "ThisIsATestSecretKeyForJWTTokenGeneration123456789", - "Issuer": "BCards-Testing", - "Audience": "BCards-Users-Testing", - "ExpiryMinutes": 60 - }, - "Environment": "Testing" -} \ No newline at end of file diff --git a/src/BCards.Web/appsettings.Development.json b/src/BCards.Web/appsettings.Development.json index dff4f12..7c69eda 100644 --- a/src/BCards.Web/appsettings.Development.json +++ b/src/BCards.Web/appsettings.Development.json @@ -1,38 +1,16 @@ { "Logging": { "LogLevel": { - "Default": "Information", + "Default": "Debug", + "System": "Information", + "Microsoft": "Information", "Microsoft.AspNetCore": "Warning" } }, "DetailedErrors": true, - "Stripe": { - "PublishableKey": "pk_test_51RjUmIBMIadsOxJVP4bWc54pHEOSf5km1hpOkOBSoGVoKxI46N4KSWtevpXCSq68OjFazBuXmPJGBwZ1KDN5MNJy003lj1YmAS", - "SecretKey": "sk_test_51RjUmIBMIadsOxJVeqsMFxnZ8ePR7d8IbnaF4sAwBVJv9rrfODPEQ2C9fF3beoABpITdfzEk0ZDzGTTQfvKv63xI00PeZoABGO", - "WebhookSecret": "whsec_8d189c137ff170ab5e62498003512b9d073e2db50c50ed7d8712b7ef11a37543" - }, - "Plans": { - "Basic": { - "PriceId": "price_1RjUskBMIadsOxJVgLwlVo1y", - "Price": 9.90, - "MaxLinks": 5, - "Features": [ "basic_themes", "simple_analytics" ] - }, - "Professional": { - "PriceId": "price_1RjUv9BMIadsOxJVORqlM4E9", - "Price": 24.90, - "MaxLinks": 15, - "Features": [ "all_themes", "advanced_analytics", "custom_domain" ] - }, - "Premium": { - "PriceId": "price_1RjUw0BMIadsOxJVmdouNV1g", - "Price": 29.90, - "MaxLinks": -1, - "Features": [ "custom_themes", "full_analytics", "multiple_domains", "priority_support" ] - } - }, "MongoDb": { "ConnectionString": "mongodb://localhost:27017", "DatabaseName": "BCardsDB_Dev" - } + }, + "BaseUrl": "https://localhost:49178" } \ No newline at end of file diff --git a/src/BCards.Web/appsettings.Release.json b/src/BCards.Web/appsettings.Release.json index fd2d16d..85e0dee 100644 --- a/src/BCards.Web/appsettings.Release.json +++ b/src/BCards.Web/appsettings.Release.json @@ -2,161 +2,12 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft.AspNetCore": "Warning", - "Microsoft.EntityFrameworkCore": "Warning", - "BCards": "Information" - }, - "Console": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Information" - } - }, - "File": { - "Path": "/app/logs/bcards-{Date}.log", - "LogLevel": { - "Default": "Information" - } + "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*", "MongoDb": { - "ConnectionString": "mongodb://192.168.0.100:27017/BCardsDB", - "DatabaseName": "BCardsDB", - "MaxConnectionPoolSize": 100, - "ConnectTimeout": "30s", - "ServerSelectionTimeout": "30s", - "SocketTimeout": "30s" + "ConnectionString": "mongodb://192.168.0.100:27017", + "DatabaseName": "BCardsDB_Staging" }, - "Stripe": { - "PublishableKey": "pk_test_51RjUmIBMIadsOxJVP4bWc54pHEOSf5km1hpOkOBSoGVoKxI46N4KSWtevpXCSq68OjFazBuXmPJGBwZ1KDN5MNJy003lj1YmAS", - "SecretKey": "sk_test_51RjUmIBMIadsOxJVeqsMFxnZ8ePR7d8IbnaF4sAwBVJv9rrfODPEQ2C9fF3beoABpITdfzEk0ZDzGTTQfvKv63xI00PeZoABGO", - "WebhookSecret": "whsec_8d189c137ff170ab5e62498003512b9d073e2db50c50ed7d8712b7ef11a37543", - "ApiVersion": "2023-10-16" - }, - "Authentication": { - "Google": { - "ClientId": "472850008574-nmeepbdt4hunsk5c8krpbdmd3olc4jv6.apps.googleusercontent.com", - "ClientSecret": "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" - }, - "Microsoft": { - "ClientId": "b411606a-e574-4f59-b7cd-10dd941b9fa3", - "ClientSecret": "T0.8Q~an.51iW1H0DVjL2i1bmSK_qTgVQOuEmapK" - }, - "CookieSettings": { - "SecurePolicy": "Always", - "SameSiteMode": "Lax", - "HttpOnly": true, - "ExpireTimeSpan": "7.00:00:00" - } - }, - "Plans": { - "Basic": { - "PriceId": "price_1RjUskBMIadsOxJVgLwlVo1y", - "Price": 9.90, - "MaxLinks": 5, - "Features": [ "basic_themes", "simple_analytics" ] - }, - "Professional": { - "PriceId": "price_1RjUv9BMIadsOxJVORqlM4E9", - "Price": 24.90, - "MaxLinks": 15, - "Features": [ "all_themes", "advanced_analytics" ] - }, - "Premium": { - "PriceId": "price_1RjUw0BMIadsOxJVmdouNV1g", - "Price": 29.90, - "MaxLinks": -1, - "Features": [ "custom_themes", "full_analytics", "priority_support" ] - }, - "BasicYearly": { - "PriceId": "price_basic_yearly_placeholder", - "Price": 99.00, - "MaxLinks": 5, - "Features": [ "basic_themes", "simple_analytics" ], - "Interval": "year" - }, - "ProfessionalYearly": { - "PriceId": "price_professional_yearly_placeholder", - "Price": 249.00, - "MaxLinks": 15, - "Features": [ "all_themes", "advanced_analytics" ], - "Interval": "year" - }, - "PremiumYearly": { - "PriceId": "price_premium_yearly_placeholder", - "Price": 299.00, - "MaxLinks": -1, - "Features": [ "custom_themes", "full_analytics", "priority_support" ], - "Interval": "year" - } - }, - "Moderation": { - "PriorityTimeframes": { - "Trial": "7.00:00:00", - "Basic": "7.00:00:00", - "Professional": "3.00:00:00", - "Premium": "1.00:00:00" - }, - "MaxAttempts": 3, - "ModeratorEmail": "ricardo.carneiro@jobmaker.com.br", - "ModeratorEmails": [ - "rrcgoncalves@gmail.com", - "rirocarneiro@gmail.com" - ], - "PreviewTokenExpirationHours": 4, - "AutoRejectDays": 30 - }, - "SendGrid": { - "ApiKey": "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", - "FromEmail": "ricardo.carneiro@jobmaker.com.br", - "FromName": "BCards - Staging", - "ReplyToEmail": "ricardo.carneiro@jobmaker.com.br" - }, - "BaseUrl": "http://192.168.0.100:8090", - "Environment": { - "Name": "Release", - "IsStagingEnvironment": true, - "AllowTestData": true, - "EnableDetailedErrors": false - }, - "Performance": { - "EnableCaching": true, - "CacheExpirationMinutes": 30, - "EnableCompression": true, - "EnableResponseCaching": true - }, - "Security": { - "EnableHttpsRedirection": false, - "EnableHsts": false, - "RequireHttpsMetadata": false, - "CorsOrigins": [ - "http://192.168.0.100:8090", - "http://localhost:8090" - ] - }, - "HealthChecks": { - "Enabled": true, - "Endpoints": { - "Health": "/health", - "Ready": "/ready", - "Live": "/live" - }, - "MongoDb": { - "Enabled": true, - "Timeout": "10s" - } - }, - "Monitoring": { - "EnableMetrics": true, - "MetricsEndpoint": "/metrics", - "EnableTracing": false - }, - "Features": { - "EnablePreviewMode": true, - "EnableModerationWorkflow": true, - "EnableAnalytics": true, - "EnableFileUploads": true, - "MaxFileUploadSize": "5MB" - } -} \ No newline at end of file + "BaseUrl": "http://192.168.0.100:8080" +} diff --git a/src/BCards.Web/appsettings.json b/src/BCards.Web/appsettings.json index 156b0cf..519fc70 100644 --- a/src/BCards.Web/appsettings.json +++ b/src/BCards.Web/appsettings.json @@ -2,33 +2,20 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft.AspNetCore": "Warning" + "Microsoft.AspNetCore": "Warning", + "Microsoft.Hosting.Lifetime": "Information" } }, "AllowedHosts": "*", - "MongoDb": { - "ConnectionString": "mongodb://localhost:27017", - "DatabaseName": "BCardsDB" - }, "Stripe": { "PublishableKey": "pk_test_51RjUmIBMIadsOxJVP4bWc54pHEOSf5km1hpOkOBSoGVoKxI46N4KSWtevpXCSq68OjFazBuXmPJGBwZ1KDN5MNJy003lj1YmAS", "SecretKey": "sk_test_51RjUmIBMIadsOxJVeqsMFxnZ8ePR7d8IbnaF4sAwBVJv9rrfODPEQ2C9fF3beoABpITdfzEk0ZDzGTTQfvKv63xI00PeZoABGO", "WebhookSecret": "whsec_8d189c137ff170ab5e62498003512b9d073e2db50c50ed7d8712b7ef11a37543" }, - "Authentication": { - "Google": { - "ClientId": "472850008574-nmeepbdt4hunsk5c8krpbdmd3olc4jv6.apps.googleusercontent.com", - "ClientSecret": "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" - }, - "Microsoft": { - "ClientId": "b411606a-e574-4f59-b7cd-10dd941b9fa3", - "ClientSecret": "T0.8Q~an.51iW1H0DVjL2i1bmSK_qTgVQOuEmapK" - } - }, "Plans": { "Basic": { "Name": "Básico", - "PriceId": "price_1RjUskBMIadsOxJVgLwlVo1y", + "PriceId": "price_1RycPaBMIadsOxJVKioZZofK", "Price": 5.90, "MaxPages": 3, "MaxLinks": 8, @@ -40,7 +27,7 @@ }, "Professional": { "Name": "Profissional", - "PriceId": "price_1RjUv9BMIadsOxJVORqlM4E9", + "PriceId": "price_1RycQmBMIadsOxJVGqjVMaOj", "Price": 12.90, "MaxPages": 5, "MaxLinks": 20, @@ -52,7 +39,7 @@ }, "Premium": { "Name": "Premium", - "PriceId": "price_1RjUw0BMIadsOxJVmdouNV1g", + "PriceId": "price_1RycRUBMIadsOxJVkxGOh3uu", "Price": 19.90, "MaxPages": 15, "MaxLinks": -1, @@ -65,7 +52,7 @@ }, "PremiumAffiliate": { "Name": "Premium + Afiliados", - "PriceId": "price_premium_affiliate_monthly", + "PriceId": "price_1RycTaBMIadsOxJVeDLseXQq", "Price": 29.90, "MaxPages": 15, "MaxLinks": -1, @@ -78,7 +65,7 @@ }, "BasicYearly": { "Name": "Básico Anual", - "PriceId": "price_basic_yearly_placeholder", + "PriceId": "price_1RycWgBMIadsOxJVGdtEeoMS", "Price": 59.00, "MaxPages": 3, "MaxLinks": 8, @@ -90,7 +77,7 @@ }, "ProfessionalYearly": { "Name": "Profissional Anual", - "PriceId": "price_professional_yearly_placeholder", + "PriceId": "price_1RycXdBMIadsOxJV5cNX7dHm", "Price": 129.00, "MaxPages": 5, "MaxLinks": 20, @@ -102,7 +89,7 @@ }, "PremiumYearly": { "Name": "Premium Anual", - "PriceId": "price_premium_yearly_placeholder", + "PriceId": "price_1RycYnBMIadsOxJVPdKmzy4m", "Price": 199.00, "MaxPages": 15, "MaxLinks": -1, @@ -115,7 +102,7 @@ }, "PremiumAffiliateYearly": { "Name": "Premium + Afiliados Anual", - "PriceId": "price_premium_affiliate_yearly", + "PriceId": "price_1RycaEBMIadsOxJVEhsdB2Y1", "Price": 299.00, "MaxPages": 15, "MaxLinks": -1, @@ -127,6 +114,20 @@ "Interval": "year" } }, + "MongoDb": { + "ConnectionString": "mongodb://admin:c4rn31r0@129.146.116.218:27017,141.148.162.114:27017/BCardsDB?replicaSet=rs0&authSource=admin", + "DatabaseName": "BCardsDB" + }, + "Authentication": { + "Google": { + "ClientId": "472850008574-nmeepbdt4hunsk5c8krpbdmd3olc4jv6.apps.googleusercontent.com", + "ClientSecret": "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" + }, + "Microsoft": { + "ClientId": "b411606a-e574-4f59-b7cd-10dd941b9fa3", + "ClientSecret": "T0.8Q~an.51iW1H0DVjL2i1bmSK_qTgVQOuEmapK" + } + }, "Moderation": { "PriorityTimeframes": { "Trial": "7.00:00:00",