- Restore blue PageHeader on Dashboard (/app-components) - Update homepage (/) with subtle header design without blue bar - Add uniform PageHeader styling to application edit page - Fix Rapporten link on homepage to point to /reports overview - Improve header descriptions spacing for better readability
7.9 KiB
Deployment Next Steps - Images Gereed! 🚀
Je Docker images zijn succesvol gebouwd en gepusht naar Azure Container Registry! Hier zijn de volgende stappen voor deployment.
✅ Wat is al klaar:
- ✅ Azure Container Registry (ACR):
zdlas.azurecr.io - ✅ Docker images gebouwd en gepusht:
zdlas.azurecr.io/cmdb-insight/backend:latestzdlas.azurecr.io/cmdb-insight/frontend:latest
- ✅ Azure DevOps Pipeline: Automatische builds bij push naar
main - ✅ Docker Compose configuratie:
docker-compose.prod.acr.yml
🎯 Deployment Opties
Je hebt verschillende opties om de applicatie te deployen. Kies de optie die het beste past bij jouw situatie:
Optie 1: Azure App Service (Aanbevolen voor productie) ⭐
Voordelen:
- Managed service (geen server management)
- Automatische scaling
- Ingebouwde SSL/TLS
- Deployment slots (zero-downtime updates)
- Integratie met Azure Key Vault
- Monitoring via Application Insights
Geschikt voor: Productie deployment, kleine tot middelgrote teams
Kosten: ~€15-25/maand (Basic B1 plan)
Stappen:
- Maak App Service Plan aan
- Maak 2 Web Apps aan (backend + frontend)
- Configureer container deployment vanuit ACR
- Stel environment variabelen in
- Configureer SSL certificaat
Zie: docs/AZURE-APP-SERVICE-DEPLOYMENT.md (te maken)
Optie 2: Azure Container Instances (ACI) - Eenvoudig
Voordelen:
- Snel op te zetten
- Pay-per-use pricing
- Geen server management
Geschikt voor: Test/development, kleine deployments
Kosten: ~€30-50/maand (2 containers)
Stappen:
- Maak 2 Container Instances aan
- Pull images vanuit ACR
- Configureer environment variabelen
- Stel networking in
Zie: docs/AZURE-CONTAINER-INSTANCES-DEPLOYMENT.md (te maken)
Optie 3: VM met Docker Compose (Flexibel)
Voordelen:
- Volledige controle
- Eenvoudige deployment met Docker Compose
- Kan lokaal getest worden
Geschikt voor: Als je al een VM hebt, of volledige controle wilt
Kosten: ~€20-40/maand (Basic VM)
Stappen:
- Maak Azure VM aan (Ubuntu)
- Installeer Docker en Docker Compose
- Login naar ACR
- Gebruik
docker-compose.prod.acr.yml - Configureer Nginx reverse proxy
Zie: docs/VM-DOCKER-COMPOSE-DEPLOYMENT.md (te maken)
Optie 4: Azure Kubernetes Service (AKS) - Enterprise
Voordelen:
- Enterprise-grade scaling
- High availability
- Advanced networking
Geschikt voor: Grote deployments, enterprise requirements
Kosten: ~€50-100+/maand (minimaal 2 nodes)
Niet aanbevolen voor: Kleine teams (20 gebruikers) - overkill
🔍 Stap 1: Verifieer Images in ACR
Controleer of de images succesvol zijn gepusht:
# Login naar ACR
az acr login --name zdlas
# List repositories
az acr repository list --name zdlas --output table
# List tags voor backend
az acr repository show-tags --name zdlas --repository cmdb-insight/backend --output table
# List tags voor frontend
az acr repository show-tags --name zdlas --repository cmdb-insight/frontend --output table
Verwachte output:
REPOSITORY TAG CREATED
cmdb-insight/backend latest ...
cmdb-insight/backend 88764 ...
cmdb-insight/frontend latest ...
cmdb-insight/frontend 88764 ...
📋 Stap 2: Update Docker Compose voor ACR
Update docker-compose.prod.acr.yml met de juiste ACR naam:
services:
backend:
image: zdlas.azurecr.io/cmdb-insight/backend:latest
frontend:
image: zdlas.azurecr.io/cmdb-insight/frontend:latest
Let op: De huidige configuratie gebruikt zuyderlandcmdbacr.azurecr.io - pas dit aan naar zdlas.azurecr.io als dat je ACR naam is.
🔐 Stap 3: Bereid Environment Variabelen Voor
Maak een .env.production bestand (niet committen naar Git!):
# Backend Environment Variables
NODE_ENV=production
PORT=3001
# Jira Configuration
JIRA_BASE_URL=https://jira.zuyderland.nl
JIRA_SCHEMA_ID=your-schema-id
JIRA_PAT=your-personal-access-token
# OF
JIRA_OAUTH_CLIENT_ID=your-client-id
JIRA_OAUTH_CLIENT_SECRET=your-client-secret
# Session
SESSION_SECRET=your-secure-random-secret
# AI (Optioneel)
ANTHROPIC_API_KEY=your-anthropic-key
OPENAI_API_KEY=your-openai-key
# Database (als je PostgreSQL gebruikt)
DATABASE_URL=postgresql://user:password@host:5432/dbname
# Frontend API URL
VITE_API_URL=https://your-backend-url.com/api
Gebruik Azure Key Vault voor secrets in productie!
🚀 Stap 4: Kies Deployment Methode
Quick Start: VM met Docker Compose
Als je snel wilt starten:
-
Maak Azure VM aan:
az vm create \ --resource-group rg-cmdb-gui \ --name vm-cmdb-gui \ --image Ubuntu2204 \ --size Standard_B2s \ --admin-username azureuser \ --generate-ssh-keys -
SSH naar de VM:
ssh azureuser@<vm-public-ip> -
Installeer Docker en Docker Compose:
# Docker curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker $USER # Docker Compose sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose -
Login naar ACR:
az acr login --name zdlas # OF docker login zdlas.azurecr.io -u <acr-username> -p <acr-password> -
Clone repository en deploy:
git clone <your-repo-url> cd cmdb-insight # Update docker-compose.prod.acr.yml met juiste ACR naam # Maak .env.production aan docker-compose -f docker-compose.prod.acr.yml up -d
📝 Stap 5: Configureer Nginx Reverse Proxy
Update nginx/nginx.conf voor productie:
- SSL/TLS certificaat configuratie
- Domain name
- Backend API proxy
- Frontend static files
Zie: nginx/nginx.conf voor configuratie template.
🔒 Stap 6: Security Checklist
- SSL/TLS certificaat geconfigureerd
- Environment variabelen in Key Vault (niet in code)
- Firewall rules geconfigureerd
- CORS correct geconfigureerd
- Rate limiting ingeschakeld
- Health checks geconfigureerd
- Monitoring/alerting ingesteld
📊 Stap 7: Monitoring Setup
Azure Application Insights:
- Application performance monitoring
- Error tracking
- Usage analytics
Azure Monitor:
- Container health
- Resource usage
- Alerts
🎯 Aanbevolen Volgorde
- Verifieer images in ACR (Stap 1)
- Kies deployment optie (Optie 1, 2, of 3)
- Bereid environment variabelen voor (Stap 3)
- Deploy naar test environment
- Test functionaliteit
- Configureer SSL/TLS
- Setup monitoring
- Deploy naar productie
📚 Gerelateerde Documentatie
- Azure App Service Deployment:
docs/AZURE-APP-SERVICE-DEPLOYMENT.md(te maken) - Azure Container Instances:
docs/AZURE-CONTAINER-INSTANCES-DEPLOYMENT.md(te maken) - VM Docker Compose:
docs/VM-DOCKER-COMPOSE-DEPLOYMENT.md(te maken) - Production Deployment:
docs/PRODUCTION-DEPLOYMENT.md - Azure Deployment Summary:
docs/AZURE-DEPLOYMENT-SUMMARY.md
❓ Vragen?
Veelgestelde vragen:
Q: Welke deployment optie moet ik kiezen?
A: Voor 20 gebruikers: Azure App Service (Optie 1) is het meest geschikt - managed service, eenvoudig, voldoende resources.
Q: Moet ik PostgreSQL gebruiken of kan ik SQLite houden?
A: SQLite is prima voor 20 gebruikers. PostgreSQL is beter voor groei of als je connection pooling nodig hebt.
Q: Hoe configureer ik SSL?
A: Azure App Service heeft ingebouwde SSL. Voor VM: gebruik Let's Encrypt met certbot.
Q: Hoe update ik de applicatie?
A: Push naar main branch → Pipeline bouwt nieuwe images → Pull nieuwe images in deployment → Restart containers.
🎉 Success!
Je hebt nu:
- ✅ Docker images in ACR
- ✅ Automatische CI/CD pipeline
- ✅ Deployment configuratie klaar
Volgende stap: Kies je deployment optie en volg de stappen!