7 Commits

Author SHA1 Message Date
Alexis Bruneteau
0493a7ef70 refactor: Split monolithic container into separate API and frontend deployments
ARCHITECTURE CHANGES:
- API service: Node.js server on port 3001 (Dockerfile.api)
- Frontend service: Nginx serving React on port 80 (Dockerfile.frontend)
- Each service has its own deployment, service, and replicas
- Ingress routes / to frontend and /api/ to API

KUBERNETES MANIFESTS:
- api-deployment.yaml: 2 replicas of Node.js API server
- api-service.yaml: ClusterIP service for API
- frontend-deployment.yaml: 2 replicas of Nginx frontend
- frontend-service.yaml: ClusterIP service for frontend
- Updated ingress.yaml: Routes traffic based on paths
- Updated kustomization.yaml: References new deployments

DOCKER IMAGES:
- Dockerfile.api: Minimal Node.js image for API (~200MB)
- Dockerfile.frontend: Nginx + React build (~50MB)
- Separate builds in workflow for independent versioning

NGINX CONFIGURATION:
- Removed API proxy (separate service now)
- Simplified config for static file serving only

BENEFITS:
- Independent scaling (can scale frontend/API separately)
- Smaller images with minimal base images
- API errors don't affect frontend availability
- Easier to update one service without affecting the other

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 13:28:26 +02:00
Alexis Bruneteau
9420975f76 fix: Install kustomize directly from GitHub instead of using external action
Replace imranismail/setup-kustomize action with direct kustomize installation from kubernetes-sigs GitHub repository. This avoids authentication issues with Gitea.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:50:50 +02:00
Alexis Bruneteau
00331c5d95 refactor: Use Kustomize for Kubernetes deployment management
- Update kustomization.yaml with newName field for proper image replacement
- Replace individual kubectl apply commands with kustomize build
- Use kustomize edit to dynamically set image tag from CI/CD pipeline
- Simplify deployment to single 'kubectl apply -k' command
- Consolidate verification steps

Benefits:
- Single source of truth for manifest configuration
- Declarative image tag management
- Easier to manage overlays for different environments
- Reduced template duplication

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:42:33 +02:00
Alexis Bruneteau
b98075df82 fix: Fix kubectl apply syntax for multiple files
kubectl apply -f does not accept multiple files as separate arguments on the same line. Changed to apply each manifest individually.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:42:00 +02:00
Alexis Bruneteau
a918615eb4 fix: Resolve dependency conflict and optimize Gitea workflow
- Fix package-lock.json sync issue by installing yaml@2.8.1 to satisfy tailwindcss dependency requirements
- Remove redundant test step (--passWithNoTests defeats purpose)
- Consolidate kubectl apply commands into single operation
- Combine kubectl verification with deployment update step
- Remove separate notify job (redundant; use Gitea status checks)
- Add env variables at workflow level for DRY principle
- Improve Docker build efficiency with multi-tag in single command
- Add proper permissions to kubeconfig file
- Simplify action syntax (uses: vs name:)

This reduces workflow execution time and complexity while fixing npm ci errors.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 12:06:06 +02:00
Alexis Bruneteau
af378e0d0e fix: Configure Gitea workflow for monorepo structure
- Add working-directory default to build and deploy jobs
- Fix npm cache lookup to point to dashboard-sqdc/package-lock.json
- Ensure all Node.js and kubectl operations execute from correct directory

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 01:29:01 +02:00
Alexis Bruneteau
1ca02412a9 tag 2025-10-22 00:44:02 +02:00