diff --git a/.env b/.env index 44ac0ea..114de62 100644 --- a/.env +++ b/.env @@ -1,7 +1,8 @@ # 环境变量配置文件 # 数据库配置 -DATABASE_URL=postgresql://luna:123luna@6.6.6.86:6432/luna +# DATABASE_URL=postgresql://luna:123luna@121.43.104.161:6432/luna +DATABASE_URL=postgresql://luna:123luna@6.6.6.86:5432/luna # MQTT配置 MQTT_BROKER_HOST=luna-mqtt diff --git a/.env.docker b/.env.docker index fa7f905..651f744 100644 --- a/.env.docker +++ b/.env.docker @@ -1,9 +1,9 @@ -# Docker环境变量配置文件 +# 环境变量配置文件 -# 数据库配置 - 使用外部数据库 -DATABASE_URL=postgresql://luna:123luna@121.43.104.161:6432/luna - -# MQTT配置 - 使用Docker内部服务名 +# 数据库配置 +# DATABASE_URL=postgresql://luna:123luna@121.43.104.161:6432/luna +DATABASE_URL=postgresql://luna:123luna@6.6.6.86:5432/luna +# MQTT配置 MQTT_BROKER_HOST=luna-mqtt MQTT_BROKER_PORT=1883 MQTT_USERNAME=luna2025 @@ -23,10 +23,10 @@ INK_WIDTH=400 INK_HEIGHT=300 # 安全配置 -SECRET_KEY=123quant-speed +SECRET_KEY=123tangledup-ai ALGORITHM=HS256 ACCESS_TOKEN_EXPIRE_MINUTES=30 # 管理员配置 -ADMIN_USERNAME=userName -ADMIN_PASSWORD=userPassword \ No newline at end of file +ADMIN_USERNAME=admin +ADMIN_PASSWORD=123456 \ No newline at end of file diff --git a/.env.example b/.env.example index c64ef1e..651f744 100644 --- a/.env.example +++ b/.env.example @@ -1,13 +1,13 @@ # 环境变量配置文件 # 数据库配置 -DATABASE_URL=postgresql://luna:123luna@121.43.104.161:6432/luna - +# DATABASE_URL=postgresql://luna:123luna@121.43.104.161:6432/luna +DATABASE_URL=postgresql://luna:123luna@6.6.6.86:5432/luna # MQTT配置 -MQTT_BROKER_HOST=localhost +MQTT_BROKER_HOST=luna-mqtt MQTT_BROKER_PORT=1883 -# MQTT_USERNAME= -# MQTT_PASSWORD= +MQTT_USERNAME=luna2025 +MQTT_PASSWORD=123luna2021 # 应用配置 APP_NAME=墨水屏桌面屏幕系统 diff --git a/config.py b/config.py index 6241588..1a6377a 100644 --- a/config.py +++ b/config.py @@ -3,7 +3,9 @@ from typing import Optional class Settings(BaseSettings): # 数据库配置 - database_url: str = "postgresql://luna:123luna@121.43.104.161:6432/luna_ink" + #database_url: str = "postgresql://luna:123luna@121.43.104.161:6432/luna" + database_url: str = "postgresql://luna:123luna@6.6.6.86:5432/luna" + # MQTT配置 mqtt_broker_host: str = "localhost" @@ -25,7 +27,7 @@ class Settings(BaseSettings): ink_height: int = 300 # 安全配置 - secret_key: str = "your-secret-key-change-in-production" + secret_key: str = "123tangledup-ai" algorithm: str = "HS256" access_token_expire_minutes: int = 30 @@ -35,5 +37,6 @@ class Settings(BaseSettings): class Config: env_file = ".env" + case_sensitive = False settings = Settings() \ No newline at end of file