Skip to content

Commit 4c6bb4f

Browse files
committed
update env pointers
1 parent 1de9cd3 commit 4c6bb4f

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
env:
3232
NEXT_PUBLIC_QUESTION_SERVICE_URL: ${{ secrets.NEXT_PUBLIC_QUESTION_SERVICE_URL }}
3333
NEXT_PUBLIC_AUTH_SERVICE_URL: ${{ secrets.NEXT_PUBLIC_AUTH_SERVICE_URL }}
34-
NEXT_PUBLIC_USER_SERVICE_URL: ${{ secrets.NEXT_PUBLIC_USER_SERVICE_URL }}
35-
USER_SERVICE_URL: ${{ secrets.USER_SERVICE_URL }}
34+
AUTH_SERVICE_URL: ${{ secrets.AUTH_SERVICE_URL }}
3635
QUESTION_SERVICE_URL: ${{ secrets.QUESTION_SERVICE_URL }}
3736
run: |
3837
gcloud builds submit --config cloudbuild.yaml \

cloudbuild.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ steps:
1313
"--build-arg",
1414
"NEXT_PUBLIC_AUTH_SERVICE_URL=${_NEXT_PUBLIC_AUTH_SERVICE_URL}",
1515
"--build-arg",
16-
"NEXT_PUBLIC_USER_SERVICE_URL=${_NEXT_PUBLIC_USER_SERVICE_URL}",
17-
"--build-arg",
18-
"USER_SERVICE_URL=${_USER_SERVICE_URL}",
16+
"AUTH_SERVICE_URL=${_AUTH_SERVICE_URL}",
1917
"--build-arg",
2018
"QUESTION_SERVICE_URL=${_QUESTION_SERVICE_URL}",
2119
"-f",

k8s/peerprep-config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ type: Opaque
66
stringData:
77
NEXT_PUBLIC_QUESTION_SERVICE_URL: "${_NEXT_PUBLIC_QUESTION_SERVICE_URL}"
88
NEXT_PUBLIC_AUTH_SERVICE_URL: "${_NEXT_PUBLIC_AUTH_SERVICE_URL}"
9+
AUTH_SERVICE_URL: "${_AUTH_SERVICE_URL}"
10+
QUESTION_SERVICE_URL: "${_QUESTION_SERVICE_URL}"

peerprep-fe/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ ENV PORT=3000
3333
# Accept build arguments
3434
ARG NEXT_PUBLIC_QUESTION_SERVICE_URL
3535
ARG NEXT_PUBLIC_AUTH_SERVICE_URL
36+
ARG AUTH_SERVICE_URL
37+
ARG QUESTION_SERVICE_URL
3638

3739
# Set environment variables
3840
ENV NEXT_PUBLIC_QUESTION_SERVICE_URL=$NEXT_PUBLIC_QUESTION_SERVICE_URL
3941
ENV NEXT_PUBLIC_AUTH_SERVICE_URL=$NEXT_PUBLIC_AUTH_SERVICE_URL
42+
ENV AUTH_SERVICE_URL=$AUTH_SERVICE_URL
43+
ENV QUESTION_SERVICE_URL=$QUESTION_SERVICE_URL
4044

4145
COPY . .
4246
RUN pnpm build

peerprep-fe/next.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const nextConfig = {
55
NEXT_PUBLIC_QUESTION_SERVICE_URL:
66
process.env.NEXT_PUBLIC_QUESTION_SERVICE_URL,
77
NEXT_PUBLIC_AUTH_SERVICE_URL: process.env.NEXT_PUBLIC_AUTH_SERVICE_URL,
8+
AUTH_SERVICE_URL: process.env.AUTH_SERVICE_URL,
9+
QUESTION_SERVICE_URL: process.env.QUESTION_SERVICE_URL,
810
},
911
};
1012

peerprep-fe/src/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { NextResponse } from 'next/server';
22
import type { NextRequest } from 'next/server';
33

4-
const baseURL = process.env.USER_SERVICE_URL || 'http://172.17.0.1:3001/api/v1';
4+
const baseURL = process.env.AUTH_SERVICE_URL || 'http://172.17.0.1:3001/api/v1';
55

66
// This function can be marked `async` if using `await` inside
77
export async function middleware(request: NextRequest) {

peerprep-fe/src/network/axiosClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const axiosQuestionClient = axios.create({
1212

1313
const axiosAuthClient = axios.create({
1414
baseURL:
15-
process.env.NEXT_PUBLIC_USER_SERVICE_URL || 'http://localhost:3001/api/v1',
15+
process.env.NEXT_PUBLIC_AUTH_SERVICE_URL || 'http://localhost:3001/api/v1',
1616
headers: {
1717
'Content-Type': 'application/json',
1818
},

peerprep-fe/src/network/axiosServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const axiosQuestionServer = axios.create({
1010
});
1111

1212
const axiosAuthServer = axios.create({
13-
baseURL: process.env.USER_SERVICE_URL || 'http://172.17.0.1:3001/api/v1',
13+
baseURL: process.env.AUTH_SERVICE_URL || 'http://172.17.0.1:3001/api/v1',
1414
headers: {
1515
'Content-Type': 'application/json',
1616
},

0 commit comments

Comments
 (0)