remove configure outside for docker

This commit is contained in:
Xi Yan 2024-09-26 23:11:15 -07:00
parent 0ad0a15810
commit 3b807912d2
4 changed files with 12 additions and 129 deletions

View file

@ -410,8 +410,9 @@ async def resolve_impls_with_routing(run_config: StackRunConfig) -> Dict[Api, An
return impls, specs
def main(yaml_config: str, port: int = 5000, disable_ipv6: bool = False):
with open(yaml_config, "r") as fp:
def main(default_yaml: str, port: int = 5000, disable_ipv6: bool = False, config: Optional[str] = None):
config_file = config or default_yaml
with open(config_file, "r") as fp:
config = StackRunConfig(**yaml.safe_load(fp))
app = FastAPI()