File size: 2,479 Bytes
31f0e50 6a4a552 31f0e50 6a4a552 31f0e50 6a4a552 31f0e50 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | # ScamShield AI - Docker Compose Configuration
# For local development and testing
version: '3.8'
services:
# =====================================================
# ScamShield AI API
# =====================================================
api:
build:
context: .
dockerfile: Dockerfile
container_name: scamshield-api
# Map host port 8000 to container port 7860 (Dockerfile uses 7860)
ports:
- "8000:7860"
environment:
- ENVIRONMENT=development
- DEBUG=true
- LOG_LEVEL=INFO
- API_PORT=7860
- GROQ_API_KEY=${GROQ_API_KEY}
- POSTGRES_URL=postgresql://scamshield:password@postgres:5432/scamshield
- REDIS_URL=redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./app:/app/app:ro # Mount app for development
networks:
- scamshield-network
restart: unless-stopped
# =====================================================
# PostgreSQL Database
# =====================================================
postgres:
image: postgres:15-alpine
container_name: scamshield-postgres
environment:
- POSTGRES_USER=scamshield
- POSTGRES_PASSWORD=password
- POSTGRES_DB=scamshield
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U scamshield"]
interval: 10s
timeout: 5s
retries: 5
networks:
- scamshield-network
restart: unless-stopped
# =====================================================
# Redis Cache
# =====================================================
redis:
image: redis:7-alpine
container_name: scamshield-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- scamshield-network
restart: unless-stopped
# =====================================================
# Networks
# =====================================================
networks:
scamshield-network:
driver: bridge
# =====================================================
# Volumes
# =====================================================
volumes:
postgres_data:
redis_data:
|