53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
# Spug 应用配置说明
|
|
# 在 Spug Web 界面配置此应用时使用
|
|
|
|
## 基本信息
|
|
- **应用名称**: hospital_performance
|
|
- **应用类型**: 其他
|
|
- **Git 仓库**: https://gitea.gentronhealth.com/chenqi/hospital_performance.git
|
|
- **分支**: main
|
|
|
|
## 环境变量配置
|
|
|
|
在 Spug 应用的"环境变量"标签页中添加以下变量:
|
|
|
|
### 必需配置
|
|
```
|
|
SPUG_DEPLOY_DIR=/var/www/hospital-performance
|
|
SPUG_GIT_BRANCH=main
|
|
```
|
|
|
|
### 推荐配置
|
|
```
|
|
SPUG_APP_NAME=hospital_performance
|
|
PYTHON_VERSION=python3.10
|
|
BACKEND_SERVICE=hospital-backend
|
|
BACKEND_PORT=8000
|
|
FRONTEND_SERVICE=nginx
|
|
LOG_FILE=/var/log/spug/deploy.log
|
|
```
|
|
|
|
### 数据库配置(可选)
|
|
```
|
|
DATABASE_HOST=192.168.110.252
|
|
DATABASE_PORT=15432
|
|
DATABASE_USER=postgresql
|
|
DATABASE_PASSWORD=Jchl1528
|
|
DATABASE_NAME=hospital_performance
|
|
SECRET_KEY=<生成随机密钥>
|
|
DEBUG=False
|
|
```
|
|
|
|
## 发布配置
|
|
|
|
- **构建类型**: 跳过构建
|
|
- **发布脚本**: /opt/spug/scripts/deploy.sh
|
|
|
|
## 主机配置
|
|
|
|
添加目标服务器:
|
|
- **名称**: production
|
|
- **IP**: <你的服务器 IP>
|
|
- **端口**: 22
|
|
- **认证**: 密钥或密码
|