Skip to content
Merged
4 changes: 0 additions & 4 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ jobs:
sed -i "s|image: ghcr.io/kunal-511/beatwave:.*|image: ghcr.io/kunal-511/beatwave:$VERSION|g" k8s/frontend-deployment.yml

echo "Updated manifests with version: $VERSION"
- name: Validate Kubernetes manifests
run: |
kubectl apply --dry-run=client -f k8s/backend-deployment.yml
kubectl apply --dry-run=client -f k8s/frontend-deployment.yml

- name: Commit updated manifests
run: |
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/axios.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from "axios";

export const axiosInstance = axios.create({
baseURL: import.meta.env.MODE === "development" ? "http://localhost:5000/api" : "/api",
baseURL: import.meta.env.VITE_API_URL || (import.meta.env.MODE === "development" ? "http://localhost:5000/api" : "/api"),
});
12 changes: 11 additions & 1 deletion k8s/backend-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: beatwave-backend
image: ghcr.io/kunal-511/beatwave-backend:v2
image: ghcr.io/kunal-511/beatwave-backend:v0.0.1
ports:
- containerPort: 5000
env:
Expand All @@ -40,6 +40,16 @@ spec:
configMapKeyRef:
name: backend-port
key: NODE_ENV
- name: REDIS_HOST
valueFrom:
configMapKeyRef:
name: backend-port
key: REDIS_HOST
- name: REDIS_PORT
valueFrom:
configMapKeyRef:
name: backend-port
key: REDIS_PORT

- name: MONGODB_URI
valueFrom:
Expand Down
2 changes: 2 additions & 0 deletions k8s/configmaps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ data:
PORT: "5000"
ADMIN_EMAIL: "yoyokvunal@gmail.com"
NODE_ENV: "development"
REDIS_HOST: "redis"
REDIS_PORT: "6379"
7 changes: 5 additions & 2 deletions k8s/frontend-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ spec:
spec:
containers:
- name: beatwave-frontend
image: ghcr.io/kunal-511/beatwave:v2
image: ghcr.io/kunal-511/beatwave:v0.0.1
ports:
- containerPort: 3000
- containerPort: 80
env:
- name: VITE_CLERK_PUBLISHABLE_KEY
valueFrom:
secretKeyRef:
name: backend-secrets
key: VITE_CLERK_PUBLISHABLE_KEY

- name: VITE_API_URL
value: "http://backend:5000/api"
2 changes: 1 addition & 1 deletion k8s/frontend-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
app: frontend
ports:
- port: 3000
targetPort: 3000
targetPort: 80
2 changes: 1 addition & 1 deletion k8s/redis-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ spec:
image: redis:7.2-alpine
ports:
- containerPort: 6379
commands: ["redis-server", "--appendonly", "yes"]
command: ["redis-server", "--appendonly", "yes"]
4 changes: 2 additions & 2 deletions k8s/redis-service.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind:: Service
apiVersion: v1
kind: Service
metadata:
name: redis
namespace: beatwave
Expand Down
Loading