Skip to content

Commit db23cec

Browse files
authored
Merge pull request #60 from CS3219-AY2425S1/fix/fix-kubernetes-script
fix kubernetes script
2 parents 1c4f745 + 2a877a7 commit db23cec

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

k8s/peerprep-fe.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
containers:
2121
- name: peerprep-fe
2222
image: asia-southeast1-docker.pkg.dev/cs3219-g11-peerprep/cs3219-g11-repo/peerprep-fe:latest
23-
# imagePullPolicy: Never # only used for local builds
23+
imagePullPolicy: Always
2424
ports:
2525
- containerPort: 3000
2626
envFrom:

k8s/question-service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
containers:
2121
- name: question-svc
2222
image: asia-southeast1-docker.pkg.dev/cs3219-g11-peerprep/cs3219-g11-repo/question-svc:latest
23-
# imagePullPolicy: Never # only used for local builds
23+
imagePullPolicy: Always
2424
ports:
2525
- containerPort: 4001
2626
envFrom:

k8s/user-service.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
containers:
2121
- name: user-svc
2222
image: asia-southeast1-docker.pkg.dev/cs3219-g11-peerprep/cs3219-g11-repo/user-svc:latest
23+
imagePullPolicy: Always
2324
ports:
2425
- containerPort: 3001
2526
envFrom:

peerprep-fe/src/middleware.ts

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

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

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

user-service/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ RUN npm install -g pnpm
1010
# Copy package.json and pnpm-lock.yaml
1111
COPY package.json ./
1212

13+
RUN pnpm install
14+
1315
# Development stage
1416
FROM base AS development
1517

16-
RUN pnpm install
17-
1818
COPY . .
1919

2020
# Note: Don't expose ports here, Compose will handle that for us
@@ -27,9 +27,6 @@ FROM base AS production
2727
ENV NODE_ENV=production
2828
ENV PORT=3001
2929

30-
# install without dev dependencies
31-
RUN pnpm install --prod
32-
3330
COPY . .
3431

3532
EXPOSE ${PORT}

0 commit comments

Comments
 (0)