Commit Graph

2 Commits

Author SHA1 Message Date
Hariom Balhara 9394c09247
Remove cache-db from without database build (#9220) 2023-05-31 09:55:57 +01:00
Rob Jackson 7a9a2fc76f
feat: Make database optional when building (#8561)
* Make database optional when building

Solves #3026 and #6780

We have a few app-store related pages that require a database connection at build time.

This change adds try-catch blocks in getStaticPaths or getStaticProps for those pages, and when no database is available we either:

- getStaticPaths: Respond with no paths, but fall back to rendering the pages on-demand
- getStaticProps: Respond with no data, but enable revalidation until a future request does respond with data

This makes Cal.com more compatible with typical Docker-based workflows, that do not expect external services to be available at build time. This includes Docker-based hosting providers, such as Cloudron (#3026).

* Change apps/categories/index to be server-rendered

* Update yarn.lock

* Update yarn.lock

* Update [category].tsx

---------

Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2023-05-31 03:04:06 +00:00