diff --git a/Dockerfile b/Dockerfile index de2e7a4..cdf3b4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ RUN npm ci COPY frontend/ ./ # Build frontend for production +ENV VITE_API_URL="" RUN npm run build # Production stage diff --git a/frontend/src/config/api.js b/frontend/src/config/api.js index 2bddbb2..9adbd7b 100644 --- a/frontend/src/config/api.js +++ b/frontend/src/config/api.js @@ -1,4 +1,4 @@ // API Configuration -const API_URL = import.meta.env.VITE_API_URL || 'http://localhost:4000'; +const API_URL = import.meta.env.VITE_API_URL || ''; export default API_URL; diff --git a/k8s.yaml b/k8s.yaml index c9eba75..aecb4e9 100644 --- a/k8s.yaml +++ b/k8s.yaml @@ -22,7 +22,7 @@ spec: selector: matchLabels: app: awards - replicas: 2 + replicas: 1 template: metadata: labels: @@ -77,6 +77,22 @@ spec: limits: memory: "512Mi" cpu: "500m" + livenessProbe: + httpGet: + path: /health + port: 4000 + initialDelaySeconds: 10 + periodSeconds: 30 + timeoutSeconds: 3 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /health + port: 4000 + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 volumes: - name: data persistentVolumeClaim: