-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·60 lines (48 loc) · 1.27 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·60 lines (48 loc) · 1.27 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
#!/bin/bash
echo "🚀 Setting up HR Claims Management System"
# 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
# Start PostgreSQL
echo "📦 Starting PostgreSQL database..."
docker compose up -d postgres
# Wait for PostgreSQL to be ready
echo "⏳ Waiting for PostgreSQL to be ready..."
sleep 5
# Setup backend
echo "🔧 Setting up Go backend..."
cd backend
# Download Go dependencies
echo "📥 Downloading Go dependencies..."
go mod download
# Run database migrations
echo "🗄️ Running database migrations..."
go run main.go &
BACKEND_PID=$!
sleep 3
kill $BACKEND_PID
cd ..
# Setup frontend
echo "🎨 Setting up Vue.js frontend..."
cd frontend
# Install Node.js dependencies
echo "📥 Installing Node.js dependencies..."
npm install
cd ..
echo "✅ Setup complete!"
echo ""
echo "🚀 To start the application:"
echo " Backend: cd backend && go run main.go"
echo " Frontend: cd frontend && npm run dev"
echo ""
echo "📱 Application URLs:"
echo " Frontend: http://localhost:3000"
echo " Backend: http://localhost:8000"
echo ""
echo "🗄️ Database:"
echo " Host: localhost:5432"
echo " Database: hrcs"
echo " Username: postgres"
echo " Password: postgres"