22 Commits
Author SHA1 Message Date
khwezi f5d6e9e35c Merge pull request 'Updated Feature package to fix quartz job misfire' (#16) from migration into master
Reviewed-on: #16
2026-05-15 09:59:48 +02:00
khwezi de5fa0fdd4 Updated Feature package to fix quartz job misfire
continuous-integration/drone/pr Build is passing
2026-05-15 09:58:47 +02:00
khwezi f084ff97e5 Merge pull request 'Updated time to UTC' (#15) from migration into master
Reviewed-on: #15
2026-05-15 08:55:56 +02:00
khwezi d1020581cf Updated time to UTC
continuous-integration/drone/pr Build is passing
2026-05-15 08:55:16 +02:00
khwezi f715c50306 Merge pull request 'Updated job scheduler' (#14) from migration into master
Reviewed-on: #14
2026-05-10 18:24:03 +02:00
khwezi 7fc448d525 Updated job scheduler
continuous-integration/drone/pr Build is passing
2026-05-10 18:23:09 +02:00
khwezi fcd8c2ede7 Merge pull request 'Updated to use new shop database' (#13) from migration into master
Reviewed-on: #13
2026-05-10 11:22:46 +02:00
khwezi 8f48e11738 Updated to use new shop database
continuous-integration/drone/pr Build is passing
2026-05-10 11:22:19 +02:00
khwezi 9ae11b9b03 Merge pull request 'Populated README' (#12) from migration into master
Reviewed-on: #12
2026-05-10 09:48:50 +02:00
khwezi a44dcdb8f8 Populated README
continuous-integration/drone/pr Build is passing
2026-05-10 09:48:02 +02:00
khwezi 56f967c6e4 Merge pull request 'Fixed image and tag naming' (#11) from migration into master
Reviewed-on: #11
2026-05-10 09:09:01 +02:00
khwezi bb42713fb2 Fixed image and tag naming
continuous-integration/drone/pr Build is passing
2026-05-10 09:08:27 +02:00
khwezi 58312d489b Merge pull request 'migration' (#10) from migration into master
Reviewed-on: #10
2026-05-10 09:04:22 +02:00
khwezi 5ace2129e1 Merge pull request 'migration' (#9) from migration into master
Reviewed-on: #9
2026-05-10 08:26:43 +02:00
khwezi 2bf2d79739 Merge pull request 'Migrated aspire key' (#8) from migration into master
Reviewed-on: #8
2026-05-09 18:01:08 +02:00
khwezi 664bbd858b Merge pull request 'Removed webhook setting' (#7) from migration into master
Reviewed-on: #7
2026-05-09 17:50:30 +02:00
khwezi c36ff28a84 Merge pull request 'Removed user commands from dockerfile' (#6) from migration into master
Reviewed-on: #6
2026-05-09 17:30:16 +02:00
khwezi 0c24613dd3 Merge pull request 'Fixed dockerfile' (#5) from migration into master
Reviewed-on: #5
2026-05-09 17:24:15 +02:00
khwezi 8bcd0f60c3 Merge pull request 'Fixed restore commands' (#4) from migration into master
Reviewed-on: #4
2026-05-09 17:20:20 +02:00
khwezi 186c4b1e85 Merge pull request 'Refactored pipeline to use the correct solution name' (#3) from migration into master
Reviewed-on: #3
2026-05-09 17:18:46 +02:00
khwezi 98f46b5e13 Merge pull request 'Light refactor' (#2) from migration into master
Reviewed-on: #2
2026-05-09 17:17:25 +02:00
khwezi 9d9cb3761a Merge pull request 'Refactored deployment files' (#1) from migration into master
Reviewed-on: #1
2026-05-09 17:14:25 +02:00
7 changed files with 51 additions and 20 deletions
+6 -4
View File
@@ -32,7 +32,7 @@ steps:
repo: nexus.khongisa.co.za/litecharms-shop repo: nexus.khongisa.co.za/litecharms-shop
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ] tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ]
custom_labels: custom_labels:
- org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/scheduler - org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/litecharms-shop
- org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER} - org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER}
- org.opencontainers.image.revision=${DRONE_COMMIT_SHA} - org.opencontainers.image.revision=${DRONE_COMMIT_SHA}
username: { from_secret: docker_username } username: { from_secret: docker_username }
@@ -47,18 +47,18 @@ steps:
commands: commands:
- echo "169.255.58.144 gitea.khongisa.co.za" >> /etc/hosts - echo "169.255.58.144 gitea.khongisa.co.za" >> /etc/hosts
- apk add --no-cache curl - apk add --no-cache curl
- git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/scheduler.git - git remote set-url origin https://$${GITEA_USER}:$${GITEA_PASS}@gitea.khongisa.co.za/litecharms/litecharmsshop.git
- git tag 1.${DRONE_BUILD_NUMBER} - git tag 1.${DRONE_BUILD_NUMBER}
- git push origin 1.${DRONE_BUILD_NUMBER} - git push origin 1.${DRONE_BUILD_NUMBER}
- | - |
curl -X POST "https://gitea.khongisa.co.za/api/v1/repos/litecharms/scheduler/releases" \ curl -X POST "https://gitea.khongisa.co.za/api/v1/repos/litecharms/litecharmsshop/releases" \
-H "Authorization: token $${GITEA_TOKEN}" \ -H "Authorization: token $${GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{ -d "{
\"tag_name\": \"1.${DRONE_BUILD_NUMBER}\", \"tag_name\": \"1.${DRONE_BUILD_NUMBER}\",
\"target_commitish\": \"${DRONE_COMMIT_SHA}\", \"target_commitish\": \"${DRONE_COMMIT_SHA}\",
\"name\": \"Release 1.${DRONE_BUILD_NUMBER}\", \"name\": \"Release 1.${DRONE_BUILD_NUMBER}\",
\"body\": \"### Artifacts\n* **Docker Image:** nexus.khongisa.co.za/litecharms-scheduler:1.${DRONE_BUILD_NUMBER}\n* **NuGet:** [View on Nexus](https://nexus.khongisa.co.za/repository/nuget-group/)\", \"body\": \"### Artifacts\n* **Docker Image:** nexus.khongisa.co.za/litecharms-shop:1.${DRONE_BUILD_NUMBER}\n* **NuGet:** [View on Nexus](https://nexus.khongisa.co.za/repository/nuget-group/)\",
\"draft\": false, \"draft\": false,
\"prerelease\": false \"prerelease\": false
}" }"
@@ -83,6 +83,8 @@ steps:
- mkdir -p $HOME/.kube - mkdir -p $HOME/.kube
- echo "$KUBE_CONFIG" > $HOME/.kube/config - echo "$KUBE_CONFIG" > $HOME/.kube/config
- kubectl apply -f litecharms-shop-uat.yml - kubectl apply -f litecharms-shop-uat.yml
- sleep 10
- kubectl rollout restart deployment/litecharms-shop -n litecharms-shop-uat
depends_on: depends_on:
- package - package
+19
View File
@@ -0,0 +1,19 @@
# LiteCharmsShop
The primary customer-facing web application for the LiteCharms platform.
## 🏗 Architecture
* **Type:** Kubernetes Deployment
* **Scale:** Horizontal scaling enabled via `replicas`.
* **Ingress:** Managed via `IngressRouter` for external traffic routing.
## 🚀 CI/CD Workflow
* **Trigger:** Pull Request to `master`.
* **Build:** Compiles .NET 10.0 source.
* **Containerize:** Docker image pushed to Nexus as `litecharms-scheduler:1.${DRONE_BUILD_NUMBER}`.
* **Deploy:** * Updates UAT via `kubectl apply`.
* Production deployment is triggered via **Promotion** to the `production` target.
## 🌐 Endpoints
* **UAT:** `https://uat-shop.khongisa.co.za` (Internal/VPN)
* **Monitoring:** Aspire Dashboard enabled via `Monitoring__Address`.
+7 -6
View File
@@ -1,9 +1,11 @@
using LiteCharms.Features.Utilities.Commands; using LiteCharms.Features.Email.Events;
using LiteCharms.Models; using LiteCharms.Features.Email.Models;
using LiteCharms.Features.ServiceBus.Abstractions;
using static LiteCharms.Features.ServiceBus.Constants;
namespace Shop.Components.Pages; namespace Shop.Components.Pages;
public partial class Contact(ISender mediator, IToastService toastService) : IDisposable public partial class Contact([FromKeyedServices(EmailServiceBus)] IEventBus emailBus, IToastService toastService) : IDisposable
{ {
public CancellationTokenSource TokenSource { get; set; } = new(); public CancellationTokenSource TokenSource { get; set; } = new();
@@ -13,10 +15,9 @@ public partial class Contact(ISender mediator, IToastService toastService) : IDi
{ {
try try
{ {
var request = SendEmailCommand.Create(Input.EmailAddress!, Input.FullName!, "shop@litecharms.co.za", var notification = SendShopEmailEnquiryEvent.Create(Input.FullName!, Input.EmailAddress!, Input.EmailSubject!, Input.Message!);
"Khongisa Shop", Input.EmailSubject!, Input.Message!);
var result = await mediator.Send(request, TokenSource.Token); var result = await emailBus.PublishAsync(notification, TokenSource.Token);
if (result.IsFailed) if (result.IsFailed)
{ {
+13 -3
View File
@@ -1,6 +1,7 @@
using LiteCharms.Extensions; using LiteCharms.Features.Extensions;
using LiteCharms.Features.Mediator;
using Shop.Components; using Shop.Components;
using static LiteCharms.Abstractions.Constants; using static LiteCharms.Features.Email.Extensions.Constants;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
@@ -14,11 +15,20 @@ builder.Services.AddBlazoredToast();
builder.Services.AddEndpointsApiExplorer(); builder.Services.AddEndpointsApiExplorer();
builder.Services.AddMediator(); builder.Services.AddMediator();
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
builder.Services.AddSalesServiceBus(); builder.Services.AddSalesServiceBus();
builder.Services.AddGeneralServiceBus(); builder.Services.AddGeneralServiceBus();
builder.Services.AddShopDatabase(builder.Configuration);
builder.Services.AddQuartzSchedulerClient(ShopSchedulerName, builder.Configuration); builder.Services.AddQuartzSchedulerClient(ShopSchedulerName, builder.Configuration);
builder.Services.AddEmailServices(builder.Configuration);
builder.Services.AddEmailServiceBus();
builder.Services.AddShopServices();
builder.Services.AddShopDatabase(builder.Configuration);
builder.Services.AddPostgresHealtchCheck(); builder.Services.AddPostgresHealtchCheck();
builder.Services.AddQuartzHealtchCheck(); builder.Services.AddQuartzHealtchCheck();
builder.Services.AddHealthChecksSupport(builder.Configuration); builder.Services.AddHealthChecksSupport(builder.Configuration);
+1 -3
View File
@@ -17,9 +17,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="LiteCharms.Extensions" Version="1.14.0" /> <PackageReference Include="LiteCharms.Features" Version="1.26.0" />
<PackageReference Include="LiteCharms.Features" Version="1.14.0" />
<PackageReference Include="LiteCharms.Models" Version="1.14.0" />
<PackageReference Include="Polly" Version="8.6.6" /> <PackageReference Include="Polly" Version="8.6.6" />
</ItemGroup> </ItemGroup>
+2 -1
View File
@@ -15,7 +15,8 @@
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information", "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Error"
} }
}, },
"AllowedHosts": "*" "AllowedHosts": "*"
+3 -3
View File
@@ -22,8 +22,8 @@ metadata:
namespace: litecharms-shop-uat namespace: litecharms-shop-uat
type: Opaque type: Opaque
data: data:
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPWxlYWRnZW5lcmF0b3ItZGV2O1VzZXJuYW1lPWxlYWRnZW5lcmF0b3I7UGFzc3dvcmQ9S2VLNDRsczRQWHBuYms7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU= connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNob3AtZGV2O1VzZXJuYW1lPXNob3AtZGV2LXVzZXI7UGFzc3dvcmQ9a1ZWbW9XS0ozeHpnUVg7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
quartz-store: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl connection-string-quartz: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw== aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
--- ---
apiVersion: v1 apiVersion: v1
@@ -81,7 +81,7 @@ spec:
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: shop-secrets name: shop-secrets
key: quartz-store key: connection-string-quartz
- name: ConnectionStrings__PostgresShop - name: ConnectionStrings__PostgresShop
valueFrom: valueFrom:
secretKeyRef: secretKeyRef: