From 6889a60004252805696214a83721d4533413567c Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Fri, 2 Jun 2023 20:11:02 -0700 Subject: [PATCH] Fix dependencies for turn-in --- .dockerignore | 2 +- Dockerfile | 6 ++++++ ghostforge/serve.py | 2 +- ghostforge/templates/dashboard.html | 6 +++--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index 2897fda..260abeb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,7 +8,7 @@ Dockerfile build/ **/__pycache__/ -**/*.md +*.md **/*.pyc **/*.pyo **/*.mo diff --git a/Dockerfile b/Dockerfile index 3e82182..9883869 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,15 @@ RUN mkdir -p "${ENV_GHOSTFORGE_DATA_DIR}" WORKDIR /ghostforge COPY . . +# Install cffi dependencies for pip install. +RUN apk add --update --no-cache --virtual ghostforge_build libffi-dev musl-dev gcc + # Install ghostforge from the work directory. RUN pip install . +# Remove cffi dependencies for space. +RUN apk del ghostforge_build + # Expose the web "serve" port specific in the environment variables. ARG GHOSTFORGE_INTERNAL_WEB_PORT ENV ENV_GHOSTFORGE_INTERNAL_WEB_PORT=${GHOSTFORGE_INTERNAL_WEB_PORT} diff --git a/ghostforge/serve.py b/ghostforge/serve.py index 8f71f19..57b767a 100644 --- a/ghostforge/serve.py +++ b/ghostforge/serve.py @@ -69,7 +69,7 @@ async def get_faker(): @gf.get("/", response_class=HTMLResponse) -async def home(request: Request, current_user=Depends(get_current_user())): +async def home(request: Request, current_user=Depends(get_current_user(optional=True))): if current_user: return RedirectResponse(url="/dashboard") return RedirectResponse(url="/login") diff --git a/ghostforge/templates/dashboard.html b/ghostforge/templates/dashboard.html index 1d83317..677b284 100644 --- a/ghostforge/templates/dashboard.html +++ b/ghostforge/templates/dashboard.html @@ -10,7 +10,7 @@
-
Comments
+
Dashboard
@@ -26,7 +26,7 @@
-
Comments
+
TBD
@@ -42,7 +42,7 @@
-
Comments
+
TBD