mirror of
https://github.com/vee1e/InstaFuel_Chatbot_public.git
synced 2026-09-01 18:57:24 +00:00
26 lines
825 B
Bash
26 lines
825 B
Bash
#!/bin/bash
|
|
|
|
SESSION="instafuel"
|
|
|
|
# Kill existing session if it exists
|
|
tmux has-session -t $SESSION 2>/dev/null
|
|
if [ $? -eq 0 ]; then
|
|
tmux kill-session -t $SESSION
|
|
fi
|
|
|
|
# 1. Start Qdrant (Docker)
|
|
tmux new-session -d -s $SESSION -n "services"
|
|
tmux send-keys -t $SESSION "docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant" C-m
|
|
|
|
# 2. Start Backend (with venv activation)
|
|
# We wait 2 seconds for Docker to spin up
|
|
tmux split-window -h -t $SESSION
|
|
tmux send-keys -t $SESSION "sleep 2 && source .venv/bin/activate && uvicorn src.api.server:app --host 0.0.0.0 --port 8000 --reload" C-m
|
|
|
|
# 3. Start Frontend (Bun)
|
|
tmux split-window -v -t $SESSION.1
|
|
tmux send-keys -t $SESSION "cd frontend && bun run dev" C-m
|
|
|
|
# Select the backend pane as the default focus and attach
|
|
tmux select-pane -t $SESSION.1
|
|
tmux attach-session -t $SESSION
|