Skip to content

Commit

Permalink
fix: v1 finished
Browse files Browse the repository at this point in the history
  • Loading branch information
MurielParaire committed Jun 18, 2024
1 parent 436bcc8 commit 34aeae3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion infra/api/03_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: api
image: ghcr.io/do3-2023/mpa-monitoring/api:v1.1
image: ghcr.io/do3-2023/mpa-monitoring/api:v1.0.0
imagePullPolicy: Always
env:
- name: POSTGRES_DB
Expand Down
3 changes: 2 additions & 1 deletion infra/api/04_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ metadata:
spec:
ports:
- name: api
nodePort: 32000
port: 3000
protocol: TCP
targetPort: 3000
selector:
name: api
type: ClusterIP
type: NodePort
14 changes: 7 additions & 7 deletions infra/web/02_deployment.yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ spec:
name: web
env:
- name: VITE_API_ENDPOINT
value: "http://api.mpa-backend.svc.cluster.local:3000"
value: "http://162.38.112.168:32000"
ports:
- containerPort: 8000
- containerPort: 8080
protocol: TCP
name: http
name: httpweb
livenessProbe:
httpGet:
path: /healthz
port: 8000
path: /
port: 8080
initialDelaySeconds: 15
periodSeconds: 3
failureThreshold: 10
readinessProbe:
httpGet:
path: /healthz
port: 8000
path: /
port: 8080
initialDelaySeconds: 30
periodSeconds: 3
failureThreshold: 10
9 changes: 4 additions & 5 deletions infra/web/03_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ metadata:
namespace: mpa-frontend
spec:
ports:
- name: http
port: 8000
- name: httpweb
port: 8080
protocol: TCP
targetPort: 8000
nodePort: 32100
targetPort: 8080
nodePort: 31000
selector:
name: web
app: web
type: NodePort
2 changes: 1 addition & 1 deletion web/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FROM node:18-alpine as runner

WORKDIR /app

RUN npm install vite
RUN npm install -g vite

COPY --from=builder /app/node_modules ./node_modules
COPY . .
Expand Down
3 changes: 2 additions & 1 deletion web/src/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const AddPerson = () => import('../components/AddPerson.vue')
const routes = [
{ path: '/', component: HomePage, name: 'home' },
{ path: '/list', component: ListPersons, name: 'list' },
{ path: '/add', component: AddPerson, name: 'add' }
{ path: '/add', component: AddPerson, name: 'add' },
{ path: '/healthz', component: HomePage, name: 'readiness'}
]

export const router = createRouter({
Expand Down

0 comments on commit 34aeae3

Please sign in to comment.