wiseflow/core/docker_entrypoint.sh
bigbrother666sh 7752b4b3b4 V0.3.5
2024-12-10 14:18:03 +08:00

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