From 1ec1f2e0bf92c111d28fbb56d3b068893280a871 Mon Sep 17 00:00:00 2001 From: Xander Sigler Date: Wed, 26 Jan 2022 23:04:30 -0800 Subject: [PATCH] Added exposed ports for container --- .drone.yml | 8 +------- AOC2021/Dockerfile | 5 +++++ 2 files changed, 6 insertions(+), 7 deletions(-) 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