mirror of
https://github.com/azaion/admin.git
synced 2026-06-21 13:11:10 +00:00
refactor: remove deploy.cmd and update Dockerfile for health checks
- Deleted the deploy.cmd script as it was no longer needed. - Updated Dockerfile to include curl for health checks and added a non-root user for improved security. - Modified health check command to use curl for better reliability. - Adjusted docker-compose.test.yml to reflect changes in health check configuration. - Cleaned up appsettings.json and removed unused configuration properties. - Removed Resource entity and related requests from the codebase as part of the architectural shift. - Updated documentation to reflect the removal of hardware binding and related endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace Azaion.Common.Requests;
|
||||
|
||||
public class GetUpdateRequest
|
||||
{
|
||||
public string Architecture { get; set; } = null!;
|
||||
public string DevStage { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Map of <c>resource_name → currently-installed-version</c>. Resources missing
|
||||
/// from the map are treated as "device has no version of this resource yet" and
|
||||
/// will be returned in the response if any version exists server-side.
|
||||
/// </summary>
|
||||
public Dictionary<string, string> CurrentVersions { get; set; } = new();
|
||||
}
|
||||
|
||||
public class GetUpdateValidator : AbstractValidator<GetUpdateRequest>
|
||||
{
|
||||
public GetUpdateValidator()
|
||||
{
|
||||
RuleFor(r => r.Architecture).NotEmpty().MaximumLength(40);
|
||||
RuleFor(r => r.DevStage).NotEmpty().MaximumLength(40);
|
||||
}
|
||||
}
|
||||
|
||||
public class ResourceUpdateItem
|
||||
{
|
||||
public string ResourceName { get; set; } = null!;
|
||||
public string Version { get; set; } = null!;
|
||||
public string CdnUrl { get; set; } = null!;
|
||||
public string Sha256 { get; set; } = null!;
|
||||
public string EncryptionKey { get; set; } = null!;
|
||||
public long SizeBytes { get; set; }
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace Azaion.Common.Requests;
|
||||
|
||||
public class PublishResourceRequest
|
||||
{
|
||||
public string ResourceName { get; set; } = null!;
|
||||
public string DevStage { get; set; } = null!;
|
||||
public string Architecture { get; set; } = null!;
|
||||
public string Version { get; set; } = null!;
|
||||
public string CdnUrl { get; set; } = null!;
|
||||
public string Sha256 { get; set; } = null!;
|
||||
public string EncryptionKey { get; set; } = null!;
|
||||
public long SizeBytes { get; set; }
|
||||
}
|
||||
|
||||
public class PublishResourceValidator : AbstractValidator<PublishResourceRequest>
|
||||
{
|
||||
public PublishResourceValidator()
|
||||
{
|
||||
RuleFor(r => r.ResourceName).NotEmpty().MaximumLength(120);
|
||||
RuleFor(r => r.DevStage).NotEmpty().MaximumLength(40);
|
||||
RuleFor(r => r.Architecture).NotEmpty().MaximumLength(40);
|
||||
RuleFor(r => r.Version).NotEmpty().MaximumLength(40);
|
||||
RuleFor(r => r.CdnUrl).NotEmpty().MaximumLength(500);
|
||||
RuleFor(r => r.Sha256).NotEmpty().MaximumLength(128);
|
||||
RuleFor(r => r.EncryptionKey).NotEmpty();
|
||||
RuleFor(r => r.SizeBytes).GreaterThan(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user