chore: update deployment config

This commit is contained in:
2026-07-06 18:36:11 +08:00
parent 0a12eb7f3b
commit 6bc2a5f8d7
7 changed files with 28 additions and 24 deletions
+3
View File
@@ -4,10 +4,13 @@ __pycache__/
.git/
.agents/
.codex/
node_modules/
.env
app.log
server.out.log
server.err.log
data/
pipe_survival_0331.db
uploads/
static/images/
+2 -2
View File
@@ -1,10 +1,10 @@
# Copy to .env for local deployment.
# Generate SECRET_KEY with: python -c "import secrets; print(secrets.token_hex(32))"
SECRET_KEY=
SECRET_KEY=change-me-to-a-long-random-secret
# Required for first deployment. Used to create or rotate the admin account on startup.
ADMIN_USERNAME=admin
ADMIN_PASSWORD=
ADMIN_PASSWORD=change-me
# Persist the app database in the mounted ./data directory.
DATABASE_URL=sqlite:////app/data/pipe_survival_0331.db
+1 -1
View File
@@ -28,4 +28,4 @@ RUN mkdir -p data static/images uploads
EXPOSE 5005
CMD ["conda", "run", "--no-capture-output", "-n", "demo", "python", "main.py"]
CMD ["conda", "run", "--no-capture-output", "-n", "demo", "gunicorn", "--bind", "0.0.0.0:5005", "--workers", "2", "--threads", "4", "--timeout", "120", "main:app"]
+1
View File
@@ -14,6 +14,7 @@ services:
MAX_UPLOAD_BYTES: ${MAX_UPLOAD_BYTES:-16777216}
MODEL_PATH: ${MODEL_PATH:-/app/my_survival_forest_model_quxi-10-0331.joblib}
ALLOW_REGISTRATION: ${ALLOW_REGISTRATION:-false}
PASSWORD_RESET_TOKEN_MINUTES: ${PASSWORD_RESET_TOKEN_MINUTES:-30}
ports:
- "5005:5005"
volumes:
+18 -17
View File
@@ -1,17 +1,18 @@
Flask==3.1.3
Flask-SQLAlchemy==3.1.1
Flask-Login==0.6.3
Werkzeug==3.1.6
SQLAlchemy==2.0.48
pandas==2.3.3
numpy==2.0.2
joblib==1.5.2
matplotlib==3.10.8
openpyxl==3.1.5
XlsxWriter==3.2.9
xlrd==2.0.2
scikit-learn==1.8.0
scikit-survival==0.27.0
Flask==3.1.3
Flask-SQLAlchemy==3.1.1
Flask-Login==0.6.3
Werkzeug==3.1.6
SQLAlchemy==2.0.48
gunicorn==23.0.0
pandas==2.3.3
numpy==2.0.2
joblib==1.5.2
matplotlib==3.10.8
openpyxl==3.1.5
XlsxWriter==3.2.9
xlrd==2.0.2
scikit-learn==1.8.0
scikit-survival==0.27.0
+2 -3
View File
@@ -120,9 +120,8 @@
<span>供水管道健康评估系统</span>
</div>
<h1 class="text-[52px] leading-[1.5] font-extrabold tracking-tight">
供水管道健康状态<br>
剩余寿命评估<br>
技术导则
供水管道健康状态<br>
剩余寿命评估系统<br>
</h1>
<p class="mt-6 text-white/75 text-[15px] max-w-[440px] leading-7">上传管网数据,自动生成健康状态评估、剩余寿命预测与输入因素重要性分析。</p>
</div>
+1 -1
View File
@@ -7,7 +7,7 @@
<div class="mb-6 flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between">
<div>
<h1 class="text-3xl font-extrabold tracking-tight sm:text-4xl">技术导则参考文档</h1>
<p class="mt-2 text-sm text-textSub">供水管道健康状态与剩余寿命评估技术导则</p>
<p class="mt-2 text-sm text-textSub">供水管道健康状态与剩余寿命评估系统</p>
</div>
<a href="{{ url_for('main.reference_pdf') }}" target="_blank" rel="noopener" class="ui-btn ui-btn-primary">
<span class="material-symbols-outlined text-lg">open_in_new</span>