-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·47 lines (38 loc) · 1.19 KB
/
Copy pathrun.sh
File metadata and controls
executable file
·47 lines (38 loc) · 1.19 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
#!/bin/bash
# Turtle Terminal - Dev Launch Script
echo ">>> Launching Turtle Terminal Services..."
# 1. Start Infrastructure (DB/Redis)
echo ">>> Starting Docker Containers..."
docker-compose up -d
# 2. Activate Venv
source venv/bin/activate
# 3. Start Celery Worker (Background)
# Creating a dummy worker entry point if needed, or pointing to backend/main
echo ">>> Starting Celery Worker..."
celery -A backend.celery_worker worker --loglevel=info &
CELERY_PID=$!
# 4. Start FastAPI Backend
echo ">>> Starting Backend API (Port 8000)..."
uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload --reload-dir backend \
--reload-exclude "venv-wsl" \
--reload-exclude "venv" \
--reload-exclude ".git" \
--reload-exclude "timescale" \
--reload-exclude "node_modules" \
--reload-exclude "pgdata" \
--reload-exclude "pgadmin" \
--reload-exclude "__pycache__" \
--reload-exclude "*.pyc" &
BACKEND_PID=$!
echo ">>> Turtle Terminal is Live at http://localhost:8000"
echo ">>> Press CTRL+C to stop all services."
# Trap cleanup
cleanup() {
echo ">>> Shutting down..."
kill $CELERY_PID
kill $BACKEND_PID
docker-compose down
exit
}
trap cleanup SIGINT
wait