Spaces:
Sleeping
Sleeping
File size: 895 Bytes
c8df794 | 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 | version: '3.8'
services:
crop-disease-api:
build:
context: .
dockerfile: api/Dockerfile
ports:
- "8000:8000"
volumes:
- ./models:/app/models:ro
- ./knowledge_base:/app/knowledge_base:ro
- ./outputs:/app/outputs
environment:
- PYTHONPATH=/app
- MODEL_PATH=/app/models/crop_disease_v3_model.pth
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# Optional: Add nginx reverse proxy for production
# nginx:
# image: nginx:alpine
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
# - ./ssl:/etc/nginx/ssl:ro
# depends_on:
# - crop-disease-api
# restart: unless-stopped
networks:
default:
name: crop-disease-network
|