Gabriel00A commited on
Commit
39d5eaa
·
verified ·
1 Parent(s): eed14dc

Update start.sh

Browse files
Files changed (1) hide show
  1. start.sh +6 -6
start.sh CHANGED
@@ -1,13 +1,13 @@
1
  #!/usr/bin/env bash
2
  set -e
3
 
4
- # 启动 supercronic(若存在 crontab)和 uvicorn
5
- # supercronic 二进制需在 Dockerfile 中安装
6
- if [ -f /workspace/crontab ]; then
7
  echo "启动定时任务(supercronic)"
8
  /usr/local/bin/supercronic /workspace/crontab &
9
  fi
10
 
11
- echo "启动 Gunicorn 服务器"
12
- gunicorn --bind 0.0.0.0:7860 app:app
13
- ```
 
1
  #!/usr/bin/env bash
2
  set -e
3
 
4
+ # 启动 supercronic 定时任务服务
5
+ if [ -f /workspace/crontab ];
6
+ then
7
  echo "启动定时任务(supercronic)"
8
  /usr/local/bin/supercronic /workspace/crontab &
9
  fi
10
 
11
+ # 使用 Uvicorn 启动 FastAPI 应用
12
+ echo "启动 FastAPI on 0.0.0.0:7860"
13
+ uvicorn app:app --host 0.0.0.0 --port 7860