Implemented first iteration of the docker-based server installer. Added restore functionality for the installer. Wired up for basic installer testing

This commit is contained in:
2025-07-29 22:24:46 +02:00
parent f57d33cb1e
commit bb81ca9674
9 changed files with 353 additions and 27 deletions

View File

@@ -8,19 +8,20 @@ public class DefaultRestorer : IRestorer
private readonly ILogger<DefaultRestorer> Logger;
private readonly IConsole Console;
private readonly IProvisioner Provisioner;
private readonly IInstaller Installer;
private readonly IStatistics Statistics;
public DefaultRestorer(
ILogger<DefaultRestorer> logger,
IConsole console,
IProvisioner provisioner,
IStatistics statistics
)
IStatistics statistics, IInstaller installer)
{
Logger = logger;
Console = console;
Provisioner = provisioner;
Statistics = statistics;
Installer = installer;
}
public Task Initialize()
@@ -44,11 +45,19 @@ public class DefaultRestorer : IRestorer
return ServerState.Online;
}
else
if (Installer.IsRunning)
{
Logger.LogDebug("Nothing found to restore");
return ServerState.Offline;
Logger.LogDebug("Detected installation to restore");
await Console.AttachToInstallation();
await Statistics.SubscribeToInstallation();
return ServerState.Installing;
}
Logger.LogDebug("Nothing found to restore");
return ServerState.Offline;
}
public ValueTask DisposeAsync()