Using SQLite for production?
Reading the docs it's said a couple of times that "To run Wasp app in production, you will need to switch from SQLite to PostgreSQL."
Why is that? Is there something with how Wasp works that prevents the use of a SQLite database in production?
4 Replies
Well SQLite is actually just a single file and is not designed for performance and scale like PostgreSQL.
While it's great to have a quick start in your local environment, we require from everyone to switch to Postgres before deploying to production, as a best practice measure.
The experience of using one vs. another in Wasp is pretty much the same, so there is no benefit to staying with sqlite rather than the initial quick start 🙂
I recently read that the folks behind Epic Stack are going with SQLite for their stack.
https://github.com/epicweb-dev/epic-stack/blob/main/docs/decisions/003-sqlite.md
https://github.com/epicweb-dev/epic-stack/tree/main
That’s where my curiosity of SQLite use for production comes from. 🙂
GitHub
epic-stack/docs/decisions/003-sqlite.md at main · epicweb-dev/epic-...
This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea. - epicweb-dev/epic-stack
GitHub
GitHub - epicweb-dev/epic-stack: This is a Full Stack app starter w...
This is a Full Stack app starter with the foundational things setup and configured for you to hit the ground running on your next EPIC idea. - GitHub - epicweb-dev/epic-stack: This is a Full Stack ...
I understand your reasoning though. And I saw that jobs require Postgres due to pgboss
That is an intersting decision by Epic Stack, but as they say themselves in their docs, there is a lot of things that you can't do with SQLite: plugins, enums, scaling, connecting from outside, replicas (ok, with some toold those are doable). I guess they are going with it for simplicity, but I don't think that fits with us -> our policy is to give you production-grade solutions that we will make simpler for you, not go with simpler solutions that will bite you later.
Btw Prisma also won't let you deploy SQLite db to production, so we are really just inheriting that restriction from them.