Skip to content

Commit 8b93cfb

Browse files
committed
fix(render): use absolute SQLite path (four-slash) in DATABASE_URL
Three-slash sqlite:///app/outputs/... is parsed by get_db_path() as a project-relative path (PROJECT_ROOT/app/outputs), which doesn't exist in the container -> 'unable to open database file' on startup. Four slashes makes it the absolute /app/outputs path the Dockerfile creates.
1 parent c0b7b77 commit 8b93cfb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

render.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ services:
2222
- key: PORT
2323
value: "8000"
2424
- key: DATABASE_URL
25-
value: sqlite:///app/outputs/climatevision.sqlite3
25+
# Four slashes = absolute path (/app/outputs/...). Three slashes would be
26+
# parsed as a project-relative path (PROJECT_ROOT/app/outputs) which does
27+
# not exist in the container and causes "unable to open database file".
28+
value: sqlite:////app/outputs/climatevision.sqlite3
2629
- key: CLIMATEVISION_ALLOW_DEV_KEY
2730
value: "0"
2831
- key: CLIMATEVISION_CORS_ORIGINS

0 commit comments

Comments
 (0)