Support a remote ComfyUI via a .env config file

- run.sh / run.ps1: load an optional .env for host-specific env vars
- .env.example + docs: ComfyUI can run on another host (ROUTER_COMFYUI)
- .gitignore: .env

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Joseph Costa
2026-07-05 03:21:30 -05:00
co-authored by Claude Opus 4.8
parent 2f95e6be96
commit ab0cd4fe85
5 changed files with 31 additions and 0 deletions
+8
View File
@@ -3,6 +3,14 @@
$ErrorActionPreference = "Stop"
Set-Location $PSScriptRoot
# optional local config (host-specific env vars, kept out of git — see .env.example)
if (Test-Path ".env") {
Get-Content ".env" | Where-Object { $_ -match '^\s*[^#=]+=' } | ForEach-Object {
$k, $v = $_ -split '=', 2
[Environment]::SetEnvironmentVariable($k.Trim(), $v.Trim(), 'Process')
}
}
# load keys from files into env (kept out of git)
if (Test-Path ".apikey") { $env:ROUTER_API_KEY = (Get-Content ".apikey" -Raw).Trim() }
if (Test-Path ".uncensored_key") { $env:ROUTER_UNCENSORED_KEY = (Get-Content ".uncensored_key" -Raw).Trim() }