Docker Deployment
Deploy IntuneGet using Docker for portable, consistent deployments on any infrastructure.
Prerequisites
- Docker installed (Install Docker)
- Docker Compose (usually included with Docker Desktop)
- Completed Azure AD setup
- A Windows machine for running the local packager
Quick Start
The fastest way to deploy IntuneGet with Docker:
# Clone your fork (or the main repo)
git clone https://github.com/YOUR_USERNAME/IntuneGet.git
cd IntuneGet
# Copy and configure environment
cp .env.example .env.local
# Edit .env.local with your values
# (Use your favorite editor)
# Start the application
docker-compose up -dThe application will be available at http://localhost:3000
Step-by-Step Setup
Clone the Repository
git clone https://github.com/YOUR_USERNAME/IntuneGet.git
cd IntuneGetConfigure Environment Variables
Copy the example environment file:
cp .env.example .env.localEdit .env.local and fill in all required values:
# Database (SQLite mode for self-hosting)
DATABASE_MODE=sqlite
DATABASE_PATH=/data/intuneget.db
# Local Packager
PACKAGER_MODE=local
PACKAGER_API_KEY=your-secure-random-key
# Azure AD
NEXT_PUBLIC_AZURE_AD_CLIENT_ID=your-client-id
AZURE_AD_CLIENT_SECRET=your-client-secret
# Application URL
NEXT_PUBLIC_URL=http://localhost:3000Start with Docker Compose
# Start in detached mode
docker-compose up -d
# View logs
docker-compose logs -f
# Stop
docker-compose downVerify Deployment
Check that everything is running:
# Check container status
docker-compose ps
# Test health endpoint
curl http://localhost:3000/api/healthExpected health response:
{
"status": "healthy",
"mode": "self-hosted",
"services": {
"database": true,
"auth": true,
"pipeline": true
}
}Docker Compose Configuration
The included docker-compose.yml provides a production-ready configuration with SQLite persistence:
1version: '3.8'23services:4 intuneget:5 build:6 context: .7 dockerfile: Dockerfile8 ports:9 - "3000:3000"10 environment:11 - DATABASE_MODE=sqlite12 - DATABASE_PATH=/data/intuneget.db13 - PACKAGER_MODE=local14 - PACKAGER_API_KEY=${PACKAGER_API_KEY}15 - NEXT_PUBLIC_AZURE_AD_CLIENT_ID=${NEXT_PUBLIC_AZURE_AD_CLIENT_ID}16 - AZURE_AD_CLIENT_SECRET=${AZURE_AD_CLIENT_SECRET}17 - NEXT_PUBLIC_URL=${NEXT_PUBLIC_URL}18 volumes:19 - intuneget-data:/data20 restart: unless-stopped21 healthcheck:22 test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]23 interval: 30s24 timeout: 10s25 retries: 326 start_period: 40s2728volumes:29 intuneget-data:Data Persistence
The intuneget-data volume ensures your SQLite database persists across container restarts and updates. Never remove this volume unless you want to start fresh.
Reverse Proxy Configuration
For production, place IntuneGet behind a reverse proxy for SSL termination:
server {
listen 80;
server_name intuneget.yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}intuneget.yourdomain.com {
reverse_proxy localhost:3000
}Caddy automatically provisions and renews SSL certificates from Let's Encrypt.
version: '3.8'
services:
intuneget:
# ... your existing config ...
labels:
- "traefik.enable=true"
- "traefik.http.routers.intuneget.rule=Host(`intuneget.yourdomain.com`)"
- "traefik.http.routers.intuneget.entrypoints=websecure"
- "traefik.http.routers.intuneget.tls.certresolver=letsencrypt"SSL/TLS
Always Use HTTPS in Production
IntuneGet handles authentication tokens and interacts with Microsoft APIs. Always use HTTPS in production environments.
Caddy
Automatic Let's Encrypt certificates
Nginx + Certbot
Run certbot for certificate management
Cloud Load Balancer
AWS ALB, GCP LB, or Azure App Gateway
Updating Your Deployment
To update to the latest version:
# Pull latest changes
git pull origin main
# Rebuild and restart
docker-compose down
docker-compose build --no-cache
docker-compose up -dDatabase Migrations
SQLite database schema is managed automatically. After major updates, the schema will be updated on application startup. Check the release notes for any manual migration steps if needed.
Production Checklist
Common Issues
Container fails to start
- Check logs:
docker-compose logs -f - Verify .env.local exists and has correct values
- Ensure port 3000 is not in use
Database errors
- Verify DATABASE_MODE=sqlite is set
- Check volume mount for /data directory
- Verify write permissions:
docker exec intuneget ls -la /data
Build fails
- Ensure Docker has enough memory (at least 4GB)
- Try building with no cache:
docker-compose build --no-cache - Check for any TypeScript errors in the codebase
Next Steps
Your Docker deployment is ready! Check the troubleshooting guide if you run into any issues.
View Troubleshooting Guide