-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·38 lines (30 loc) · 1.01 KB
/
deploy.sh
File metadata and controls
executable file
·38 lines (30 loc) · 1.01 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
#!/bin/bash
echo "🚀 Starting deployment process..."
# 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
# Build and start the application
echo "📦 Building and starting the application..."
docker-compose up --build -d
# Wait for services to be ready
echo "⏳ Waiting for services to be ready..."
sleep 10
# Check if services are running
echo "🔍 Checking service status..."
docker-compose ps
echo "✅ Deployment completed!"
echo "🌐 Frontend: http://localhost:3000"
echo "🔧 Backend: http://localhost:8000"
echo "📊 MongoDB: localhost:27017"
echo ""
echo "📋 Useful commands:"
echo " - View logs: docker-compose logs -f"
echo " - Stop services: docker-compose down"
echo " - Restart services: docker-compose restart"