From 72a6f62ea622d55cb3d4140d51af4428bd3dca79 Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Wed, 16 Aug 2023 13:36:56 +0800 Subject: [PATCH 01/14] Add dockerfile and docker-compose support --- .dockerignore | 3 +++ .gitignore | 5 ++++- docker/docker-compose.yaml | 26 ++++++++++++++++++++++++++ docker/webapi/Dockerfile | 24 ++++++++++++++++++++++++ docker/webapp/Dockerfile | 17 +++++++++++++++++ 5 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 docker/docker-compose.yaml create mode 100644 docker/webapi/Dockerfile create mode 100644 docker/webapp/Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..e002d7ebc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +**/node_modules +**/bin +**/obj \ No newline at end of file diff --git a/.gitignore b/.gitignore index 719f5ba7d..0a35501ff 100644 --- a/.gitignore +++ b/.gitignore @@ -486,4 +486,7 @@ webapp/public/.well-known* webapi/CopilotChatWebApi.sln # Tesseract OCR language data files -*.traineddata \ No newline at end of file +*.traineddata + + +appsettings.*.json diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml new file mode 100644 index 000000000..2f0ba2776 --- /dev/null +++ b/docker/docker-compose.yaml @@ -0,0 +1,26 @@ +version: '3' +services: + chat-copilot-web: + image: huangyingting/chat-copilot-web + build: + context: .. + dockerfile: docker/webapp/Dockerfile + ports: + - 3000:3000 + env_file: + - ../webapp/.env + depends_on: + chat-copilot-api: + condition: service_started + chat-copilot-api: + image: huangyingting/chat-copilot-api + build: + context: .. + dockerfile: docker/webapi/Dockerfile + ports: + - 8080:8080 + env_file: + - ../webapi/.env + environment: + - ASPNETCORE_ENVIRONMENT=Development + diff --git a/docker/webapi/Dockerfile b/docker/webapi/Dockerfile new file mode 100644 index 000000000..1eb118053 --- /dev/null +++ b/docker/webapi/Dockerfile @@ -0,0 +1,24 @@ +# Learn about building .NET container images: +# https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +WORKDIR /source + +# generate dev-certs for https +RUN dotnet dev-certs https + +# copy csproj and restore as distinct layers +COPY webapi/*.csproj . +RUN dotnet restore --use-current-runtime + +# copy everything else and build app +COPY webapi/. . +RUN dotnet publish --use-current-runtime --self-contained false --no-restore -o /app + + +# final stage/image +FROM mcr.microsoft.com/dotnet/aspnet:6.0 +WORKDIR /app +COPY --from=build /app . +COPY --from=build /root/.dotnet/corefx/cryptography/x509stores/my/* /root/.dotnet/corefx/cryptography/x509stores/my/ + +ENTRYPOINT ["./CopilotChatWebApi"] \ No newline at end of file diff --git a/docker/webapp/Dockerfile b/docker/webapp/Dockerfile new file mode 100644 index 000000000..719c0bd8b --- /dev/null +++ b/docker/webapp/Dockerfile @@ -0,0 +1,17 @@ +# builder +FROM node:lts-alpine as builder +WORKDIR /app +COPY webapp/ . +RUN yarn install \ + --prefer-offline \ + --frozen-lockfile \ + --non-interactive \ + --production=false + +# final stage/image +FROM node:lts-alpine +WORKDIR /app +COPY --from=builder /app . +ENV HOST 0.0.0.0 +EXPOSE 3000 +ENTRYPOINT [ "yarn", "start" ] \ No newline at end of file From 9eb2c93055a72d9e2fcbb1dd3e3e856ce5f4e366 Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Wed, 16 Aug 2023 14:54:39 +0800 Subject: [PATCH 02/14] Adding qdrant support in docker-compose --- docker/docker-compose.yaml | 9 ++++++++- docker/webapi/Dockerfile | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 2f0ba2776..f5007a22c 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -22,5 +22,12 @@ services: env_file: - ../webapi/.env environment: - - ASPNETCORE_ENVIRONMENT=Development + - MemoryStore__Qdrant__Host=http://qdrant + depends_on: + qdrant: + condition: service_started + qdrant: + image: qdrant/qdrant + ports: + - 6333:6333 diff --git a/docker/webapi/Dockerfile b/docker/webapi/Dockerfile index 1eb118053..b4b923b06 100644 --- a/docker/webapi/Dockerfile +++ b/docker/webapi/Dockerfile @@ -8,10 +8,12 @@ RUN dotnet dev-certs https # copy csproj and restore as distinct layers COPY webapi/*.csproj . -RUN dotnet restore --use-current-runtime +RUN dotnet restore --use-current-runtime # copy everything else and build app COPY webapi/. . +RUN apt update && apt install -y wget +RUN wget -P data https://raw.githubusercontent.com/tesseract-ocr/tessdata/main/eng.traineddata RUN dotnet publish --use-current-runtime --self-contained false --no-restore -o /app From 55921cde81cc646472011eb633d4ada7c8d8e8ba Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Wed, 16 Aug 2023 15:31:31 +0800 Subject: [PATCH 03/14] Add workflow to build images --- .github/workflows/copilot-build-images.yml | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/copilot-build-images.yml diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml new file mode 100644 index 000000000..1836883c4 --- /dev/null +++ b/.github/workflows/copilot-build-images.yml @@ -0,0 +1,69 @@ +name: "Build and push images" + +on: + push: + branches: + - "main" + tags: + - "v*" + paths: + - "webapi/**" + - "webapp/**" + pull_request: + branches: + - "main" + paths: + - "webapi/**" + - "webapp/**" + +env: + REGISTRY: ghcr.io + +jobs: + build-and-push-image: + name: Build and push images + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - dockerfile: ./docker/webapi/Dockerfile + image: ${{ github.repository }}-api + - dockerfile: ./docker/webapp/Dockerfile + image: ${{ github.repository }}-web + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Login container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.REGISTRY }}/${{ matrix.image }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}} + type=semver,pattern={{major}}.{{minor}} + + - name: Build and push image + uses: docker/build-push-action@v3 + with: + context: . + file: ${{ matrix.dockerfile }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: VERSION=${{ github.ref_name }} From b18862eaa19220d2808baf7cc5c7f652ed27d539 Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Wed, 16 Aug 2023 15:40:12 +0800 Subject: [PATCH 04/14] Update build image pipeline --- .github/workflows/copilot-build-images.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml index 1836883c4..5f6036c6f 100644 --- a/.github/workflows/copilot-build-images.yml +++ b/.github/workflows/copilot-build-images.yml @@ -1,4 +1,4 @@ -name: "Build and push images" +name: copilot-deploy-pipeline on: push: @@ -9,12 +9,14 @@ on: paths: - "webapi/**" - "webapp/**" + - ".github/workflows/copilot-build-images.yml" pull_request: branches: - "main" paths: - "webapi/**" - "webapp/**" + - ".github/workflows/copilot-build-images.yml" env: REGISTRY: ghcr.io From 543d9762acf9dae307cd6eda747829cee69c209d Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Thu, 17 Aug 2023 07:30:23 +0800 Subject: [PATCH 05/14] Update docker-compose.yaml --- docker/docker-compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index f5007a22c..f6fd72f13 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: chat-copilot-web: - image: huangyingting/chat-copilot-web + image: chat-copilot-web build: context: .. dockerfile: docker/webapp/Dockerfile @@ -13,7 +13,7 @@ services: chat-copilot-api: condition: service_started chat-copilot-api: - image: huangyingting/chat-copilot-api + image: chat-copilot-api build: context: .. dockerfile: docker/webapi/Dockerfile From 19bd3e6c38e795995c74409950c1d3405c6727ec Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Thu, 17 Aug 2023 09:27:42 +0800 Subject: [PATCH 06/14] Update workflow to build webapp nginx image --- .github/workflows/copilot-build-images.yml | 18 ++++++++---- docker/docker-compose.yaml | 10 +++---- docker/webapp/Dockerfile.nginx | 34 ++++++++++++++++++++++ 3 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 docker/webapp/Dockerfile.nginx diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml index 5f6036c6f..24a75adae 100644 --- a/.github/workflows/copilot-build-images.yml +++ b/.github/workflows/copilot-build-images.yml @@ -29,10 +29,16 @@ jobs: fail-fast: false matrix: include: - - dockerfile: ./docker/webapi/Dockerfile - image: ${{ github.repository }}-api - - dockerfile: ./docker/webapp/Dockerfile - image: ${{ github.repository }}-web + - file: ./docker/webapi/Dockerfile + image: ${{ github.repository }}-webapi + build-args: [] + - file: ./docker/webapp/Dockerfile + image: ${{ github.repository }}-webapp + build-args: | + REACT_APP_BACKEND_URI=${{ env.REACT_APP_BACKEND_URI }} + REACT_APP_AAD_AUTHORITY=${{ env.REACT_APP_AAD_AUTHORITY }} + REACT_APP_AAD_CLIENT_ID=${{ env.REACT_APP_AAD_CLIENT_ID }} + REACT_APP_AAD_API_SCOPE=${{ env.REACT_APP_AAD_API_SCOPE }} permissions: contents: read packages: write @@ -64,8 +70,8 @@ jobs: uses: docker/build-push-action@v3 with: context: . - file: ${{ matrix.dockerfile }} + file: ${{ matrix.file }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: VERSION=${{ github.ref_name }} + build-args: ${{ matrix.build-args }} diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index f6fd72f13..162e6d3e1 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: - chat-copilot-web: - image: chat-copilot-web + chat-copilot-webapp: + image: chat-copilot-webapp-nginx build: context: .. dockerfile: docker/webapp/Dockerfile @@ -10,10 +10,10 @@ services: env_file: - ../webapp/.env depends_on: - chat-copilot-api: + chat-copilot-webapi: condition: service_started - chat-copilot-api: - image: chat-copilot-api + chat-copilot-webapi: + image: chat-copilot-webapi build: context: .. dockerfile: docker/webapi/Dockerfile diff --git a/docker/webapp/Dockerfile.nginx b/docker/webapp/Dockerfile.nginx new file mode 100644 index 000000000..772f5a217 --- /dev/null +++ b/docker/webapp/Dockerfile.nginx @@ -0,0 +1,34 @@ +# source webapp/.env +# docker build --build-arg REACT_APP_BACKEND_URI=$REACT_APP_BACKEND_URI --build-arg REACT_APP_AAD_AUTHORITY=$REACT_APP_AAD_AUTHORITY --build-arg REACT_APP_AAD_CLIENT_ID=$REACT_APP_AAD_CLIENT_ID --build-arg REACT_APP_AAD_API_SCOPE=$REACT_APP_AAD_API_SCOPE -f docker/webapp/Dockerfile.nginx -t chat-copilot-web-nginx . + +# builder +FROM node:lts-alpine as builder + +ARG REACT_APP_BACKEND_URI +ENV REACT_APP_BACKEND_URI $REACT_APP_BACKEND_URI + +ARG REACT_APP_AAD_AUTHORITY +ENV REACT_APP_AAD_AUTHORITY $REACT_APP_AAD_AUTHORITY + +ARG REACT_APP_AAD_CLIENT_ID +ENV REACT_APP_AAD_CLIENT_ID $REACT_APP_AAD_CLIENT_ID + +ARG REACT_APP_AAD_API_SCOPE +ENV REACT_APP_AAD_API_SCOPE $REACT_APP_AAD_API_SCOPE + +WORKDIR /app +COPY webapp/ . +RUN yarn install \ + --prefer-offline \ + --frozen-lockfile \ + --non-interactive \ + --production=false + +RUN yarn build + +# final stage/image +FROM nginx:stable-alpine +EXPOSE 3000 +RUN sed -i 's/80/3000/g' /etc/nginx/conf.d/default.conf +COPY --from=builder /app/build /usr/share/nginx/html +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file From 1a2560ad39e58d821f2c2e2c5322ff6472d4e3d4 Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Thu, 17 Aug 2023 09:28:56 +0800 Subject: [PATCH 07/14] Update workflow for building images --- .github/workflows/copilot-build-images.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml index 24a75adae..81e647e42 100644 --- a/.github/workflows/copilot-build-images.yml +++ b/.github/workflows/copilot-build-images.yml @@ -34,6 +34,9 @@ jobs: build-args: [] - file: ./docker/webapp/Dockerfile image: ${{ github.repository }}-webapp + build-args: [] + - file: ./docker/webapp/Dockerfile.nginx + image: ${{ github.repository }}-webapp-nginx build-args: | REACT_APP_BACKEND_URI=${{ env.REACT_APP_BACKEND_URI }} REACT_APP_AAD_AUTHORITY=${{ env.REACT_APP_AAD_AUTHORITY }} From ae1771e2c439279a800df5f266249f89b3e996c4 Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Thu, 17 Aug 2023 09:40:19 +0800 Subject: [PATCH 08/14] Update workflow --- .github/workflows/copilot-build-images.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml index 81e647e42..9c2cb9cbb 100644 --- a/.github/workflows/copilot-build-images.yml +++ b/.github/workflows/copilot-build-images.yml @@ -38,10 +38,10 @@ jobs: - file: ./docker/webapp/Dockerfile.nginx image: ${{ github.repository }}-webapp-nginx build-args: | - REACT_APP_BACKEND_URI=${{ env.REACT_APP_BACKEND_URI }} - REACT_APP_AAD_AUTHORITY=${{ env.REACT_APP_AAD_AUTHORITY }} - REACT_APP_AAD_CLIENT_ID=${{ env.REACT_APP_AAD_CLIENT_ID }} - REACT_APP_AAD_API_SCOPE=${{ env.REACT_APP_AAD_API_SCOPE }} + REACT_APP_BACKEND_URI=${{ vars.REACT_APP_BACKEND_URI }} + REACT_APP_AAD_AUTHORITY=${{ vars.REACT_APP_AAD_AUTHORITY }} + REACT_APP_AAD_CLIENT_ID=${{ vars.REACT_APP_AAD_CLIENT_ID }} + REACT_APP_AAD_API_SCOPE=${{ vars.REACT_APP_AAD_API_SCOPE }} permissions: contents: read packages: write From 11b7a63d0cee38269c67741a9f962b64c575f5aa Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Thu, 17 Aug 2023 09:43:38 +0800 Subject: [PATCH 09/14] Update build image workflow --- .github/workflows/copilot-build-images.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml index 9c2cb9cbb..81eed0e8c 100644 --- a/.github/workflows/copilot-build-images.yml +++ b/.github/workflows/copilot-build-images.yml @@ -31,10 +31,12 @@ jobs: include: - file: ./docker/webapi/Dockerfile image: ${{ github.repository }}-webapi - build-args: [] + build-args: | + - file: ./docker/webapp/Dockerfile image: ${{ github.repository }}-webapp - build-args: [] + build-args: | + - file: ./docker/webapp/Dockerfile.nginx image: ${{ github.repository }}-webapp-nginx build-args: | From 904bfb698246f2c3184168894dec620add3adc8c Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Sat, 19 Aug 2023 08:15:01 +0800 Subject: [PATCH 10/14] Update image build workflow --- .github/workflows/copilot-build-images.yml | 39 ++++++++++------------ 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml index 81eed0e8c..942cb6698 100644 --- a/.github/workflows/copilot-build-images.yml +++ b/.github/workflows/copilot-build-images.yml @@ -1,23 +1,20 @@ name: copilot-deploy-pipeline on: - push: - branches: - - "main" - tags: - - "v*" - paths: - - "webapi/**" - - "webapp/**" - - ".github/workflows/copilot-build-images.yml" - pull_request: - branches: - - "main" - paths: - - "webapi/**" - - "webapp/**" - - ".github/workflows/copilot-build-images.yml" - + workflow_call: + inputs: + REACT_APP_BACKEND_URI: + required: true + type: string + REACT_APP_AAD_AUTHORITY: + required: true + type: string + REACT_APP_AAD_CLIENT_ID: + required: true + type: string + REACT_APP_AAD_API_SCOPE: + required: false + type: string env: REGISTRY: ghcr.io @@ -40,10 +37,10 @@ jobs: - file: ./docker/webapp/Dockerfile.nginx image: ${{ github.repository }}-webapp-nginx build-args: | - REACT_APP_BACKEND_URI=${{ vars.REACT_APP_BACKEND_URI }} - REACT_APP_AAD_AUTHORITY=${{ vars.REACT_APP_AAD_AUTHORITY }} - REACT_APP_AAD_CLIENT_ID=${{ vars.REACT_APP_AAD_CLIENT_ID }} - REACT_APP_AAD_API_SCOPE=${{ vars.REACT_APP_AAD_API_SCOPE }} + REACT_APP_BACKEND_URI=${{ inputs.REACT_APP_BACKEND_URI }} + REACT_APP_AAD_AUTHORITY=${{ inputs.REACT_APP_AAD_AUTHORITY }} + REACT_APP_AAD_CLIENT_ID=${{ inputs.REACT_APP_AAD_CLIENT_ID }} + REACT_APP_AAD_API_SCOPE=${{ inputs.REACT_APP_AAD_API_SCOPE }} permissions: contents: read packages: write From 48ab2e6cd233669605832c5e3d6d3f6a3e5f80dd Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Sat, 19 Aug 2023 08:18:13 +0800 Subject: [PATCH 11/14] Update workflow name --- .github/workflows/copilot-build-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/copilot-build-images.yml b/.github/workflows/copilot-build-images.yml index 942cb6698..dc9d84d3d 100644 --- a/.github/workflows/copilot-build-images.yml +++ b/.github/workflows/copilot-build-images.yml @@ -1,4 +1,4 @@ -name: copilot-deploy-pipeline +name: copilot-build-images on: workflow_call: From 48daf64cfc4069f911d4db3a43146c1cadfb46df Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Sat, 19 Aug 2023 08:24:14 +0800 Subject: [PATCH 12/14] Update webapp nginx dockerfile --- docker/webapp/Dockerfile.nginx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/webapp/Dockerfile.nginx b/docker/webapp/Dockerfile.nginx index 772f5a217..68cd84cc4 100644 --- a/docker/webapp/Dockerfile.nginx +++ b/docker/webapp/Dockerfile.nginx @@ -22,7 +22,7 @@ RUN yarn install \ --prefer-offline \ --frozen-lockfile \ --non-interactive \ - --production=false + --production=true RUN yarn build From b90f81b96a3b1e9c7c754d8e5702bc658dc7e117 Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Sat, 19 Aug 2023 10:11:57 +0800 Subject: [PATCH 13/14] Update dockerfile --- docker/webapi/Dockerfile | 2 ++ docker/webapp/Dockerfile | 2 ++ docker/webapp/Dockerfile.nginx | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/webapi/Dockerfile b/docker/webapi/Dockerfile index b4b923b06..66b908088 100644 --- a/docker/webapi/Dockerfile +++ b/docker/webapi/Dockerfile @@ -1,3 +1,5 @@ +# docker build -f docker/webapi/Dockerfile -t chat-copilot-webapi . + # Learn about building .NET container images: # https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build diff --git a/docker/webapp/Dockerfile b/docker/webapp/Dockerfile index 719c0bd8b..3fc4671e0 100644 --- a/docker/webapp/Dockerfile +++ b/docker/webapp/Dockerfile @@ -1,3 +1,5 @@ +# docker build -f docker/webapp/Dockerfile -t chat-copilot-webapp . + # builder FROM node:lts-alpine as builder WORKDIR /app diff --git a/docker/webapp/Dockerfile.nginx b/docker/webapp/Dockerfile.nginx index 68cd84cc4..ccfec52eb 100644 --- a/docker/webapp/Dockerfile.nginx +++ b/docker/webapp/Dockerfile.nginx @@ -1,5 +1,5 @@ # source webapp/.env -# docker build --build-arg REACT_APP_BACKEND_URI=$REACT_APP_BACKEND_URI --build-arg REACT_APP_AAD_AUTHORITY=$REACT_APP_AAD_AUTHORITY --build-arg REACT_APP_AAD_CLIENT_ID=$REACT_APP_AAD_CLIENT_ID --build-arg REACT_APP_AAD_API_SCOPE=$REACT_APP_AAD_API_SCOPE -f docker/webapp/Dockerfile.nginx -t chat-copilot-web-nginx . +# docker build --build-arg REACT_APP_BACKEND_URI=$REACT_APP_BACKEND_URI --build-arg REACT_APP_AAD_AUTHORITY=$REACT_APP_AAD_AUTHORITY --build-arg REACT_APP_AAD_CLIENT_ID=$REACT_APP_AAD_CLIENT_ID --build-arg REACT_APP_AAD_API_SCOPE=$REACT_APP_AAD_API_SCOPE -f docker/webapp/Dockerfile.nginx -t chat-copilot-webapp-nginx . # builder FROM node:lts-alpine as builder From a949c6677787572328b7126f3acda94db4af1e41 Mon Sep 17 00:00:00 2001 From: Yingting Huang Date: Thu, 24 Aug 2023 18:19:04 +0800 Subject: [PATCH 14/14] Update webapi dockerfile --- docker/webapi/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/webapi/Dockerfile b/docker/webapi/Dockerfile index 66b908088..2ed5dd74a 100644 --- a/docker/webapi/Dockerfile +++ b/docker/webapi/Dockerfile @@ -21,6 +21,7 @@ RUN dotnet publish --use-current-runtime --self-contained false --no-restore -o # final stage/image FROM mcr.microsoft.com/dotnet/aspnet:6.0 +ENV Kestrel__Endpoints__Http__Url=http://0.0.0.0:8080 WORKDIR /app COPY --from=build /app . COPY --from=build /root/.dotnet/corefx/cryptography/x509stores/my/* /root/.dotnet/corefx/cryptography/x509stores/my/