-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·65 lines (54 loc) · 1.49 KB
/
deploy.sh
File metadata and controls
executable file
·65 lines (54 loc) · 1.49 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
58
59
60
61
62
63
64
65
#!/bin/bash
# Expense Notes Deployment Script
set -e
echo "=================================="
echo "Expense Notes - Deployment Script"
echo "=================================="
echo ""
# Check if .env exists
if [ ! -f "backend/.env" ]; then
echo "❌ Error: backend/.env not found!"
echo ""
echo "Please create it from the template:"
echo " cp backend/.env.production backend/.env"
echo " nano backend/.env"
echo ""
exit 1
fi
# Check if Docker is running
if ! docker info > /dev/null 2>&1; then
echo "❌ Error: Docker is not running!"
exit 1
fi
# Check if Traefik network exists
if ! docker network ls | grep -q "traefik_public"; then
echo "⚠️ Warning: traefik_public network not found"
echo "Creating network..."
docker network create traefik_public
fi
echo "🔨 Building containers..."
docker compose build
echo ""
echo "🚀 Starting services..."
docker compose up -d
echo ""
echo "⏳ Waiting for services to start..."
sleep 5
echo ""
echo "📊 Service Status:"
docker compose ps
echo ""
echo "=================================="
echo "✅ Deployment Complete!"
echo "=================================="
echo ""
echo "Your application should be available at:"
echo " Frontend: Check your Traefik dashboard"
echo " Backend API Docs: /docs endpoint"
echo ""
echo "View logs with:"
echo " docker compose logs -f"
echo ""
echo "If this is your first deployment, create an admin user:"
echo " docker exec -it expense-notes-backend python setup.py"
echo ""