Deploying WASP without DB
Hello,
I have been using for developing a static website, and for now I don't need a backend for my project. However, the Wasp keeps asking me to setup a postgres db before doing the wasp build. Why is that? Can I deploy without the postgres db?
5 Replies
Hi @ansasi. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Wasp requires a database (specifically PostgreSQL in production) for building and deploying apps, even if your project is currently just a static website and doesn't use a backend. This is because Wasp apps are designed as full-stack applications, and the build process expects a database to be configured. If you try to build with SQLite (the default for development), Wasp will throw an error and instruct you to switch to PostgreSQL before deploying to production. There is no documented way to bypass the database requirement for deployment, even if your app doesn't use it yet.
In summary, you cannot deploy a Wasp app without setting up a PostgreSQL database, as this is enforced by the framework's build and deployment process. If you only need a static site without backend or database, Wasp may not be the best fit for your current use case Docs: Deploying a Wasp App Docs: Supported Database Backends.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @ansasi, 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?
Hey, @ansasi Wasp CLI commands are made with full-stack in mind.
So it deploy all 3: client, server, and db.
Currently we don't cover any other cases for deployment.
Sadly, to only way is to manually deploy the frontend part of the framework.
Self-hosted section of deployment docs might help you here: https://wasp.sh/docs/deployment/deployment-methods/self-hosted
and for now I don't need a backend for my project.I'm really interest in this. How come you've picked Wasp for a frontend only project?
@ansasi can you share more on what you're building, and why you decided to use Wasp for a frontent-only project?
Hello,
I was mainly looking for a standard template to build upon, and OpenSaaS provides a great starting point with a solid UI. For now, I’m not using authentication, but I may want to add it later — so having a standard setup like a PostgreSQL database is ideal. It’s also great that you already support Stripe and Lemon for payments, which makes it easy to integrate a payment platform directly into the website. Overall, I really like the project.
However, I’m missing the option to start with just the frontend.
Unrelated to this, I think having built-in i18n support for multiple languages would be a huge plus. For example, my website is based in Europe, so I need to handle localization myself right now — and I imagine many others would benefit from that feature too.
Aha, so it is a SaaS.
If you do plan to use backend/database in the future then Wasp is good pick.
We will want to support a more modular Wasp in future, but not in near future.
Thanks for the feedback.
On other note, I see you still have the Guest role.
If you want the full access to the server you can get it by leaving a message in the #👋introductions channel.