From 28a1d07e983de265e794189fd76032414bd240da Mon Sep 17 00:00:00 2001 From: prtsie Date: Sun, 5 Oct 2025 15:42:19 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0=D1=86=D0=B8=D1=8E=20?= =?UTF-8?q?=D0=BD=D0=B0=20Docker=20Hub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 12 +++++++++++- Dockerfile | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml index 9b66163..12aba23 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..73fde84 --- /dev/null +++ b/Dockerfile @@ -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"]