Skip to content

Commit 133150c

Browse files
authored
Merge pull request #61 from codersforcauses/45-fix-deployment-setup
add backend url arg for deployment
2 parents 86594a7 + f328936 commit 133150c

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.env.production.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# FRONTEND
33
APP_ENV=PRODUCTION
4-
NEXT_PUBLIC_BACKEND_URL="https://robodrone.codersforcauses.com/api"
4+
NEXT_PUBLIC_BACKEND_URL="https://robodrone.codersforcauses.org/api"
55

66

77
# BACKEND
@@ -19,4 +19,4 @@ DJANGO_SUPERUSER_PASSWORD= CHANGE THIS TO A RANDOM STRING
1919
DJANGO_SUPERUSER_EMAIL= CHANGE THIS TO A VALID EMAIL
2020
DJANGO_SUPERUSER_USERNAME= CHANGE THIS TO A VALID USERNAME
2121

22-
FRONTEND_URL="https://robodrone.codersforcauses.com/"
22+
FRONTEND_URL="https://robodrone.codersforcauses.org/"

.github/workflows/cd-pipeline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
cache-from: type=gha
4242
cache-to: type=gha,mode=max
4343
platforms: linux/amd64,linux/arm64
44+
build-args: |
45+
NEXT_PUBLIC_BACKEND_URL=https://robodrone.codersforcauses.org/api
4446
4547
- name: Output client image name
4648
if: github.event_name != 'pull_request'

docker/client/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ COPY ./client/package.json ./client/package-lock.json ./
1111
# Install ALL Dependencies
1212
RUN npm install
1313

14+
# Accept build arg
15+
ARG NEXT_PUBLIC_BACKEND_URL
16+
ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
17+
1418
# Copy Application code into a directory called `app`
1519
COPY ./client /app
1620

0 commit comments

Comments
 (0)