Compare commits
12
Commits
98f46b5e13
..
1.7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bf2d79739 | ||
|
|
6cee984d7b | ||
|
|
664bbd858b | ||
|
|
2b826189e0 | ||
|
|
c36ff28a84 | ||
|
|
5c0d8430f6 | ||
|
|
0c24613dd3 | ||
|
|
3b74138e9c | ||
|
|
8bcd0f60c3 | ||
|
|
ccf49d79fc | ||
|
|
186c4b1e85 | ||
|
|
359e50704a |
+4
-4
@@ -7,14 +7,14 @@ steps:
|
|||||||
- name: dotnet-build
|
- name: dotnet-build
|
||||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||||
commands:
|
commands:
|
||||||
- dotnet restore LiteCharms.slnx
|
- dotnet restore LiteCharmsShop.slnx
|
||||||
- dotnet build LiteCharms.slnx -c Release
|
- dotnet build LiteCharmsShop.slnx -c Release
|
||||||
|
|
||||||
- name: dotnet-test
|
- name: dotnet-test
|
||||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||||
commands:
|
commands:
|
||||||
- dotnet restore LiteCharms.slnx
|
- dotnet restore LiteCharmsShop.slnx
|
||||||
- dotnet test LiteCharms.slnx -c Release --no-restore
|
- dotnet test LiteCharmsShop.slnx -c Release --no-restore
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event: [ pull_request ]
|
event: [ pull_request ]
|
||||||
|
|||||||
+3
-8
@@ -2,24 +2,19 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ["../nuget.config", "./"]
|
COPY ["nuget.config", "./"]
|
||||||
COPY ["../Shop/Shop.csproj", "Shop/"]
|
COPY ["Shop/Shop.csproj", "Shop/"]
|
||||||
RUN dotnet restore "Shop/Shop.csproj" --configfile nuget.config
|
RUN dotnet restore "Shop/Shop.csproj" --configfile nuget.config
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN dotnet publish "../Shop/Shop.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "Shop/Shop.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
# Stage 2: Final Image
|
# Stage 2: Final Image
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN addgroup --system --gid 1000 appgroup && \
|
|
||||||
adduser --system --uid 1000 --ingroup appgroup appuser
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
EXPOSE 8081
|
EXPOSE 8081
|
||||||
|
|
||||||
COPY --from=build /app/publish .
|
COPY --from=build /app/publish .
|
||||||
|
|
||||||
RUN chown -R appuser:appgroup /app
|
|
||||||
USER appuser
|
|
||||||
|
|
||||||
ENTRYPOINT ["dotnet", "Shop.dll"]
|
ENTRYPOINT ["dotnet", "Shop.dll"]
|
||||||
+3
-5
@@ -14,12 +14,10 @@ builder.Services.AddBlazoredToast();
|
|||||||
builder.Services.AddEndpointsApiExplorer();
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
|
|
||||||
builder.Services.AddMediator();
|
builder.Services.AddMediator();
|
||||||
builder.Services.AddEmailServiceBus();
|
|
||||||
builder.Services.AddSalesServiceBus();
|
builder.Services.AddSalesServiceBus();
|
||||||
builder.Services.AddGeneralServiceBus();
|
builder.Services.AddGeneralServiceBus();
|
||||||
builder.Services.AddEmailServices(builder.Configuration);
|
builder.Services.AddShopDatabase(builder.Configuration);
|
||||||
builder.Services.AddLeadGeneratorDatabase(builder.Configuration);
|
builder.Services.AddQuartzSchedulerClient(ShopSchedulerName, ShopSchedulerInstanceId, builder.Configuration);
|
||||||
builder.Services.AddQuartzSchedulerClient(LeadGeneratorSchedulerName, LeadGeneratorSchedulerInstanceId, builder.Configuration);
|
|
||||||
|
|
||||||
builder.Services.AddPostgresHealtchCheck();
|
builder.Services.AddPostgresHealtchCheck();
|
||||||
builder.Services.AddQuartzHealtchCheck();
|
builder.Services.AddQuartzHealtchCheck();
|
||||||
@@ -28,7 +26,7 @@ builder.Services.AddHealthChecksSupport(builder.Configuration);
|
|||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>();
|
var schedulerFactory = app.Services.GetRequiredService<ISchedulerFactory>();
|
||||||
var scheduler = await schedulerFactory.GetScheduler(LeadGeneratorSchedulerName);
|
var scheduler = await schedulerFactory.GetScheduler(ShopSchedulerName);
|
||||||
|
|
||||||
if (!scheduler!.IsStarted)
|
if (!scheduler!.IsStarted)
|
||||||
await scheduler.Start();
|
await scheduler.Start();
|
||||||
|
|||||||
+3
-3
@@ -17,9 +17,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="LiteCharms.Extensions" Version="1.11.0" />
|
<PackageReference Include="LiteCharms.Extensions" Version="1.13.0" />
|
||||||
<PackageReference Include="LiteCharms.Features" Version="1.11.0" />
|
<PackageReference Include="LiteCharms.Features" Version="1.13.0" />
|
||||||
<PackageReference Include="LiteCharms.Models" Version="1.11.0" />
|
<PackageReference Include="LiteCharms.Models" Version="1.13.0" />
|
||||||
<PackageReference Include="Polly" Version="8.6.6" />
|
<PackageReference Include="Polly" Version="8.6.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ type: Opaque
|
|||||||
data:
|
data:
|
||||||
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPWxlYWRnZW5lcmF0b3ItZGV2O1VzZXJuYW1lPWxlYWRnZW5lcmF0b3I7UGFzc3dvcmQ9S2VLNDRsczRQWHBuYms7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
|
connection-string: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPWxlYWRnZW5lcmF0b3ItZGV2O1VzZXJuYW1lPWxlYWRnZW5lcmF0b3I7UGFzc3dvcmQ9S2VLNDRsczRQWHBuYms7UGVyc2lzdCBTZWN1cml0eSBJbmZvPVRydWU=
|
||||||
quartz-store: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
|
quartz-store: SG9zdD0xOTIuMTY4LjEuMTcwO0RhdGFiYXNlPXNjaGVkdWxlci1kZXY7VXNlcm5hbWU9c2NoZWR1bGVyLWRldi11c2VyO1Bhc3N3b3JkPWtWVm1vV0tKM3h6Z1FYO1BlcnNpc3QgU2VjdXJpdHkgSW5mbz1UcnVl
|
||||||
|
aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw==
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
@@ -85,11 +86,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: shop-secrets
|
name: shop-secrets
|
||||||
key: connection-string
|
key: connection-string
|
||||||
- name: ConnectionStrings__DiscordShop
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: shop-secrets
|
|
||||||
key: discord-webhook
|
|
||||||
- name: Monitoring__Address
|
- name: Monitoring__Address
|
||||||
valueFrom:
|
valueFrom:
|
||||||
configMapKeyRef:
|
configMapKeyRef:
|
||||||
|
|||||||
Reference in New Issue
Block a user