-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdeploy.sh
More file actions
57 lines (47 loc) · 1.61 KB
/
Copy pathdeploy.sh
File metadata and controls
57 lines (47 loc) · 1.61 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# PitchLense Deployment Script
set -e
echo "🚀 Starting PitchLense deployment..."
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "❌ Docker is not installed. Please install Docker first."
exit 1
fi
# Check if Docker Compose is installed
if ! command -v docker-compose &> /dev/null; then
echo "❌ Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
# Create environment file if it doesn't exist
if [ ! -f .env ]; then
echo "📝 Creating .env file from template..."
cp .env.example .env
echo "⚠️ Please edit .env file with your configuration before continuing."
echo "Press Enter when ready to continue..."
read
fi
# Build and start the application
echo "🔨 Building Docker image..."
docker-compose build
echo "🚀 Starting services..."
docker-compose up -d
# Wait for the application to be ready
echo "⏳ Waiting for application to be ready..."
sleep 10
# Check if the application is running
if curl -f http://localhost:3000/health > /dev/null 2>&1; then
echo "✅ PitchLense is running successfully!"
echo "🌐 Application URL: http://localhost:3000"
echo "📊 Health check: http://localhost:3000/health"
else
echo "❌ Application failed to start. Checking logs..."
docker-compose logs pitchlense
exit 1
fi
echo "🎉 Deployment completed successfully!"
echo ""
echo "📋 Useful commands:"
echo " View logs: docker-compose logs -f pitchlense"
echo " Stop app: docker-compose down"
echo " Restart app: docker-compose restart"
echo " Update app: docker-compose pull && docker-compose up -d"