invoice-generator / deploy-hf.sh
anuragshas's picture
add: huggingface docker
6c18509
raw
history blame
1.21 kB
#!/bin/bash
# Build and deploy script for invoice generator on Hugging Face Spaces
set -e
echo "πŸ€— Starting Hugging Face Spaces deployment process..."
# Stop existing services
echo "πŸ›‘ Stopping existing services..."
docker-compose -f docker-compose.hf.yml down 2>/dev/null || true
# Build and start the Hugging Face Spaces service
echo "πŸ“¦ Building and starting services for HF Spaces..."
docker-compose -f docker-compose.hf.yml up --build -d
# Show status
echo "πŸ“Š Service status:"
docker-compose -f docker-compose.hf.yml ps
echo "βœ… Hugging Face Spaces deployment completed successfully!"
echo "🌐 Application is available at: http://localhost:7860"
echo "πŸ€— Ready to deploy to Hugging Face Spaces!"
# Optional: Show logs
echo "πŸ“‹ Recent logs:"
docker-compose -f docker-compose.hf.yml logs --tail=20 invoice-generator
echo ""
echo "πŸ“ Next steps for Hugging Face Spaces:"
echo "1. Create a new Space on Hugging Face"
echo "2. Upload these files to your Space:"
echo " - Dockerfile.hf (rename to Dockerfile)"
echo " - nginx.hf.conf"
echo " - All your source files (package.json, src/, etc.)"
echo "3. Set Space SDK to 'docker'"
echo "4. Your app will be available on port 7860"