Phase 10: new course and Docker only
Record the course the user chose on 2 December 2026 and make the container the only form of Anubis. - ADR 0021-0026: new roadmap (phases 10-24, readings per phase, the spec-to-ADR table, merge and tag only after the user's yes), Docker only, maths-only decisions, bans turned into limits on margin accounts, eToro Demo as currency venue and forward tests, strategy championship. ROADMAP rewritten from phase 10; STATE, CLAUDE.md, SVILUPPO, README, API-NOTES and the manuals without the desktop. - Remove the desktop: Anubis.Desktop, Anubis.Setup, deploy/windows, release-win and desktop-win, config.toml, PlatformKind, ANUBIS_PLATFORM, DPAPI with the ProtectedData package and the first-run wizard. Outside a container the server needs --data-dir, listens on 127.0.0.1 only and refuses foreign hosts; server and guard refuse --platform desktop with an Italian message and exit code 2. The demo keeps its key in a file and its error-page choices need no startup password. The diagnostics report says where the server runs from its own environment. - Lighter image: restore and publish for linux-x64 only, and leave out the Windows libraries ONNX Runtime copies anyway (829 MB to 410 MB on disk, /app from 282 MB to 42 MB). Rotating Docker logs in the Unraid template, the manual and the compose; backtest and learning run as one-shot commands. tasks dev uses artifacts/dev-data. refs #113 #114 #115 #78 #80 #81 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c57b3e84c
commit
e9ac6dccc9
95 files changed
+1426
-1604
No files matched your search
@@ -12,15 +12,13 @@ return command switch
|
||||
{
|
||||
"check" => Check(),
|
||||
"test" => Test(Environment.GetEnvironmentVariable("ANUBIS_TEST_DB") ?? "sqlite", rest),
|
||||
"dev" => Run("dotnet", ["watch", "--project", "src/Anubis.Server", "run", .. rest]),
|
||||
"dev" => Dev(rest),
|
||||
"build" => BuildImage("dev"),
|
||||
"ci" => Ci(),
|
||||
"hooks" => Step("Attivazione dell'hook pre-commit (.githooks)", "git", ["config", "core.hooksPath", ".githooks"]) ?? 0,
|
||||
"seed-demo" => Run("dotnet", ["run", "--project", "src/Anubis.Server", "-c", "Release", "--", "--demo", .. rest]),
|
||||
"screenshots" => Screenshots(rest),
|
||||
"release-win" => ReleaseWindows(),
|
||||
"ci-service-log" => ServiceLog.Print(rest.Length > 0 ? rest[0] : "postgres"),
|
||||
"desktop-win" => NotYet("desktop-win", 10),
|
||||
_ => Help(),
|
||||
};
|
||||
|
||||
@@ -90,7 +88,7 @@ int BuildImage(string tag) =>
|
||||
string Commit()
|
||||
{
|
||||
// What the Dockerfile copies, and what decides it.
|
||||
string[] imageSources = ["Directory.Build.props", "Directory.Packages.props", "global.json", ".dockerignore", "src", "deploy/docker", "docs/design/logo", "docs/backtests", "docs/learning"];
|
||||
string[] imageSources = ["Directory.Build.props", "Directory.Build.targets", "Directory.Packages.props", "global.json", ".dockerignore", "src", "deploy/docker", "docs/design/logo", "docs/backtests", "docs/learning"];
|
||||
var commit = Git("rev-parse", "HEAD");
|
||||
return commit is null ? "" : Git(["status", "--porcelain", "--", .. imageSources]) is "" ? commit : commit + "-dirty";
|
||||
}
|
||||
@@ -225,43 +223,31 @@ static int FreePort()
|
||||
return port;
|
||||
}
|
||||
|
||||
// The zip of a trial release for Windows (ADR 0013, point 6): the server, a start script and the instructions, before
|
||||
// the Phase 10 installer exists. It needs the ASP.NET Core 10 runtime on the computer.
|
||||
int ReleaseWindows()
|
||||
// The server on this computer for development (ADR 0022): the shape of the container, with its own data folder
|
||||
// (artifacts/dev-data, ignored by git) and the development values of docker-compose.yml where the variables are missing.
|
||||
// Outside a container it listens only on 127.0.0.1.
|
||||
int Dev(string[] arguments)
|
||||
{
|
||||
var version = Version();
|
||||
var name = $"anubis-{version}-win-x64";
|
||||
var output = Path.Combine(root, "artifacts", "release");
|
||||
var folder = Path.Combine(output, name);
|
||||
if (Directory.Exists(folder))
|
||||
var server = arguments.Contains("--data-dir") ? arguments : [.. arguments, "--data-dir", Path.Combine(root, "artifacts", "dev-data")];
|
||||
// The development values of docker-compose.yml, with SQLite: never used by a real installation.
|
||||
(string Key, string Value)[] defaults =
|
||||
[
|
||||
("ANUBIS_DB_ENGINE", "sqlite"),
|
||||
("ANUBIS_SECRET_KEY", "dev-only-secret-key-change-me-0123456789"),
|
||||
("ANUBIS_ADMIN_PASSWORD", "dev-only-change-me"),
|
||||
("ANUBIS_ALLOW_LIVE", "0"),
|
||||
("TZ", "Europe/Rome"),
|
||||
];
|
||||
var env = new Dictionary<string, string>(StringComparer.Ordinal);
|
||||
foreach (var (key, value) in defaults)
|
||||
{
|
||||
Directory.Delete(folder, recursive: true);
|
||||
if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(key)))
|
||||
{
|
||||
env[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
var failed = Step($"Pubblicazione del server {version} per Windows", "dotnet",
|
||||
["publish", "src/Anubis.Server", "-c", "Release", "-r", "win-x64", "--self-contained", "false", "-o", folder]);
|
||||
if (failed is { } code)
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
foreach (var file in Directory.EnumerateFiles(Path.Combine(root, "deploy", "windows")))
|
||||
{
|
||||
File.Copy(file, Path.Combine(folder, Path.GetFileName(file)), overwrite: true);
|
||||
}
|
||||
|
||||
var zip = Path.Combine(output, name + ".zip");
|
||||
File.Delete(zip);
|
||||
System.IO.Compression.ZipFile.CreateFromDirectory(folder, zip, System.IO.Compression.CompressionLevel.Optimal, includeBaseDirectory: true);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine($"== Pronto: {zip} ({(new FileInfo(zip).Length / 1048576.0).ToString("0.0", CultureInfo.InvariantCulture)} MB)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int NotYet(string name, int phase)
|
||||
{
|
||||
Console.Error.WriteLine($"'tasks {name}' arriva nella Fase {phase.ToString(CultureInfo.InvariantCulture)}.");
|
||||
return 2;
|
||||
return Run("dotnet", ["watch", "--project", "src/Anubis.Server", "run", "--", .. server], env);
|
||||
}
|
||||
|
||||
int Help()
|
||||
@@ -270,15 +256,13 @@ int Help()
|
||||
Comandi di Anubis (ADR 0003):
|
||||
tasks check ripristino bloccato, formattazione, compilazione, test
|
||||
tasks test solo i test (motore da ANUBIS_TEST_DB, predefinito sqlite)
|
||||
tasks dev avvia il server e lo riavvia a ogni modifica
|
||||
tasks dev avvia il server su questo computer (dati in artifacts/dev-data) e lo riavvia a ogni modifica
|
||||
tasks build costruisce l'immagine Docker
|
||||
tasks ci come la CI: check, test su PostgreSQL, immagine
|
||||
tasks hooks attiva l'hook che esegue check prima di ogni commit
|
||||
tasks seed-demo avvia la modalità dimostrativa (dati dell'appendice F, database a parte)
|
||||
tasks screenshots fotografa le schermate dimostrative a 1440 e 390 pixel
|
||||
tasks release-win zip di prova per Windows in artifacts/release (ADR 0013)
|
||||
tasks ci-service-log nella CI: registro e memoria del PostgreSQL dei test
|
||||
tasks desktop-win installatore Windows (Fase 10)
|
||||
""");
|
||||
return command == "help" ? 0 : 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user