Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
3.7 KiB
3.7 KiB
🚀 Quick Start Guide
Get your crêpes demo running in under 10 minutes!
Option 1: Local Development (Fastest)
npm install
npm run dev
Visit http://localhost:3000 🎉
Option 2: Docker (Easy)
docker build -t crepes-demo .
docker run -p 3000:3000 crepes-demo
Visit http://localhost:3000 🎉
Option 3: Kubernetes with Flux (Production)
Prerequisites Checklist
- Kubernetes cluster running
- Flux installed (
flux check) - Container registry access (Docker Hub, GHCR, etc.)
- Domain with Cloudflare
- Ingress controller installed
- cert-manager installed (for HTTPS)
Deploy in 5 Steps
1. Configure Your Details
export REGISTRY="ghcr.io/YOUR_USERNAME" # Your container registry
export DOMAIN="crepes.example.com" # Your domain
2. Use the Deploy Script
./deploy.sh $REGISTRY $DOMAIN
This will:
- Build the Docker image
- Push to your registry
- Update k8s manifests with your registry and domain
3. Initialize Git Repository
git init
git add .
git commit -m "Initial commit: Crêpes demo"
git remote add origin https://github.com/YOUR_USERNAME/crepes-demo.git
git push -u origin main
4. Update Flux Configuration
Edit flux/gitrepository.yaml and update the Git URL:
spec:
url: https://github.com/YOUR_USERNAME/crepes-demo
5. Deploy to Cluster
# Apply Flux resources
kubectl apply -f flux/gitrepository.yaml
kubectl apply -f flux/kustomization.yaml
# Watch it deploy
flux get kustomizations -w
6. Configure DNS
Automatic (with external-dns): DNS records are created automatically ✨
Manual:
- Go to Cloudflare dashboard
- Add an A/CNAME record for
crepes.example.compointing to your ingress IP - Enable Cloudflare proxy (orange cloud)
Verify Deployment
# Check pods are running
kubectl get pods -l app=crepes-demo
# Check ingress
kubectl get ingress crepes-demo
# Get your ingress IP
kubectl get ingress crepes-demo -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
Visit your domain: https://crepes.example.com 🎉
🔧 Troubleshooting
Pods not starting?
kubectl describe pod -l app=crepes-demo
kubectl logs -l app=crepes-demo
Image pull errors?
- Check registry credentials
- Verify image was pushed:
docker images | grep crepes-demo - Check deployment image URL
Ingress not working?
# Check ingress controller logs
kubectl logs -n ingress-nginx -l app.kubernetes.io/component=controller
# Verify ingress has address
kubectl get ingress
Certificate issues?
kubectl get certificate
kubectl describe certificate crepes-demo-tls
📊 Monitoring
# Watch pods
kubectl get pods -l app=crepes-demo -w
# View logs
kubectl logs -f -l app=crepes-demo
# Check Flux sync
flux get kustomizations
flux logs
🔄 Update the App
# Make your changes
git add .
git commit -m "Update recipe"
git push
# Flux syncs automatically every 1 minute
# Or force immediate sync:
flux reconcile kustomization crepes-demo
🎯 Next Steps
- Customize recipes: Edit
lib/recipes.ts - Add components: Update
lib/catalog.tsandlib/registry.tsx - Change styling: Modify Tailwind classes in components
- Add CI/CD: Use the included GitHub Actions workflow
- Scale: Increase replicas in
k8s/deployment.yaml
💡 Pro Tips
- Test locally first before deploying to k8s
- Use a staging environment for major changes
- Monitor Flux logs during first deployment
- Set up alerts for deployment failures
- Enable auto-image updates in Flux for CI/CD
Need help? Check the full README.md for detailed documentation.
Bon Appétit! 🥞🇫🇷