主要修改点: 1. 网络绑定调整 - .env.example: WEB_HOST/VITE_WEB_HOST 从 127.0.0.1 改为 0.0.0.0 - server/src/app/core/config.py: 默认 web_host 从 127.0.0.1 改为 0.0.0.0 - web/package.json: Vite 脚本 host 从 127.0.0.1 改为 0.0.0.0 - web/vite.config.js: normalizeState 中 WEB_HOST 默认值从 127.0.0.1 改为 0.0.0.0 2. CORS 配置扩展 - .env.example: CORS_ORIGINS 添加 http://0.0.0.0:5173 3. Shell 脚本权限修复 - server/start.sh, start.sh: 添加可执行权限 (644 -> 755) 4. Setup 表单与验证逻辑简化 - web/src/composables/useSetupView.js: - 新增 readCurrentWebEndpoint() 从 window.location 自动检测当前 web host/port - 简化 runtimeInputsReady: 移除 web_host/web_port 必填验证,仅保留 server_host/server_port - 简化 buildRuntimeFingerprint(): 移除 web_host/web_port - buildPayload() 改用 readCurrentWebEndpoint() 解析 web 配置 - web/vite.config.js: - 新增 resolveRuntimePayload(): 运行时解析 web_host/web_port - 移除 validateRuntimePayload() 中的 web_host/web_port 字段验证 - 移除 testRuntimePorts() 中 web 端口冲突检测逻辑 - 移除 canReuseCurrentWebPort() 函数 5. CSS 清理 - web/src/assets/styles/views/setup-view.css: 移除未使用的 .setup-summary-grid 和 .setup-summary-item 样式
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
APP_NAME=X-Financial
|
|
APP_ENV=local
|
|
APP_DEBUG=true
|
|
API_V1_PREFIX=/api/v1
|
|
SETUP_COMPLETED=false
|
|
VITE_SETUP_COMPLETED=false
|
|
|
|
COMPANY_NAME=
|
|
COMPANY_CODE=
|
|
ADMIN_EMAIL=
|
|
VITE_COMPANY_NAME=
|
|
VITE_COMPANY_CODE=
|
|
VITE_ADMIN_EMAIL=
|
|
# Admin login credentials are stored separately under server/.secrets/
|
|
|
|
WEB_HOST=0.0.0.0
|
|
WEB_PORT=5173
|
|
VITE_WEB_HOST=0.0.0.0
|
|
VITE_WEB_PORT=5173
|
|
|
|
SERVER_HOST=127.0.0.1
|
|
SERVER_PORT=8000
|
|
VITE_SERVER_HOST=127.0.0.1
|
|
VITE_SERVER_PORT=8000
|
|
SERVER_STARTUP_TIMEOUT=300
|
|
SERVER_BLOCKING_STARTUP_TIMEOUT=12
|
|
VITE_API_BASE_URL=http://127.0.0.1:8000/api/v1
|
|
VITE_AUTH_IDLE_TIMEOUT_MINUTES=30
|
|
|
|
POSTGRES_HOST=127.0.0.1
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_DB=x_financial
|
|
POSTGRES_USER=postgres
|
|
POSTGRES_PASSWORD=postgres
|
|
VITE_POSTGRES_HOST=127.0.0.1
|
|
VITE_POSTGRES_PORT=5432
|
|
VITE_POSTGRES_DB=x_financial
|
|
VITE_POSTGRES_USER=postgres
|
|
|
|
DATABASE_URL=postgresql+psycopg://postgres:postgres@127.0.0.1:5432/x_financial
|
|
SQLALCHEMY_ECHO=false
|
|
|
|
REDIS_URL=
|
|
VITE_REDIS_URL=
|
|
|
|
CORS_ORIGINS='["http://127.0.0.1:5173","http://localhost:5173","http://0.0.0.0:5173"]'
|