-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·63 lines (60 loc) · 1.59 KB
/
Copy pathdev.sh
File metadata and controls
executable file
·63 lines (60 loc) · 1.59 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
#!/bin/bash
# Quick rebuild script for CodeIntel development
# Usage: ./dev.sh [frontend|backend|all]
set -e
cd "$(dirname "$0")"
case "${1:-frontend}" in
frontend|f)
echo "🔄 Rebuilding frontend only..."
docker compose build frontend
docker compose up -d frontend
echo "✅ Frontend rebuilt in ~10s"
;;
backend|b)
echo "🔄 Rebuilding backend only..."
docker compose build backend
docker compose up -d backend
echo "✅ Backend rebuilt"
;;
all|a)
echo "🔄 Rebuilding all services..."
docker compose build
docker compose up -d
echo "✅ All services rebuilt"
;;
logs|l)
docker compose logs -f "${2:-frontend}"
;;
restart|r)
echo "🔄 Restarting ${2:-all} without rebuild..."
if [ -n "$2" ]; then
docker compose restart "$2"
else
docker compose restart
fi
;;
down|d)
docker compose down
;;
status|s)
docker compose ps
;;
clean)
echo "⚠️ Full rebuild with no cache..."
docker compose build --no-cache
docker compose up -d
;;
*)
echo "Usage: ./dev.sh [command]"
echo ""
echo "Commands:"
echo " frontend, f Rebuild frontend only (~10s)"
echo " backend, b Rebuild backend only (~2min first time, cached after)"
echo " all, a Rebuild all services"
echo " logs, l [svc] Follow logs (default: frontend)"
echo " restart, r Restart without rebuild"
echo " down, d Stop all services"
echo " status, s Show container status"
echo " clean Full rebuild, no cache (slow!)"
;;
esac