Initial commit: json-render crepes demo
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled

This commit is contained in:
2026-02-09 07:30:54 +01:00
commit 9b750238c2
35 changed files with 9237 additions and 0 deletions

188
QUICKSTART.md Normal file
View File

@@ -0,0 +1,188 @@
# 🚀 Quick Start Guide
Get your crêpes demo running in under 10 minutes!
## Option 1: Local Development (Fastest)
```bash
npm install
npm run dev
```
Visit http://localhost:3000 🎉
## Option 2: Docker (Easy)
```bash
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
```bash
export REGISTRY="ghcr.io/YOUR_USERNAME" # Your container registry
export DOMAIN="crepes.example.com" # Your domain
```
#### 2. Use the Deploy Script
```bash
./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
```bash
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:
```yaml
spec:
url: https://github.com/YOUR_USERNAME/crepes-demo
```
#### 5. Deploy to Cluster
```bash
# 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:**
1. Go to Cloudflare dashboard
2. Add an A/CNAME record for `crepes.example.com` pointing to your ingress IP
3. Enable Cloudflare proxy (orange cloud)
### Verify Deployment
```bash
# 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?
```bash
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?
```bash
# Check ingress controller logs
kubectl logs -n ingress-nginx -l app.kubernetes.io/component=controller
# Verify ingress has address
kubectl get ingress
```
### Certificate issues?
```bash
kubectl get certificate
kubectl describe certificate crepes-demo-tls
```
## 📊 Monitoring
```bash
# 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
```bash
# 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.ts` and `lib/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
1. **Test locally first** before deploying to k8s
2. **Use a staging environment** for major changes
3. **Monitor Flux logs** during first deployment
4. **Set up alerts** for deployment failures
5. **Enable auto-image updates** in Flux for CI/CD
---
Need help? Check the full [README.md](README.md) for detailed documentation.
**Bon Appétit! 🥞🇫🇷**