Добавил публикацию на Docker Hub
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-10-05 15:42:19 +03:00
parent 222f90df02
commit 28a1d07e98
2 changed files with 23 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
kind: pipeline
type: docker
name: "Build and test"
name: "Backend"
steps:
- name: test
@@ -8,3 +8,13 @@ steps:
commands:
- dotnet build
- dotnet test
- name: publish
image: plugins/docker
settings:
username: prtsie
password:
from_secret: docker_pass
repo: prtsie/schengen-visa
tags:
- latest

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY . ./
RUN dotnet restore
RUN dotnet publish "SchengenVisaApi/SchengenVisaApi.csproj" -c Release -o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish ./
ENV ASPNETCORE_URLS=https://*:5000
EXPOSE 5000
ENTRYPOINT ["dotnet", "SchengenVisaApi.dll"]