Хранить вложения в приватном S3 и сверять их с PostgreSQL.

This commit is contained in:
2026-11-06 20:13:44 +03:00
parent ec540a1a72
commit a6bb7cbb8b
34 changed files with 3285 additions and 31 deletions
+33
View File
@@ -0,0 +1,33 @@
using System;
using System.Diagnostics;
using System.IO;
class Program
{
static int Run(string args)
{
string dir = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ".."));
var start = new ProcessStartInfo("docker", args)
{
WorkingDirectory = dir,
UseShellExecute = false
};
var process = Process.Start(start);
process.WaitForExit();
return process.ExitCode;
}
static int Main()
{
string name = Path.GetFileName(Environment.GetCommandLineArgs()[0]).ToLowerInvariant();
if (name.Contains("stop"))
{
string id = Environment.GetEnvironmentVariable("TARGET_INSTANCE_ID");
if (id != "api-1" && id != "api-2") return 2;
return Run("compose --env-file .env stop -t 2 " + id);
}
int up = Run("compose --env-file .env up -d --no-recreate --no-build postgres minio api-1 api-2 lb");
if (up != 0) return up;
return Run("compose --env-file .env restart postgres minio api-1 api-2 lb");
}
}