Set connection string based on environment

This commit is contained in:
ashutosh.nehete 2025-04-24 18:26:17 +05:30
parent 8955bf1e6a
commit 9976c365eb
3 changed files with 25 additions and 24 deletions

View File

@ -9,5 +9,11 @@
"AllowedOrigins": "*",
"AllowedMethods": "*",
"AllowedHeaders": "*"
},
"ConnectionStrings": {
"DefaultConnectionString": "Server=localhost;port=3306;User ID=root;Password=root;Database=MarcoBMS2"
},
"MongoDB": {
"SerilogDatabaseUrl": "mongodb://localhost:27017/DotNetLogs"
}
}

View File

@ -1,11 +1,24 @@
{
"AllowedHosts": "*",
"Cors": {
"AllowedOrigins": "http://localhost:4173",
"AllowedOrigins": "https://app.marcoaiot.com",
"AllowedMethods": "*",
"AllowedHeaders": "*"
},
"ConnectionStrings": {
"DefaultConnectionString": "Server=147.93.98.152;User ID=devuser;Password=AppUser@123$;Database=MarcoBMS1"
},
"AppSettings": {
"WebFrontendUrl": "https://app.marcoaiot.com",
"ImagesBaseUrl": "https://app.marcoaiot.com"
},
"Jwt": {
"Issuer": "https://app.marcoaiot.com",
"Audience": "https://app.marcoaiot.com",
"Key": "sworffishhkjfa9dnfdndfu33infnajfj",
"ExpiresInMinutes": 60,
"RefreshTokenExpiresInDays": 7
},
"MongoDB": {
"SerilogDatabaseUrl": "mongodb://localhost:27017/DotNetLogs"
}
}

View File

@ -11,7 +11,6 @@
"Microsoft": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Warning",
"Microsoft.AspNetCore.Mvc.Infrastructure": "Warning"
//"Serilog.AspNetCore.RequestLoggingMiddleware": "Warning"
}
},
"WriteTo": [
@ -19,19 +18,6 @@
"Name": "Async",
"Args": {
"configure": [
{
"Name": "MongoDB",
"Args": {
"databaseUrl": "mongodb://localhost:27017/DotNetLogs",
//"databaseUrl": "mongodb://devuser:xxxxx@147.93.98.152:27017/MarcoPMS?authSource=admin",
"collectionName": "application_logs",
"batchPostingLimit": 50,
"cappedMaxSizeMb": "1024",
"cappedMaxDocuments": "1000",
"rollingInterval": "Day"
//"outputTemplate": "[{Timestamp:yyyy/MM/dd HH:mm} {Level:u3}] {SourceContext}:{NewLine} {Message:lj}{Exception}{NewLine}"
}
},
{
"Name": "File",
"Args": {
@ -61,12 +47,6 @@
"WithThreadId"
]
},
"ConnectionStrings": {
// "DefaultConnectionString": "Server=103.50.160.45;User ID=marcowvh_admin;Password=Marcoemp@123;Database=marcowvh_empattendanceci",
//"DefaultConnectionString": "Server=localhost;port=3306;User ID=root;Password=root;Database=MarcoBMS2"
"DefaultConnectionString": "Server=147.93.98.152;User ID=devuser;Password=AppUser@123$;Database=MarcoBMS1"
},
"AppSettings": {
"WebFrontendUrl": "http://localhost:5173",
"ImagesBaseUrl": "http://localhost:5173"
@ -96,8 +76,10 @@
"Password": "qrtq wfuj hwpp fhqr"
},
"Contact": {
//"Emails": "ashutosh.nehete@marcoaiot.com;vikas@marcoaiot.com;umesh@marcoait.com"
"Emails": "ashutosh.nehete@marcoaiot.com"
"Emails": "ashutosh.nehete@marcoaiot.com;vikas@marcoaiot.com;umesh@marcoait.com"
},
"MongoDB": {
"SerilogDatabaseUrl": "mongodb://localhost:27017/DotNetLogs"
},
"AWS": {
"AccessKey": "AKIARZDBH3VDMSUUY2FX",