mirror of
https://github.com/TeamWiseFlow/wiseflow.git
synced 2025-01-23 02:20:20 +08:00
23 lines
409 B
Bash
Executable File
23 lines
409 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o allexport
|
|
source .env
|
|
set +o allexport
|
|
|
|
# 启动 PocketBase
|
|
/pb/pocketbase serve --http=127.0.0.1:8090 &
|
|
pocketbase_pid=$!
|
|
|
|
# 启动 Python 任务
|
|
python tasks.py &
|
|
python_pid=$!
|
|
|
|
# 启动 Uvicorn
|
|
# uvicorn backend:app --reload --host 0.0.0.0 --port 8077 &
|
|
# uvicorn_pid=$!
|
|
|
|
# 定义信号处理函数
|
|
trap 'kill $pocketbase_pid $python_pid' SIGINT SIGTERM
|
|
|
|
# 等待所有进程结束
|
|
wait |