Skip to content

Commit

Permalink
prevent check if the static directory exists while add static middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
hv0905 committed May 6, 2024
1 parent 7873db0 commit 0479894
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

4 changes: 3 additions & 1 deletion app/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ async def lifespan(_: FastAPI):
app.include_router(admin_controller.admin_router, prefix="/admin")

if config.storage.method == "local":
app.mount("/static", StaticFiles(directory=pathlib.Path(config.storage.local.path)), name="static")
# Since we will check & create the static directory soon later when the StorageService initialized, we don't need to
# check it here.
app.mount("/static", StaticFiles(directory=pathlib.Path(config.storage.local.path), check_dir=False), name="static")


@app.get("/", description="Default portal. Test for server availability.")
Expand Down
13 changes: 0 additions & 13 deletions download-model.Dockerfile

This file was deleted.

0 comments on commit 0479894

Please sign in to comment.