将环境设置为生产模式;更新网络名称配置

This commit is contained in:
2026-04-08 10:49:01 +08:00
parent 6b09c6b20d
commit 644babf77e
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# TJWater Server 环境变量配置模板
# 复制此文件为 .env 并填写实际值
ENVIRONMENT="local"
ENVIRONMENT="production"
NETWORK_NAME="tjwater"
# ============================================
# 安全配置 (必填)
+3 -1
View File
@@ -6,9 +6,11 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
PROJECT_NAME: str = "TJWater Server"
ENVIRONMENT: str = "local"
ENVIRONMENT: str = "production"
API_V1_STR: str = "/api/v1"
NETWORK_NAME: str = "default_network"
# JWT 配置
SECRET_KEY: str = (
"your-secret-key-here-change-in-production-use-openssl-rand-hex-32"
+2 -3
View File
@@ -1,4 +1,3 @@
import os
from app.core.config import settings
# 从环境变量 NETWORK_NAME 读取
name = os.getenv("NETWORK_NAME")
name = settings.NETWORK_NAME