-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
57 lines (47 loc) · 1.65 KB
/
Copy pathstart.bat
File metadata and controls
57 lines (47 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
setlocal
rem ===== Runtime =====
if not defined PYTHON_BIN set "PYTHON_BIN=python"
rem ===== Server =====
set "HOST=0.0.0.0"
set "PORT=3100"
rem ===== Provider defaults =====
rem Provider URL/Key are managed in the admin panel, not in this script.
set "OPENAI_IMAGE_MODEL=gpt-image-2"
rem ===== Task behavior =====
rem 0 means no hard timeout. Frontend can still cancel running tasks.
set "GPT_IMAGE_REQUEST_TIMEOUT_SECONDS=0"
set "GPT_IMAGE_MAX_CONCURRENT_TASKS=0"
set "GPT_IMAGE_DATA_DIR=backend\data"
set "GPT_IMAGE_WORKFLOWS_DIR=backend\data\workflows"
rem ===== Server workers =====
rem Number of uvicorn worker processes. Values above 1 use fork and only work
rem reliably on Linux/macOS. Keep at 1 on Windows (default).
set "UVICORN_WORKERS=1"
set "LOG_DIR=log"
set "LOG_LEVEL=INFO"
rem ===== Auth =====
rem Auth is always enabled. Admin username is fixed: admin.
set "GPT_IMAGE_AUTH_TOKEN_TTL_SECONDS=604800"
set "GPT_IMAGE_AUTH_STATE_PATH=backend\data\auth.json"
"%PYTHON_BIN%" --version >nul 2>&1
if errorlevel 1 (
echo Python is not available: %PYTHON_BIN%
exit /b 1
)
if not exist "dist\index.html" (
echo Frontend build not found. Run build.bat first.
exit /b 1
)
echo Starting Intertwine-Ai-Image-Enhanced / 绘图增强版
echo Host: %HOST%
echo Port: %PORT%
echo Model: %OPENAI_IMAGE_MODEL%
echo Workflows dir: %GPT_IMAGE_WORKFLOWS_DIR%
echo Auth state: %GPT_IMAGE_AUTH_STATE_PATH%
echo Auth secret: backend\data\auth_secret.txt
echo Log dir: %LOG_DIR%
echo Provider credentials: managed in admin panel
echo Initial admin password: backend\data\admin_bootstrap_password.txt if auth.json does not exist
"%PYTHON_BIN%" -m backend.app.main
rem pause