#!/bin/bash

# 激活虚拟环境
source venv/bin/activate

# 检查是否成功激活虚拟环境
if [[ "$VIRTUAL_ENV" != "" ]]; then
    echo "Virtual environment activated: $VIRTUAL_ENV"
else
    echo "Failed to activate virtual environment"
    exit 1
fi

# 安装依赖
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple

# 启动 Django 开发服务器
#nohup python3 manage.py runserver 0.0.0.0:8085 &  #正式服务用这个
nohup python manage.py runserver 0.0.0.0:8085 &    #49服务用这个
echo "Django development server started"