mirror of
https://github.com/R0m1k3/Reviflow.git
synced 2026-10-11 17:26:20 +02:00
fix(backend): add debug logs and remove invalid main.py volume mount
This commit is contained in:
1 parent
5d153400c4
commit
0976a33bce
2 files changed
+15
-2
No files matched your search
+15
-1
@@ -19,7 +19,21 @@ async def log_requests(request: Request, call_next):
|
||||
|
||||
@app.on_event("startup")
|
||||
async def on_startup():
|
||||
await create_db_and_tables()
|
||||
print("DEBUG: Startup initiated")
|
||||
import os
|
||||
print(f"DEBUG: Current Working Directory: {os.getcwd()}")
|
||||
print(f"DEBUG: Directory Contents: {os.listdir('.')}")
|
||||
print(f"DEBUG: Environment DATABASE_URL: {os.getenv('DATABASE_URL')}")
|
||||
|
||||
try:
|
||||
print("DEBUG: Attempting to create DB and tables...")
|
||||
await create_db_and_tables()
|
||||
print("DEBUG: DB creation successful.")
|
||||
except Exception as e:
|
||||
print(f"CRITICAL ERROR: Failed to connect to DB or create tables. Error: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
# Debug: Check static files location
|
||||
static_path = os.path.join(os.path.dirname(__file__), "..", "static")
|
||||
print(f"Startup: Static dir check -> {os.path.abspath(static_path)} (Exists: {os.path.exists(static_path)})")
|
||||
|
||||
@@ -10,7 +10,6 @@ services:
|
||||
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
||||
volumes:
|
||||
- ./backend/app:/app/backend/app
|
||||
- ./backend/main.py:/app/backend/main.py
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in new issue
Block a user