Fix: remove image:, single container with StaticFiles
This commit is contained in:
+10
-1
@@ -22,6 +22,15 @@ app.add_middleware(
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
# --- Static Files (Frontend) ---
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
import os
|
||||
|
||||
FRONTEND_DIR = os.path.join(os.path.dirname(__file__), "frontend")
|
||||
if os.path.isdir(FRONTEND_DIR):
|
||||
app.mount("/", StaticFiles(directory=FRONTEND_DIR, html=True), name="frontend")
|
||||
|
||||
# --- Security ---
|
||||
SECRET_KEY = os.environ.get("JWT_SECRET", "wochenplaner-jwt-secret-2024")
|
||||
ALGORITHM = "HS256"
|
||||
@@ -337,5 +346,5 @@ def health():
|
||||
# === STARTUP ===
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
port = int(os.environ.get("PORT", 8000))
|
||||
port = int(os.environ.get("PORT", 80))
|
||||
uvicorn.run(app, host="0.0.0.0", port=port)
|
||||
|
||||
Reference in New Issue
Block a user