Add base kubernetes support 2

This commit is contained in:
Urtzi Alfaro
2025-09-27 12:10:43 +02:00
parent 63a3f9c77a
commit 222f945466
50 changed files with 648 additions and 160 deletions

View File

@@ -28,10 +28,12 @@ export default defineConfig({
},
proxy: {
'/api': {
target: process.env.NODE_ENV === 'development'
? 'http://gateway:8000' // Use internal service name in Kubernetes
: 'http://localhost:8000',
target: process.env.VITE_API_URL ||
(process.env.NODE_ENV === 'development' && process.env.KUBERNETES_SERVICE_HOST
? 'http://gateway-service:8000' // Kubernetes internal service
: 'http://localhost:8000'), // Local development
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},