diff --git a/backend/frontend/index.html b/backend/frontend/index.html
new file mode 100644
index 0000000..4dad473
--- /dev/null
+++ b/backend/frontend/index.html
@@ -0,0 +1,1666 @@
+
+
+
+
+
+ Wochenplaner Pro
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/main.py b/backend/main.py
index 82bf490..5b66b8b 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -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)
diff --git a/docker-compose.yml b/docker-compose.yml
index 1eab2b3..399f934 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,23 +1,15 @@
services:
- backend:
+ app:
build:
context: ./backend
dockerfile: Dockerfile.backend
- image: wochenplaner-backend:latest
restart: unless-stopped
environment:
- - PORT=8000
+ - PORT=80
- JWT_SECRET=${SERVICE_BASE64_64_JWT:-wochenplaner-jwt-secret}
volumes:
- wochenplaner_data:/app/data
- frontend:
- image: nginx:alpine
- restart: unless-stopped
- volumes:
- - ./frontend:/var/www/html:ro
- - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
-
volumes:
wochenplaner_data:
driver: local