aigenai commited on
Commit
e733de4
·
verified ·
1 Parent(s): fc5ef51

Update run.sh

Browse files
Files changed (1) hide show
  1. run.sh +6 -3
run.sh CHANGED
@@ -1,6 +1,9 @@
1
  #!/bin/bash
 
 
 
2
 
3
- # 启动 PostgreSQL 服务
4
  docker-entrypoint.sh postgres &
5
 
6
  # 检查 PostgreSQL 服务是否已启动
@@ -10,6 +13,6 @@ until pg_isready -h localhost; do
10
  done
11
  echo "PostgreSQL 服务已启动!"
12
 
13
- # 启动 Flask 应用
14
  echo "启动 Flask 应用..."
15
- $VIRTUAL_ENV/bin/python app.py
 
1
  #!/bin/bash
2
+ whoami
3
+ which python3
4
+ cat /etc/passwd
5
 
6
+ # 启动 PostgreSQL 服务,确保使用 postgres 用户
7
  docker-entrypoint.sh postgres &
8
 
9
  # 检查 PostgreSQL 服务是否已启动
 
13
  done
14
  echo "PostgreSQL 服务已启动!"
15
 
16
+ # 启动 Flask 应用,确保使用虚拟环境中的 Python
17
  echo "启动 Flask 应用..."
18
+ $VIRTUAL_ENV/bin/python app.py