db / run.sh
aigenai's picture
Update run.sh
e733de4 verified
raw
history blame
431 Bytes
#!/bin/bash
whoami
which python3
cat /etc/passwd
# 启动 PostgreSQL 服务,确保使用 postgres 用户
docker-entrypoint.sh postgres &
# 检查 PostgreSQL 服务是否已启动
echo "等待 PostgreSQL 服务启动..."
until pg_isready -h localhost; do
sleep 2
done
echo "PostgreSQL 服务已启动!"
# 启动 Flask 应用,确保使用虚拟环境中的 Python
echo "启动 Flask 应用..."
$VIRTUAL_ENV/bin/python app.py