From 05ec3b1f1745198caaf2134b0aaea13fa9b2cc44 Mon Sep 17 00:00:00 2001 From: ErikaKK <491649804@qq.com> Date: Fri, 25 Jul 2025 05:08:55 +0000 Subject: [PATCH 1/2] add backend url arg --- .env.production.example | 4 ++-- docker/client/Dockerfile | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.env.production.example b/.env.production.example index 28be915..c0650e4 100644 --- a/.env.production.example +++ b/.env.production.example @@ -1,7 +1,7 @@ # FRONTEND APP_ENV=PRODUCTION -NEXT_PUBLIC_BACKEND_URL="https://robodrone.codersforcauses.com/api" +NEXT_PUBLIC_BACKEND_URL="https://robodrone.codersforcauses.org/api" # BACKEND @@ -19,4 +19,4 @@ DJANGO_SUPERUSER_PASSWORD= CHANGE THIS TO A RANDOM STRING DJANGO_SUPERUSER_EMAIL= CHANGE THIS TO A VALID EMAIL DJANGO_SUPERUSER_USERNAME= CHANGE THIS TO A VALID USERNAME -FRONTEND_URL="https://robodrone.codersforcauses.com/" \ No newline at end of file +FRONTEND_URL="https://robodrone.codersforcauses.org/" \ No newline at end of file diff --git a/docker/client/Dockerfile b/docker/client/Dockerfile index 564ce6e..2fbbe6f 100644 --- a/docker/client/Dockerfile +++ b/docker/client/Dockerfile @@ -11,6 +11,10 @@ COPY ./client/package.json ./client/package-lock.json ./ # Install ALL Dependencies RUN npm install +# Accept build arg +ARG NEXT_PUBLIC_BACKEND_URL +ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL + # Copy Application code into a directory called `app` COPY ./client /app From f328936b20f04bcd4d746d399b1fef9dec7b2546 Mon Sep 17 00:00:00 2001 From: ErikaKK <491649804@qq.com> Date: Fri, 25 Jul 2025 07:24:35 +0000 Subject: [PATCH 2/2] configure in ci/cd --- .github/workflows/cd-pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cd-pipeline.yml b/.github/workflows/cd-pipeline.yml index 37bb46c..3e9bcb1 100644 --- a/.github/workflows/cd-pipeline.yml +++ b/.github/workflows/cd-pipeline.yml @@ -41,6 +41,8 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max platforms: linux/amd64,linux/arm64 + build-args: | + NEXT_PUBLIC_BACKEND_URL=https://robodrone.codersforcauses.org/api - name: Output client image name if: github.event_name != 'pull_request'