diff --git a/.drone.yml b/.drone.yml index d73b3c5..e478161 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,13 +11,7 @@ steps: - name: test image: mcr.microsoft.com/dotnet/sdk:5.0 commands: - - ls - dotnet test AOC2021.Test - - cd AOC2021 - - ls - - rm -r bin - - rm -r obj - - ls - name: build-aoc-2021 image: plugins/docker @@ -34,6 +28,6 @@ steps: - name: finish image: busybox commands: - - echo 'Finished deployment for Aincrad' + - echo 'Finished deployment for AOC2021' depends_on: - build-aoc-2021 \ No newline at end of file diff --git a/AOC2021/Dockerfile b/AOC2021/Dockerfile index 04ec187..9c6486b 100644 --- a/AOC2021/Dockerfile +++ b/AOC2021/Dockerfile @@ -1,5 +1,7 @@ FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base WORKDIR /app +EXPOSE 80 +EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build WORKDIR /src @@ -14,5 +16,8 @@ RUN dotnet publish "AOC2021.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app + +ENV ASPNETCORE_ENVIRONMENT=Production +ENV ASPNETCORE_URLS=http://+:80 COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "AOC2021.dll"] \ No newline at end of file