You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
841 B

#!/bin/bash
# Deployment script for Lottery Simple DApp
set -e
echo "🚀 Building and deploying Lottery Simple DApp..."
# Build the Docker image
echo "📦 Building Docker image..."
docker-compose build
# Stop existing container if running
echo "🛑 Stopping existing container..."
docker-compose down
# Start the new container
echo "▶ Starting new container..."
docker-compose up -d
# Wait a moment for startup
sleep 3
# Check if it's running
if curl -s http://localhost:14888/health > /dev/null; then
echo "✅ Deployment successful!"
echo "🌐 Frontend available at: http://localhost:14888"
echo "🏥 Health check: http://localhost:14888/health"
else
echo "❌ Deployment failed - health check failed"
echo "📋 Container logs:"
docker-compose logs
exit 1
fi
echo "🎉 Deployment complete!"