feat(rpa): 实现库存源路由与 RPA Driver 方案
- 添加库存源解析逻辑,根据发货通知目的地解析 RPA 源 - 实现 DSV 360 和 Crane FootPrint 的库存源配置 - 增加自动登录功能,优化浏览器操作 - 更新本地启动脚本,支持跳过 Worker 启动 - 添加后端测试,验证库存源解析与任务取消逻辑 - 编写文档,描述库存源路由与 RPA Driver 方案
This commit is contained in:
commit
1921959fc1
61 files changed
+2347
-473
No files matched your search
+63
-3
@@ -29,9 +29,69 @@ python scripts/rpa/freight_rpa_worker.py
|
||||
|
||||
## 生产 RPA
|
||||
|
||||
`FREIGHT_RPA_MOCK=false` 时 worker **不会**自动处理触发文件,需业务按 SOP 用 UiPath / Power Automate 等:
|
||||
`FREIGHT_RPA_MOCK=false` 时 worker 会尝试用 Playwright 打开货代网站并下载库存 Excel。首次使用需要在 RPA 终端安装浏览器驱动:
|
||||
|
||||
1. 监听 `FREIGHT_RPA_INVENTORY_TRIGGER_DIR` 新 JSON → 登录货代 UI 导出库存 → 保存到 `FREIGHT_INVENTORY_DROP_DIR` → POST `inventory-ready`。
|
||||
2. 监听 `FREIGHT_RPA_UPLOAD_TRIGGER_DIR` → 读取 `file_path` 在货代 UI 上传 → POST `upload-complete`。
|
||||
```powershell
|
||||
pip install playwright
|
||||
python -m playwright install chromium
|
||||
```
|
||||
|
||||
可以使用两种登录方式:
|
||||
|
||||
1. 自动登录:RPA worker 从本机环境变量读取账号密码,打开库存源 URL 后如检测到登录页则自动填写。
|
||||
2. 登录态复用:使用非 headless 模式先手工登录一次,登录态会保存在 `FREIGHT_RPA_BROWSER_PROFILE_DIR`。
|
||||
|
||||
账号密码不要写入 trigger JSON,也不要提交到代码仓库。建议配置为 Windows 用户级环境变量或企业凭据管理器注入的进程环境变量。
|
||||
|
||||
```powershell
|
||||
$env:FREIGHT_RPA_MOCK = "false"
|
||||
$env:FREIGHT_RPA_HEADLESS = "false"
|
||||
$env:FREIGHT_RPA_BROWSER_PROFILE_DIR = "backend/data/freight_rpa/browser_profile"
|
||||
|
||||
$env:FREIGHT_RPA_DSV_USERNAME = "<DSV账号>"
|
||||
$env:FREIGHT_RPA_DSV_PASSWORD = "<DSV密码>"
|
||||
$env:FREIGHT_RPA_CRANE_USERNAME = "<Crane账号>"
|
||||
$env:FREIGHT_RPA_CRANE_PASSWORD = "<Crane密码>"
|
||||
|
||||
python scripts/rpa/freight_rpa_worker.py
|
||||
```
|
||||
|
||||
如果登录框默认识别不稳定,可覆盖登录 selector:
|
||||
|
||||
| 环境变量 | 用途 |
|
||||
|---------|------|
|
||||
| `FREIGHT_RPA_DSV_USERNAME_SELECTOR` | DSV 用户名输入框 |
|
||||
| `FREIGHT_RPA_DSV_PASSWORD_SELECTOR` | DSV 密码输入框 |
|
||||
| `FREIGHT_RPA_DSV_LOGIN_BUTTON_SELECTOR` | DSV 登录按钮 |
|
||||
| `FREIGHT_RPA_CRANE_USERNAME_SELECTOR` | Crane 用户名输入框 |
|
||||
| `FREIGHT_RPA_CRANE_PASSWORD_SELECTOR` | Crane 密码输入框 |
|
||||
| `FREIGHT_RPA_CRANE_LOGIN_BUTTON_SELECTOR` | Crane 登录按钮 |
|
||||
|
||||
若页面出现 MFA、验证码或 SSO 二次确认,worker 会失败并回调错误,需要人工处理后重试。
|
||||
|
||||
库存 trigger 需要包含 `rpa_inventory_source`,worker 会按 `source_type` 分发:
|
||||
|
||||
| source_type | Driver |
|
||||
|-------------|--------|
|
||||
| `dsv360` | 打开 DSV 360,进入 Reports / Program / Inventory 报表并下载 |
|
||||
| `crane_footprint` | 打开 Crane FootPrint On Hand Details Query,选择 Owner/Project/Warehouse 后下载 |
|
||||
|
||||
页面控件如果默认可见文本无法稳定点击,可通过环境变量覆盖 selector:
|
||||
|
||||
| 环境变量 | 用途 |
|
||||
|---------|------|
|
||||
| `FREIGHT_RPA_DSV_REPORTS_SELECTOR` | DSV Reports 菜单 |
|
||||
| `FREIGHT_RPA_DSV_PROGRAM_SELECTOR` | DSV Program 项 |
|
||||
| `FREIGHT_RPA_DSV_REPORT_GROUP_SELECTOR` | DSV Inventory 分组 |
|
||||
| `FREIGHT_RPA_DSV_REPORT_NAME_SELECTOR` | DSV On Hand Inventory by Location |
|
||||
| `FREIGHT_RPA_DSV_OWNER_SELECTOR` | DSV Owner 输入框 |
|
||||
| `FREIGHT_RPA_DSV_EXPORT_SELECTOR` | DSV 导出按钮 |
|
||||
| `FREIGHT_RPA_CRANE_OWNER_SELECTOR` | Crane Owner 下拉/输入 |
|
||||
| `FREIGHT_RPA_CRANE_PROJECT_SELECTOR` | Crane Project 下拉/输入 |
|
||||
| `FREIGHT_RPA_CRANE_WAREHOUSE_SELECTOR` | Crane Warehouse 下拉/输入 |
|
||||
| `FREIGHT_RPA_CRANE_RUN_SELECTOR` | Crane Run Report 按钮 |
|
||||
| `FREIGHT_RPA_CRANE_EXPORT_SELECTOR` | Crane 下载按钮 |
|
||||
|
||||
发货 Excel 上传仍保留原 PoC 行为:`FREIGHT_RPA_MOCK=false` 时不会自动上传,需后续实现上传 Driver 或接入 UiPath / Power Automate。
|
||||
|
||||
回调 Header:`X-Shipping-Tool-Key: <SHIPPING_NOTICE_TOOL_API_KEY>`。
|
||||
@@ -18,6 +18,10 @@ Optional:
|
||||
FREIGHT_RPA_MOCK=true
|
||||
FREIGHT_RPA_POLL_SECONDS=3
|
||||
FREIGHT_RPA_SAMPLE_INVENTORY=path/to/sample.xlsx
|
||||
FREIGHT_RPA_BROWSER_PROFILE_DIR=data/freight_rpa/browser_profile
|
||||
FREIGHT_RPA_HEADLESS=false
|
||||
FREIGHT_RPA_DSV_USERNAME / FREIGHT_RPA_DSV_PASSWORD
|
||||
FREIGHT_RPA_CRANE_USERNAME / FREIGHT_RPA_CRANE_PASSWORD
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -30,6 +34,7 @@ import urllib.error
|
||||
import urllib.request
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
try:
|
||||
from openpyxl import Workbook
|
||||
@@ -105,6 +110,279 @@ def _write_sample_inventory(drop_dir: Path, task_no: str) -> Path:
|
||||
return dest
|
||||
|
||||
|
||||
def _download_name(task_no: str, source_code: str, suffix: str = ".xlsx") -> str:
|
||||
safe_source = "".join(ch for ch in source_code if ch.isalnum() or ch in {"-", "_"}) or "UNKNOWN"
|
||||
stamp = datetime.utcnow().strftime("%Y%m%d%H%M%S")
|
||||
return f"inventory_{task_no}_{safe_source}_{stamp}{suffix}"
|
||||
|
||||
|
||||
def _require_playwright():
|
||||
try:
|
||||
from playwright.sync_api import TimeoutError as PlaywrightTimeoutError
|
||||
from playwright.sync_api import sync_playwright
|
||||
except ImportError as exc:
|
||||
raise RuntimeError(
|
||||
"Playwright is required for real RPA. Install it on the RPA terminal with: "
|
||||
"pip install playwright && python -m playwright install chromium"
|
||||
) from exc
|
||||
return sync_playwright, PlaywrightTimeoutError
|
||||
|
||||
|
||||
def _browser_timeout_ms() -> int:
|
||||
return max(5_000, int(_env("FREIGHT_RPA_BROWSER_TIMEOUT_MS", "60000") or "60000"))
|
||||
|
||||
|
||||
def _click_text(page: Any, text: str, *, exact: bool = True) -> None:
|
||||
page.get_by_text(text, exact=exact).click(timeout=_browser_timeout_ms())
|
||||
|
||||
|
||||
def _click_selector_or_text(page: Any, selector_env: str, fallback_text: str | None = None) -> None:
|
||||
selector = _env(selector_env)
|
||||
if selector:
|
||||
page.locator(selector).first.click(timeout=_browser_timeout_ms())
|
||||
return
|
||||
if fallback_text:
|
||||
_click_text(page, fallback_text, exact=True)
|
||||
return
|
||||
raise RuntimeError(f"Missing selector env: {selector_env}")
|
||||
|
||||
|
||||
def _fill_selector_or_label(page: Any, selector_env: str, label: str, value: str | None) -> None:
|
||||
text = str(value or "").strip()
|
||||
if not text:
|
||||
return
|
||||
selector = _env(selector_env)
|
||||
if selector:
|
||||
page.locator(selector).first.fill(text, timeout=_browser_timeout_ms())
|
||||
return
|
||||
page.get_by_label(label).fill(text, timeout=_browser_timeout_ms())
|
||||
|
||||
|
||||
def _select_or_fill(page: Any, selector_env: str, label: str, value: str | None) -> None:
|
||||
text = str(value or "").strip()
|
||||
if not text:
|
||||
return
|
||||
selector = _env(selector_env)
|
||||
locator = page.locator(selector).first if selector else page.get_by_label(label)
|
||||
try:
|
||||
locator.select_option(label=text, timeout=_browser_timeout_ms())
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
locator.select_option(value=text, timeout=_browser_timeout_ms())
|
||||
return
|
||||
except Exception:
|
||||
pass
|
||||
locator.fill(text, timeout=_browser_timeout_ms())
|
||||
|
||||
|
||||
def _visible_locator(page: Any, selector: str | None):
|
||||
if not selector:
|
||||
return None
|
||||
locator = page.locator(selector).first
|
||||
try:
|
||||
return locator if locator.is_visible(timeout=2_000) else None
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
def _fill_login_field(page: Any, selector_env: str, value_env: str, fallback_selectors: tuple[str, ...]) -> bool:
|
||||
value = _env(value_env)
|
||||
if not value:
|
||||
return False
|
||||
selectors = tuple(item for item in (_env(selector_env), *fallback_selectors) if item)
|
||||
for selector in selectors:
|
||||
locator = _visible_locator(page, selector)
|
||||
if locator is None:
|
||||
continue
|
||||
locator.fill(value, timeout=_browser_timeout_ms())
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _click_login_submit(page: Any, selector_env: str, fallback_texts: tuple[str, ...]) -> bool:
|
||||
selector = _env(selector_env)
|
||||
locator = _visible_locator(page, selector)
|
||||
if locator is not None:
|
||||
locator.click(timeout=_browser_timeout_ms())
|
||||
return True
|
||||
for text in fallback_texts:
|
||||
try:
|
||||
page.get_by_role("button", name=text).click(timeout=3_000)
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
page.get_by_text(text, exact=True).click(timeout=3_000)
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
def _maybe_auto_login(page: Any, prefix: str) -> None:
|
||||
"""
|
||||
如页面出现登录框,则用 RPA 机器环境变量自动登录;未出现登录框则复用现有浏览器登录态。
|
||||
"""
|
||||
username_env = f"FREIGHT_RPA_{prefix}_USERNAME"
|
||||
password_env = f"FREIGHT_RPA_{prefix}_PASSWORD"
|
||||
if not _env(username_env) or not _env(password_env):
|
||||
return
|
||||
|
||||
user_filled = _fill_login_field(
|
||||
page,
|
||||
f"FREIGHT_RPA_{prefix}_USERNAME_SELECTOR",
|
||||
username_env,
|
||||
(
|
||||
'input[name="username"]',
|
||||
'input[name="userName"]',
|
||||
'input[name="email"]',
|
||||
'input[type="email"]',
|
||||
'input[type="text"]',
|
||||
),
|
||||
)
|
||||
password_filled = _fill_login_field(
|
||||
page,
|
||||
f"FREIGHT_RPA_{prefix}_PASSWORD_SELECTOR",
|
||||
password_env,
|
||||
('input[name="password"]', 'input[type="password"]'),
|
||||
)
|
||||
if not user_filled and not password_filled:
|
||||
return
|
||||
if user_filled != password_filled:
|
||||
raise RuntimeError(f"{prefix} login form partially detected; please configure login selectors")
|
||||
|
||||
if not _click_login_submit(
|
||||
page,
|
||||
f"FREIGHT_RPA_{prefix}_LOGIN_BUTTON_SELECTOR",
|
||||
("Sign in", "Login", "Log in", "登录"),
|
||||
):
|
||||
raise RuntimeError(f"{prefix} login fields detected but submit button was not found")
|
||||
|
||||
page.wait_for_load_state("domcontentloaded", timeout=_browser_timeout_ms())
|
||||
if page.locator('input[type="password"]').first.is_visible(timeout=3_000):
|
||||
raise RuntimeError(f"{prefix} login did not complete; MFA/SSO/manual verification may be required")
|
||||
|
||||
|
||||
def _save_download(download: Any, drop_dir: Path, task_no: str, source_code: str) -> Path:
|
||||
suggested = str(download.suggested_filename or "")
|
||||
suffix = Path(suggested).suffix or ".xlsx"
|
||||
dest = drop_dir / _download_name(task_no, source_code, suffix=suffix)
|
||||
download.save_as(str(dest))
|
||||
return dest
|
||||
|
||||
|
||||
def _open_browser(download_dir: Path):
|
||||
sync_playwright, _timeout = _require_playwright()
|
||||
playwright = sync_playwright().start()
|
||||
profile = _env("FREIGHT_RPA_BROWSER_PROFILE_DIR")
|
||||
if not profile:
|
||||
profile = str(Path(__file__).resolve().parents[2] / "backend" / "data" / "freight_rpa" / "browser_profile")
|
||||
profile_dir = Path(profile)
|
||||
profile_dir.mkdir(parents=True, exist_ok=True)
|
||||
headless = _env("FREIGHT_RPA_HEADLESS", "false").lower() == "true"
|
||||
context = playwright.chromium.launch_persistent_context(
|
||||
str(profile_dir),
|
||||
headless=headless,
|
||||
accept_downloads=True,
|
||||
downloads_path=str(download_dir),
|
||||
)
|
||||
page = context.pages[0] if context.pages else context.new_page()
|
||||
page.set_default_timeout(_browser_timeout_ms())
|
||||
return playwright, context, page
|
||||
|
||||
|
||||
def _download_dsv360_inventory(page: Any, trigger: dict[str, Any], source: dict[str, Any]) -> Any:
|
||||
query = source.get("query") if isinstance(source.get("query"), dict) else {}
|
||||
entry_url = str(source.get("entry_url") or "").strip()
|
||||
if not entry_url:
|
||||
raise RuntimeError("DSV360 inventory source missing entry_url")
|
||||
|
||||
page.goto(entry_url, wait_until="domcontentloaded", timeout=_browser_timeout_ms())
|
||||
_maybe_auto_login(page, "DSV")
|
||||
_click_selector_or_text(page, "FREIGHT_RPA_DSV_REPORTS_SELECTOR", "Reports")
|
||||
_click_selector_or_text(
|
||||
page,
|
||||
"FREIGHT_RPA_DSV_PROGRAM_SELECTOR",
|
||||
str(query.get("program_label") or ""),
|
||||
)
|
||||
_click_selector_or_text(
|
||||
page,
|
||||
"FREIGHT_RPA_DSV_REPORT_GROUP_SELECTOR",
|
||||
str(query.get("report_group") or "Inventory"),
|
||||
)
|
||||
_click_selector_or_text(
|
||||
page,
|
||||
"FREIGHT_RPA_DSV_REPORT_NAME_SELECTOR",
|
||||
str(query.get("report_name") or "On Hand Inventory by Location"),
|
||||
)
|
||||
_fill_selector_or_label(page, "FREIGHT_RPA_DSV_OWNER_SELECTOR", "Owner", query.get("owner_code"))
|
||||
_fill_selector_or_label(page, "FREIGHT_RPA_DSV_PUTAWAY_ZONE_SELECTOR", "PutawayZone", query.get("putaway_zone"))
|
||||
|
||||
export_selector = _env("FREIGHT_RPA_DSV_EXPORT_SELECTOR")
|
||||
export_text = _env("FREIGHT_RPA_DSV_EXPORT_TEXT", "file_download")
|
||||
with page.expect_download(timeout=_browser_timeout_ms()) as download_info:
|
||||
if export_selector:
|
||||
page.locator(export_selector).first.click(timeout=_browser_timeout_ms())
|
||||
else:
|
||||
try:
|
||||
_click_text(page, export_text, exact=True)
|
||||
except Exception:
|
||||
_click_text(page, "Download", exact=True)
|
||||
return download_info.value
|
||||
|
||||
|
||||
def _download_crane_inventory(page: Any, trigger: dict[str, Any], source: dict[str, Any]) -> Any:
|
||||
query = source.get("query") if isinstance(source.get("query"), dict) else {}
|
||||
entry_url = str(source.get("entry_url") or "").strip()
|
||||
if not entry_url:
|
||||
raise RuntimeError("Crane inventory source missing entry_url")
|
||||
|
||||
page.goto(entry_url, wait_until="domcontentloaded", timeout=_browser_timeout_ms())
|
||||
_maybe_auto_login(page, "CRANE")
|
||||
_select_or_fill(page, "FREIGHT_RPA_CRANE_OWNER_SELECTOR", "Select Owner...", query.get("owner_code"))
|
||||
_select_or_fill(page, "FREIGHT_RPA_CRANE_PROJECT_SELECTOR", "Select Project...", query.get("project_code"))
|
||||
_select_or_fill(page, "FREIGHT_RPA_CRANE_WAREHOUSE_SELECTOR", "Choose Warehouse ..", query.get("warehouse_code"))
|
||||
_click_selector_or_text(page, "FREIGHT_RPA_CRANE_RUN_SELECTOR", "Run Report")
|
||||
|
||||
export_selector = _env("FREIGHT_RPA_CRANE_EXPORT_SELECTOR")
|
||||
export_text = _env("FREIGHT_RPA_CRANE_EXPORT_TEXT", "file_download")
|
||||
with page.expect_download(timeout=_browser_timeout_ms()) as download_info:
|
||||
if export_selector:
|
||||
page.locator(export_selector).first.click(timeout=_browser_timeout_ms())
|
||||
else:
|
||||
_click_text(page, export_text, exact=True)
|
||||
return download_info.value
|
||||
|
||||
|
||||
def _download_inventory_with_browser(trigger: dict[str, Any], drop_dir: Path) -> Path:
|
||||
task_no = str(trigger.get("task_no") or "").strip()
|
||||
source = trigger.get("rpa_inventory_source")
|
||||
if not isinstance(source, dict):
|
||||
raise RuntimeError("inventory trigger missing rpa_inventory_source")
|
||||
source_type = str(source.get("source_type") or "").strip()
|
||||
source_code = str(source.get("source_code") or "").strip() or source_type or "UNKNOWN"
|
||||
if not source_type:
|
||||
raise RuntimeError("inventory source missing source_type")
|
||||
|
||||
playwright = context = None
|
||||
try:
|
||||
playwright, context, page = _open_browser(drop_dir)
|
||||
if source_type == "dsv360":
|
||||
download = _download_dsv360_inventory(page, trigger, source)
|
||||
elif source_type == "crane_footprint":
|
||||
download = _download_crane_inventory(page, trigger, source)
|
||||
else:
|
||||
raise RuntimeError(f"unsupported inventory source_type: {source_type}")
|
||||
return _save_download(download, drop_dir, task_no, source_code)
|
||||
finally:
|
||||
if context is not None:
|
||||
context.close()
|
||||
if playwright is not None:
|
||||
playwright.stop()
|
||||
|
||||
|
||||
def _handle_inventory_trigger(trigger_path: Path, drop_dir: Path, processed_dir: Path) -> None:
|
||||
body = json.loads(trigger_path.read_text(encoding="utf-8"))
|
||||
task_no = str(body.get("task_no") or "").strip()
|
||||
@@ -114,21 +392,19 @@ def _handle_inventory_trigger(trigger_path: Path, drop_dir: Path, processed_dir:
|
||||
return
|
||||
|
||||
mock = _env("FREIGHT_RPA_MOCK", "true").lower() == "true"
|
||||
if not mock:
|
||||
print(f"[inventory] real RPA not implemented; trigger kept: {trigger_path.name}")
|
||||
return
|
||||
|
||||
try:
|
||||
out_file = _write_sample_inventory(drop_dir, task_no)
|
||||
out_file = _write_sample_inventory(drop_dir, task_no) if mock else _download_inventory_with_browser(body, drop_dir)
|
||||
_post_callback("/api/shipping-notice/rpa/inventory-ready", {
|
||||
"task_no": task_no,
|
||||
"success": True,
|
||||
"file_path": str(out_file),
|
||||
"source_code": ((body.get("rpa_inventory_source") or {}).get("source_code") if isinstance(body.get("rpa_inventory_source"), dict) else None),
|
||||
})
|
||||
processed_dir.mkdir(parents=True, exist_ok=True)
|
||||
done = processed_dir / trigger_path.name
|
||||
trigger_path.replace(done)
|
||||
print(f"[inventory] mock export done for {task_no} -> {out_file.name}")
|
||||
mode = "mock" if mock else "browser"
|
||||
print(f"[inventory] {mode} export done for {task_no} -> {out_file.name}")
|
||||
except Exception as exc:
|
||||
_post_callback("/api/shipping-notice/rpa/inventory-ready", {
|
||||
"task_no": task_no,
|
||||
|
||||
+28
-2
@@ -2,7 +2,8 @@ param(
|
||||
[ValidateSet("sqlite", "postgres")]
|
||||
[string]$DbMode = "sqlite",
|
||||
[string]$DatabaseUrl = "",
|
||||
[switch]$SkipInstall
|
||||
[switch]$SkipInstall,
|
||||
[switch]$SkipWorker
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -132,6 +133,23 @@ function Start-BackendWindow {
|
||||
Start-Process powershell -ArgumentList @("-NoExit", "-ExecutionPolicy", "Bypass", "-Command", $cmd) | Out-Null
|
||||
}
|
||||
|
||||
function Start-KbWorkerWindow {
|
||||
param(
|
||||
[string]$BackendPath,
|
||||
[string]$Mode,
|
||||
[string]$DbUrl
|
||||
)
|
||||
|
||||
$dbExport = ""
|
||||
if ($Mode -eq "postgres" -and -not [string]::IsNullOrWhiteSpace($DbUrl)) {
|
||||
$escaped = $DbUrl.Replace("'", "''")
|
||||
$dbExport = "`$env:DATABASE_URL='$escaped'; "
|
||||
}
|
||||
|
||||
$cmd = "$dbExport Set-Location '$BackendPath'; .\venv\Scripts\python.exe .\worker_kb.py"
|
||||
Start-Process powershell -ArgumentList @("-NoExit", "-ExecutionPolicy", "Bypass", "-Command", $cmd) | Out-Null
|
||||
}
|
||||
|
||||
function Start-FrontendWindow {
|
||||
param([string]$FrontendPath)
|
||||
$cmd = "Set-Location '$FrontendPath'; npm run dev"
|
||||
@@ -155,9 +173,17 @@ Ensure-Backend -BackendPath $backendDir -PyCmd $pythonCmd -Mode $DbMode -DbUrl $
|
||||
Ensure-Frontend -FrontendPath $frontendDir -DoInstall $doInstall
|
||||
|
||||
Start-BackendWindow -BackendPath $backendDir -Mode $DbMode -DbUrl $DatabaseUrl
|
||||
if (-not $SkipWorker.IsPresent) {
|
||||
Start-KbWorkerWindow -BackendPath $backendDir -Mode $DbMode -DbUrl $DatabaseUrl
|
||||
}
|
||||
Start-FrontendWindow -FrontendPath $frontendDir
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Started in two new PowerShell windows." -ForegroundColor Green
|
||||
if ($SkipWorker.IsPresent) {
|
||||
Write-Host "Started in two new PowerShell windows." -ForegroundColor Green
|
||||
}
|
||||
else {
|
||||
Write-Host "Started in three new PowerShell windows." -ForegroundColor Green
|
||||
}
|
||||
Write-Host "Frontend URL: http://127.0.0.1:8881" -ForegroundColor Green
|
||||
Write-Host "Default local admin (sqlite/init scripts): admin / Hxit@54321" -ForegroundColor Green
|
||||
Reference in new issue
Block a user