-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
41 lines (34 loc) Β· 1.28 KB
/
deploy.sh
File metadata and controls
41 lines (34 loc) Β· 1.28 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
#!/bin/bash
# Evolution API Deployment Script
echo "π Starting Evolution API deployment..."
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "β Docker is not running. Please start Docker first."
exit 1
fi
# Create .env 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 production values before continuing."
echo " Important: Change POSTGRES_PASSWORD and JWT_SECRET!"
read -p "Press Enter after updating .env file..."
fi
# Build and start services
echo "π¨ Building Evolution API..."
docker-compose -f docker-compose.prod.yml build
echo "π Starting services..."
docker-compose -f docker-compose.prod.yml up -d
# Wait for services to be ready
echo "β³ Waiting for services to start..."
sleep 10
# Check if services are running
if docker-compose -f docker-compose.prod.yml ps | grep -q "Up"; then
echo "β
Evolution API is running!"
echo "π API URL: http://localhost:8080"
echo "π Manager: http://localhost:8080/manager"
echo "π Documentation: https://doc.evolution-api.com"
else
echo "β Failed to start services. Check logs with:"
echo " docker-compose -f docker-compose.prod.yml logs"
fi