Merge pull request #221 from mdallaire/main

feat(docker): add support for HOST env
This commit is contained in:
ThePhaseless
2025-08-06 23:16:26 +02:00
committed by GitHub
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -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 |
+3 -1
View File
@@ -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