Add host configuration for backend server and update documentation
- Introduced a new `host` option in `flake.nix` to specify the server's bind address, defaulting to `0.0.0.0`. - Updated `run.sh` to use the `HOST` environment variable for server binding. - Modified `config.py` to read the `HOST` from environment variables, defaulting to `0.0.0.0`. - Enhanced `README.md` with instructions for setting up the `HOST` variable and clarified access details for development and production modes. - Adjusted `vite.config.ts` to allow frontend access from other computers by default.
This commit is contained in:
@@ -9,7 +9,7 @@ class Settings(BaseSettings):
|
||||
|
||||
# Server
|
||||
port: int = int(os.getenv("PORT", "8080"))
|
||||
host: str = "127.0.0.1"
|
||||
host: str = os.getenv("HOST", "0.0.0.0") # Default to all interfaces
|
||||
|
||||
# Database
|
||||
postgres_socket_path: str = os.getenv("POSTGRES_SOCKET_PATH", "/run/postgresql")
|
||||
|
||||
Reference in New Issue
Block a user