9 Commits

Author SHA1 Message Date
Unchained
8f3bcebbf6 feat: implement full CI/CD pipeline with GitHub Actions and Flux
Some checks failed
Build and Deploy / build (push) Has been cancelled
- Add GitHub Actions workflow to build and push Docker images to GHCR
- Add Dockerfile for multi-stage builds
- Update deployment to use GHCR images
- Add GHCR authentication secrets
- Configure Flux ImageRepository, ImagePolicy, and ImageUpdateAutomation
- Remove init container approach in favor of proper Docker builds

Auto-deploy flow:
1. Push to master triggers GitHub Actions
2. GitHub Actions builds image with commit hash tag
3. Image pushed to ghcr.io/unchainedio/manoon-headless
4. Flux ImageRepository detects new image
5. Flux ImageUpdateAutomation updates kustomization.yaml
6. Flux Kustomization applies new deployment
7. Kubernetes restarts pods with new image
2026-03-07 12:26:37 +02:00
Unchained
2c27fc65d0 Revert to init container approach
The Docker-based CI/CD approach is the industry standard but requires:
- Proper container registry (GHCR, Docker Hub) with HTTPS
- Or complex local registry setup with containerd HTTP configuration

The init container approach works reliably for now. To enable auto-deploy:
1. Flux detects git changes in 30s (via webhook)
2. Kustomization applies new config
3. Manually run: kubectl rollout restart deployment/storefront -n manoonoils

For true auto-deploy, consider:
- Setting up GHCR with proper auth
- Using GitHub Actions to build/push images
- Using Flux ImageUpdateAutomation

Or simpler: A post-deploy webhook that triggers rollout restart.
2026-03-07 11:33:07 +02:00
Unchained
8f2b214c9f deploy: use registry ClusterIP instead of DNS name 2026-03-07 11:23:23 +02:00
Unchained
c4ff39394e deploy: use local registry image 2026-03-07 11:21:24 +02:00
Unchained
81d74ced0c feat: migrate to standard Docker-based CI/CD deployment
- Add Dockerfile for building Next.js images
- Replace init-container deployment with standard deployment
- Add kustomization with image tag tracking
- Add deploy.sh script for CI/CD pipeline

This enables proper GitOps auto-deployment:
1. Build image with commit hash tag
2. Push to GHCR
3. Update kustomization.yaml image tag
4. Flux detects change and restarts pods
2026-03-07 11:09:59 +02:00
Unchained
467b513b67 feat: add gitRevision annotation for auto-restart on git changes 2026-03-07 11:06:15 +02:00
Unchained
ee391a7b8d feat: add deployment-metadata configmap to trigger pod restarts on git changes 2026-03-07 11:01:04 +02:00
Unchained
a1090e0e2c Fix kustomization.yaml - use deployment-nodejs.yaml 2026-03-07 06:31:35 +02:00
Unchained
8a720f5335 Add Kubernetes manifests for Flux CD deployment 2026-03-06 14:25:28 +02:00