forked from biniyam69/flexile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev
More file actions
executable file
·41 lines (30 loc) · 828 Bytes
/
dev
File metadata and controls
executable file
·41 lines (30 loc) · 828 Bytes
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
set -e
if [ -f ".vercel/project.json" ]; then
pnpx vercel env pull .env
elif [ ! -f ".env" ]; then
echo ".env file not found. Please run bin/setup first."
exit 1
fi
echo "Installing Node.js dependencies..."
pnpm install
echo "Starting Docker services..."
make local
cd backend
echo "Installing backend dependencies..."
bundle install
echo "Preparing database..."
bin/rails db:prepare
cd ..
function kill_process_listening_on_port {
pids="$(lsof -t -i :"$1" -sTCP:LISTEN 2>/dev/null | tr '\n' ' ')"
if [ -n "$pids" ]; then
kill -9 $pids 2>/dev/null || true
fi
}
echo "Cleaning up existing processes..."
kill_process_listening_on_port 3000
kill_process_listening_on_port 3001
rm -f backend/tmp/pids/server.pid
echo "Starting application services..."
foreman start -f Procfile.dev "$@"