Spaces:
Sleeping
Sleeping
File size: 1,211 Bytes
6c18509 |
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 |
#!/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"
|