Deploy ZKAuth to production with confidence. Choose your preferred deployment strategy.
Choose the deployment strategy that fits your infrastructure
Deploy to major cloud providers with managed services
AWS
Amazon Web Services
Google Cloud
Google Cloud Platform
Azure
Microsoft Azure
Deploy using Docker containers for consistency
Docker
Container orchestration
Kubernetes
Container management
Docker Compose
Multi-container apps
Deploy on your own infrastructure
VPS
Virtual Private Server
Bare Metal
Physical servers
On-Premises
Your own data center
Deploy ZKAuth using Docker containers
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 3000
CMD ["npm", "start"]version: '3.8'
services:
zkauth:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://user:pass@db:5432/zkauth
depends_on:
- db
- redis
db:
image: postgres:15
environment:
POSTGRES_DB: zkauth
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
volumes:
postgres_data:
redis_data:Deploy to Kubernetes clusters
apiVersion: apps/v1
kind: Deployment
metadata:
name: zkauth
spec:
replicas: 3
selector:
matchLabels:
app: zkauth
template:
metadata:
labels:
app: zkauth
spec:
containers:
- name: zkauth
image: zkauth/app:latest
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: "production"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: zkauth-secrets
key: database-url
---
apiVersion: v1
kind: Service
metadata:
name: zkauth-service
spec:
selector:
app: zkauth
ports:
- port: 80
targetPort: 3000
type: LoadBalancerConfigure your production environment
Configure PostgreSQL database for production
DATABASE_URL=postgresql://user:pass@host:5432/zkauth
DATABASE_SSL=true
DATABASE_POOL_SIZE=20Set up Redis for caching and sessions
REDIS_URL=redis://host:6379
REDIS_PASSWORD=your_redis_password
REDIS_DB=0Configure security for production
JWT_SECRET=your_super_secret_jwt_key
CORS_ORIGIN=https://yourdomain.com
RATE_LIMIT_WINDOW=900000
RATE_LIMIT_MAX=100Set up monitoring and logging
LOG_LEVEL=info
METRICS_ENABLED=true
HEALTH_CHECK_ENDPOINT=/health
PROMETHEUS_METRICS=true