version: '3.8' services: api: image: job-matching-api build: . container_name: job-matching-api ports: - "7860:7860" # Docker compose sẽ tự động đọc biến môi trường từ file .env env_file: - .env # Ép chạy trên CPU để khớp với môi trường deploy environment: - DEVICE=cpu restart: unless-stopped # Ánh xạ thư mục cache ra ngoài host để không phải tải lại model mỗi lần restart volumes: - hf_cache:/app/cache volumes: hf_cache: