W
Wasp7mo ago
James

Why does OpenSaaS require spinning up a db instance via Docker?

And the other app templates don't.
3 Replies
MEE6
MEE67mo ago
Wohooo @James, you just became a Waspeteer level 1!
kapa.ai
kapa.ai7mo ago
Hi @James. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The OpenSaaS template in Wasp requires spinning up a PostgreSQL database instance via Docker because it uses certain features that require PostgreSQL. For example, it uses Jobs, which expect a PostgreSQL database. This is why the wasp start db command is used to start a PostgreSQL database in a Docker container when setting up OpenSaaS. On the other hand, some other templates, like the Todo App template, use SQLite, which is a simpler database that doesn't require Docker. These differences are not explicitly mentioned in the template descriptions, but they are inherent to the features and complexity of the templates. It's also worth noting that while Docker is used in the default setup instructions for simplicity, you can provide your own PostgreSQL database connection URL and connect to it directly if you prefer not to use Docker. This is mentioned in the Wasp documentation, but not directly in the OpenSaaS setup instructions to keep them simple. Sources: - Discord support thread: Tried to run open-saas on my Mac Mini M1, here are my thoughts: > Answers Part 2 (https://discord.com/channels/686873244791210014/1216028386829537362) - Github Issue (open): Improve starter templates that are offered on wasp new in Wasp CLI > Comments Part 2 (https://github.com/wasp-lang/wasp/issues/1622) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @James, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
martinsos
martinsos7mo ago
You need docker to do wasp start db , which will run the database for you in development, if your app is using Postgre as a database. You don't have to use wasp start db though, you can set up your own database and connect to it. wasp start db is here just for convenience, so you don't have to set up the dev database on your own if you don't want to. As for why other app tempaltes don't need it: because they are simpler than opensaas so they can get by with SQLite database. But really, you will want to switch to Postgre DB sooner or later -> some advanced Wasp features require it, and it is also requires if you want to build the Wasp app for deployment. SQLite is for now used only to kickstart the development faster.
Want results from more Discord servers?
Add your server