ComfyWorkflows / ComfyUI-Launcher

Run any ComfyUI workflow w/ ZERO setup.
GNU Affero General Public License v3.0
541 stars 61 forks source link

Adding PROXY_MODE to support running the Launcher behind a proxy w/ only a single port exposed. #25

Closed thecooltechguy closed 6 months ago

thecooltechguy commented 6 months ago

This PR adds support for running the Launcher behind a proxy (e.g., NGINX), while only requiring exposing a single port, instead of requiring a different port to be exposed for each workflow project.

This adds the following new environment variables:

PROJECT_MIN_PORT: the minimum port number a workflow project can run on PROJECT_MAX_PORT: the maximum port number a workflow project can run on ALLOW_OVERRIDABLE_PORTS_PER_PROJECT: if false, the end user can't configure the port per workflow project. otherwise, the user can configure the port per workflow project. PROXY_MODE: if false (default), each workflow project runs & is exposed on its own different port. if true, only a single exposed port is necessary for the Launcher to run, and all projects will be accessible via this single port.