diff options
Diffstat (limited to 'run-backend.sh')
| -rwxr-xr-x | run-backend.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/run-backend.sh b/run-backend.sh new file mode 100755 index 0000000..83365d1 --- /dev/null +++ b/run-backend.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# sh install-site.sh + +echo "restarting ollama..." +sudo service ollama stop +sudo service ollama start + +echo "killing processes on port 3001 and 3000..." +sudo fuser -ki 3001/tcp +sudo fuser -ki 3009/tcp +sudo fuser -ki 3010/tcp +sudo fuser -ki 3000/tcp + +sleep 1 + +cd backend +echo 'starting backend...' +tmux new-session -s backend -d "cd api && zig build && ./zig-out/bin/axonbox-backend --domain https://axonbox.net" +echo 'starting chat api...' +tmux split-window -h -t backend "cd instance && npm run start -- -c 20000 --no-wget-verify" +tmux split-window -v -t backend "cd instance && npm run start -- -c 20000 --no-wget-verify --port 3009" +tmux split-window -h -t backend "cd instance && npm run start -- -c 20000 --no-wget-verify --port 3010" + +tmux attach -t backend + +echo 'running.' |
