Add deployment mode

This commit is contained in:
2025-08-15 17:01:19 +07:00
parent 0966eace58
commit f58d1cea3b
4 changed files with 16 additions and 1 deletions

View File

@@ -327,4 +327,16 @@ app.UseEndpoints(endpoints =>
}); });
}); });
app.Run(); // Conditionally run the application based on deployment mode
var deploymentMode = builder.Configuration.GetValue<bool>("DeploymentMode", false);
if (!deploymentMode)
{
Console.WriteLine("Application starting in normal mode...");
app.Run();
}
else
{
Console.WriteLine("Application configured for deployment mode - skipping app.Run()");
Console.WriteLine("All services have been configured and the application is ready for deployment.");
}

View File

@@ -1,5 +1,6 @@
{ {
"RunOrleansGrains": false, "RunOrleansGrains": false,
"DeploymentMode": false,
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",

View File

@@ -31,6 +31,7 @@
"Dsn": "https://698e00d7cb404b049aff3881e5a47f6b@bugcenter.apps.managing.live/1" "Dsn": "https://698e00d7cb404b049aff3881e5a47f6b@bugcenter.apps.managing.live/1"
}, },
"RunOrleansGrains": true, "RunOrleansGrains": true,
"DeploymentMode": false,
"AllowedHosts": "*", "AllowedHosts": "*",
"WorkerBotManager": true, "WorkerBotManager": true,
"WorkerBalancesTracking": true, "WorkerBalancesTracking": true,

View File

@@ -67,5 +67,6 @@
"ButtonExpirationMinutes": 10 "ButtonExpirationMinutes": 10
}, },
"RunOrleansGrains": true, "RunOrleansGrains": true,
"DeploymentMode": false,
"AllowedHosts": "*" "AllowedHosts": "*"
} }