From 287ac31c29f803a8253eeb4798d1c4f17a42a4aa Mon Sep 17 00:00:00 2001 From: "aic.eichhorner.1227328" Date: Fri, 23 Nov 2018 14:58:23 +0100 Subject: [PATCH] changed port to 8083 and added expose --- docker-compose.yml | 2 +- service-reporting/Dockerfile | 6 +++++- service-reporting/readme.md | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8e7d00e..58b4096 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: build: ./service-reporting container_name: reporting ports: - - "8083:80" + - "8083:8083" restart: always service-twitter: diff --git a/service-reporting/Dockerfile b/service-reporting/Dockerfile index c372a86..080fad4 100644 --- a/service-reporting/Dockerfile +++ b/service-reporting/Dockerfile @@ -1,6 +1,7 @@ FROM microsoft/dotnet:2.2.100-preview3-sdk AS build-env WORKDIR /app + # Copy csproj and restore as distinct layers COPY *.csproj ./ RUN dotnet restore @@ -14,6 +15,10 @@ FROM microsoft/dotnet:2.2.0-preview3-aspnetcore-runtime WORKDIR /app COPY --from=build-env /app/out . +# set ports +EXPOSE 8083 +ENV ASPNETCORE_URLS=http://+:8083 + # copy pdf library # COPY libwkhtmltox.* ./ # install additional libaries @@ -29,7 +34,6 @@ RUN apt-get update \ --location \ https://github.com/rdvojmoc/DinkToPdf/raw/v1.0.8/v0.12.4/64%20bit/libwkhtmltox.so - # copy assets COPY assets/*.css ./assets/ ENTRYPOINT ["dotnet", "PdfService.dll"] \ No newline at end of file diff --git a/service-reporting/readme.md b/service-reporting/readme.md index 4e70534..7a08567 100644 --- a/service-reporting/readme.md +++ b/service-reporting/readme.md @@ -16,7 +16,7 @@ Tweet(string `Name`, string `Sentiment`) ## run with docker - `docker build -t service-reporting .` -- `docker run -p YOUR_PORT:80 service-reporting:latest` +- `docker run -p YOUR_PORT:8083 service-reporting:latest` ## run local ### requirements -- 2.43.0