Add deployment mode
This commit is contained in:
@@ -327,4 +327,16 @@ app.UseEndpoints(endpoints =>
|
||||
});
|
||||
});
|
||||
|
||||
// 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.");
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"RunOrleansGrains": false,
|
||||
"DeploymentMode": false,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
"Dsn": "https://698e00d7cb404b049aff3881e5a47f6b@bugcenter.apps.managing.live/1"
|
||||
},
|
||||
"RunOrleansGrains": true,
|
||||
"DeploymentMode": false,
|
||||
"AllowedHosts": "*",
|
||||
"WorkerBotManager": true,
|
||||
"WorkerBalancesTracking": true,
|
||||
|
||||
@@ -67,5 +67,6 @@
|
||||
"ButtonExpirationMinutes": 10
|
||||
},
|
||||
"RunOrleansGrains": true,
|
||||
"DeploymentMode": false,
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Reference in New Issue
Block a user