sataseyu-AI-verification / docker-compose.yml
Anurag Banerjee
Model added
3a32bd4
Raw
History Blame Contribute Delete
1.63 kB
# ============================================
# Certificate Verification AI Service
# Docker Compose - Local Development & Production
# ============================================
services:
# ---- AI Verification API ----
cert-verify-api:
build:
context: .
dockerfile: Dockerfile
container_name: cert-verify-api
restart: unless-stopped
ports:
- "${PORT:-8080}:${PORT:-8080}"
env_file:
- .env
environment:
- PORT=${PORT:-8080}
- WORKERS=${WORKERS:-1}
- LOG_LEVEL=${LOG_LEVEL:-info}
- SKIP_MODEL_LOADING=${SKIP_MODEL_LOADING:-false}
volumes:
# Persist downloaded models across container restarts
- model-cache:/app/models
- vit-cache:/app/vit_cache
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 2G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-8080}/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# ---- Nginx Reverse Proxy (optional, for production) ----
nginx:
image: nginx:1.25-alpine
container_name: cert-verify-nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/certs:/etc/nginx/certs:ro
depends_on:
cert-verify-api:
condition: service_healthy
profiles:
- production
volumes:
model-cache:
driver: local
vit-cache:
driver: local