Docker build fails: category page metadata reads the database while prerendering #134
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MassiveDynamic/kataba#134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Docker build of v1.2.0 fails in
npm run build: prerendering/c/[...slug]throws "error parsing connection string", because there is no DATABASE_URL in the build.generateMetadatainsrc/app/c/[...slug]/page.tsx(added in #104) startsloadFullCategoryTree()in parallel withawait params, so it hits the database before anything makes the route dynamic. A local build doesn't notice, since a database is reachable there.Fix: await
paramsfirst, then load the tree, assrc/app/[slug]/page.tsxdoes.Fixed in #135 and brought to master with #136; the v1.2.0 tag and release now point to the fixed master (
c4328f6), and the Docker image is built from it.