From 73752f89c8a8cbdbce6577f41672d6ca52ba9eb7 Mon Sep 17 00:00:00 2001 From: Mathieu Dallaire Date: Mon, 4 Aug 2025 10:35:49 -0400 Subject: [PATCH 1/3] feat(docker): add support for HOST env --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 605c019..da90472 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ from __future__ import annotations import logging +import os import uvicorn from fastapi import FastAPI @@ -21,4 +22,5 @@ app.include_router(router=router) if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8191, log_level=LOG_LEVEL) # noqa: S104 + host = os.getenv("HOST", "0.0.0.0") + uvicorn.run(app, host="host", port=8191, log_level=LOG_LEVEL) # noqa: S104 From a3cd9815bd9741cc965b07ae5d0b5cdc39b5ea7b Mon Sep 17 00:00:00 2001 From: Mathieu Dallaire Date: Mon, 4 Aug 2025 10:56:01 -0400 Subject: [PATCH 2/3] fix env --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index da90472..fa924bd 100644 --- a/main.py +++ b/main.py @@ -23,4 +23,4 @@ app.include_router(router=router) if __name__ == "__main__": host = os.getenv("HOST", "0.0.0.0") - uvicorn.run(app, host="host", port=8191, log_level=LOG_LEVEL) # noqa: S104 + uvicorn.run(app, host=host, port=8191, log_level=LOG_LEVEL) # noqa: S104 From 117c9bdd9530b1117e8981d3a2935f844ba321d5 Mon Sep 17 00:00:00 2001 From: Mathieu Dallaire Date: Mon, 4 Aug 2025 11:27:27 -0400 Subject: [PATCH 3/3] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a56f09b..5b888d3 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ An alternative to [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) a | Environment Variable | Default | Description | | -------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `HOST` | `0.0.0.0` | Host address to bind the server to. Use `0.0.0.0` to bind to all IPv4 interfaces, `::` for all IPv6 interfaces, or `127.0.0.1`/`localhost` for local access only. | | `USE_HEADLESS` | `SeleniumBase default` | Use headless chromium. | | `PROXY` | None | Proxy to use in format: `protocol://username:password@host:port`. [SOCKS5 with authentication is not supported by Chrome](https://stackoverflow.com/questions/75602916/connection-to-private-proxy-socks5-with-chrome-webrequest-onauthrequired-and), see `compose.yaml` file for a workaround |