File tree Expand file tree Collapse file tree 8 files changed +13
-8
lines changed Expand file tree Collapse file tree 8 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 31
31
env :
32
32
NEXT_PUBLIC_QUESTION_SERVICE_URL : ${{ secrets.NEXT_PUBLIC_QUESTION_SERVICE_URL }}
33
33
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 }}
36
35
QUESTION_SERVICE_URL : ${{ secrets.QUESTION_SERVICE_URL }}
37
36
run : |
38
37
gcloud builds submit --config cloudbuild.yaml \
Original file line number Diff line number Diff line change 13
13
" --build-arg" ,
14
14
" NEXT_PUBLIC_AUTH_SERVICE_URL=${_NEXT_PUBLIC_AUTH_SERVICE_URL}" ,
15
15
" --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}" ,
19
17
" --build-arg" ,
20
18
" QUESTION_SERVICE_URL=${_QUESTION_SERVICE_URL}" ,
21
19
" -f" ,
Original file line number Diff line number Diff line change @@ -6,3 +6,5 @@ type: Opaque
6
6
stringData :
7
7
NEXT_PUBLIC_QUESTION_SERVICE_URL : " ${_NEXT_PUBLIC_QUESTION_SERVICE_URL}"
8
8
NEXT_PUBLIC_AUTH_SERVICE_URL : " ${_NEXT_PUBLIC_AUTH_SERVICE_URL}"
9
+ AUTH_SERVICE_URL : " ${_AUTH_SERVICE_URL}"
10
+ QUESTION_SERVICE_URL : " ${_QUESTION_SERVICE_URL}"
Original file line number Diff line number Diff line change @@ -33,10 +33,14 @@ ENV PORT=3000
33
33
# Accept build arguments
34
34
ARG NEXT_PUBLIC_QUESTION_SERVICE_URL
35
35
ARG NEXT_PUBLIC_AUTH_SERVICE_URL
36
+ ARG AUTH_SERVICE_URL
37
+ ARG QUESTION_SERVICE_URL
36
38
37
39
# Set environment variables
38
40
ENV NEXT_PUBLIC_QUESTION_SERVICE_URL=$NEXT_PUBLIC_QUESTION_SERVICE_URL
39
41
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
40
44
41
45
COPY . .
42
46
RUN pnpm build
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ const nextConfig = {
5
5
NEXT_PUBLIC_QUESTION_SERVICE_URL :
6
6
process . env . NEXT_PUBLIC_QUESTION_SERVICE_URL ,
7
7
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 ,
8
10
} ,
9
11
} ;
10
12
Original file line number Diff line number Diff line change 1
1
import { NextResponse } from 'next/server' ;
2
2
import type { NextRequest } from 'next/server' ;
3
3
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' ;
5
5
6
6
// This function can be marked `async` if using `await` inside
7
7
export async function middleware ( request : NextRequest ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const axiosQuestionClient = axios.create({
12
12
13
13
const axiosAuthClient = axios . create ( {
14
14
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' ,
16
16
headers : {
17
17
'Content-Type' : 'application/json' ,
18
18
} ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const axiosQuestionServer = axios.create({
10
10
} ) ;
11
11
12
12
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' ,
14
14
headers : {
15
15
'Content-Type' : 'application/json' ,
16
16
} ,
You can’t perform that action at this time.
0 commit comments