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:
co-authored by
Claude Opus 4.8
parent
2f95e6be96
commit
ab0cd4fe85
@@ -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() }
|
||||
|
||||
Reference in New Issue
Block a user