modified dependencies

This commit is contained in:
TylerCG 2025-04-22 22:07:37 -04:00
parent 9b2151f7a9
commit 2adca0d132
5 changed files with 8 additions and 7 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
app/__pycache__

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
app/__pycache__

View File

@ -13,10 +13,10 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY /app ./app
COPY /app .
# Expose port
EXPOSE 8000
# Run the app with Uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]

Binary file not shown.

View File

@ -4,13 +4,12 @@ from fastapi.templating import Jinja2Templates
from fastapi.staticfiles import StaticFiles
from fastapi.concurrency import run_in_threadpool
from pathlib import Path
import app.download as download
import json
import json, download
app = FastAPI()
app.mount("/static", StaticFiles(directory="/app/app/static"), name="static")
templates = Jinja2Templates(directory="/app/app/templates")
# app.mount("/static", StaticFiles(directory="/app/app/static"), name="static")
templates = Jinja2Templates(directory="templates")
# api
@ -24,7 +23,7 @@ async def dropoutUpdate():
@app.get("/dropoutSeries", response_class=JSONResponse)
async def dropoutSeries():
file_path = Path("/data/dropout.json")
file_path = Path("data/dropout.json")
if file_path.exists():
with file_path.open("r", encoding="utf-8") as f:
data = json.load(f)