Skip to content

Commit

Permalink
update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ZOXEXIVO committed Jul 13, 2022
1 parent 37ef059 commit 678570a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build/Jobs.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG BUILD_NUMBER

FROM geen-frontend:$BUILD_NUMBER as frontend

FROM mcr.microsoft.com/dotnet/sdk:6.0.300-alpine3.14-amd64 AS build

WORKDIR /app

COPY ./src/Backend/ ./

WORKDIR /app/Geen.Jobs

COPY --from=frontend /app/dist wwwroot

RUN dotnet publish -c Release -o /app/out -r linux-musl-x64 --self-contained true /p:PublishReadyToRun=true /p:PublishSingleFile=true --packages packages

FROM mcr.microsoft.com/dotnet/runtime-deps:6.0.5-alpine3.14-amd64 AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["./Geen.Web"]
19 changes: 19 additions & 0 deletions src/Backend/Geen.Jobs/Geen.Jobs.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Geen.Core\Geen.Core.csproj" />
<ProjectReference Include="..\Geen.Data\Geen.Data.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
</ItemGroup>

</Project>
19 changes: 19 additions & 0 deletions src/Backend/Geen.Jobs/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Geen.Jobs.Application.Jobs;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;

await Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddHostedService<SportsSyncService>();
})
.ConfigureLogging(builder =>
{
builder.ClearProviders()
.AddFilter("Microsoft", LogLevel.Error)
.AddFilter("System", LogLevel.Error)
.AddConsole();
})
.Build()
.RunAsync();

0 comments on commit 678570a

Please sign in to comment.