Merge pull request 'test' (#53) from test into main
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/promote/prod Build is passing

Reviewed-on: #53
This commit was merged in pull request #53.
This commit is contained in:
2026-03-08 13:33:08 +02:00
3 changed files with 6 additions and 14 deletions

View File

@@ -82,10 +82,6 @@ type: docker
name: deploy name: deploy
depends_on: depends_on:
- package - package
trigger:
event:
exclude:
- promote
clone: clone:
disable: true disable: true

View File

@@ -1,10 +1,11 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
WORKDIR /app WORKDIR /app
COPY ./SampleApi/bin/Release/net8.0/publish/ . USER app
COPY --chown=app:app ./SampleApi/bin/Release/net8.0/publish/ .
ENV ASPNETCORE_HTTP_PORTS=8081
EXPOSE 8081 EXPOSE 8081
ENV ASPNETCORE_HTTP_PORTS=8081
WORKDIR /app
ENTRYPOINT ["dotnet", "SampleApi.dll"] ENTRYPOINT ["dotnet", "SampleApi.dll"]

View File

@@ -1,25 +1,20 @@
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers(); builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer(); builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(); builder.Services.AddSwaggerGen();
var app = builder.Build(); var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment()) if (app.Environment.IsDevelopment())
{ {
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(); app.UseSwaggerUI();
} }
app.UseRouting();
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseAuthorization(); app.UseAuthorization();
app.MapControllers(); app.MapControllers();
app.Run(); app.Run();