How to deploy openSaaS wasp project on Porter.run using github repository
Since .wasp folder is in git ignore, I am not not sure how to deploy
9 Replies
Hi @hari. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I'm sorry, but the provided knowledge sources do not contain specific information on how to deploy an openSaaS Wasp project on Porter.run using a GitHub repository.
However, I can guide you on the general steps to deploy a Wasp project based on the available information:
1. Generating Deployable Code: You need to run
wasp build
to generate deployable code for the whole app in the .wasp/build/
directory. Note that you won't be able to build the app if you are using SQLite as a database. You'll have to switch to PostgreSQL before deploying to production. source (https://wasp-lang.dev/docs/advanced/deployment/manually#1-generating-deployable-code)
2. Deploying the API Server (backend): There's a Dockerfile that defines an image for building the server in the .wasp/build
directory. To run the server in production, deploy this Docker image to a hosting provider and ensure the required environment variables on the provider are correctly set up. source (https://wasp-lang.dev/docs/advanced/deployment/manually#2-deploying-the-api-server-backend)
3. Deploying the Web Client (frontend): To build the web app, position yourself in .wasp/build/web-app
directory and run npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
. The command will build the web client and put it in the build/
directory in the web-app
directory. Since the app's frontend is just a bunch of static files, you can deploy it to any static hosting provider. source (https://wasp-lang.dev/docs/advanced/deployment/manually#3-deploying-the-web-client-frontend)
4. Deploying a PostgreSQL database and keeping it running: This step is provider-specific and you would need to follow the instructions provided by your hosting provider.
For the specific steps to deploy on Porter.run, I would recommend checking their official documentation or reaching out to their support for guidance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @hari, 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?We haven't really had the case of deploying to
porter.run
so far. What kind of platform is it?
Here is our guide to deploying Wasp apps: https://wasp-lang.dev/docs/advanced/deployment/manually
Here's a Github action to deploy to Caprover to get inspired: https://github.com/wasp-lang/deploy-to-caprover-action/blob/main/.github/workflows/deploy.yml
Let me know if this helps you out.Deploying Manually | Wasp
This document explains how to build and prepare your Wasp app for deployment.
GitHub
deploy-to-caprover-action/.github/workflows/deploy.yml at main · wa...
Contribute to wasp-lang/deploy-to-caprover-action development by creating an account on GitHub.
If Porter.run can only deploy from a git branch, then that is tricky indeed. You could still get it working by constructing a special branch onto which you would push the relevant artefacts of Wasp for deployment, but that would be a bit involved.
@Wasp Team @Wasp Expert
https://www.porter.run/
is a Paas to deploy in our own AWS, GCP, or Azure account. It requires a dockerfile to build and deploy everytime we push to github, as wasp build
on openSaaS will create .wasp folder but it is git ignored, Which is confusing what dockerfile to give on porter, kindly help if anyone has idea on this ?Please check these docs for Wasp https://wasp-lang.dev/docs/advanced/deployment/manually, I think they should clear it up!
I've followed it, Is there any document or steps how to deploy openSaaS wasp on
platform as service
like porter which deploys on azure/aws/gsp.I think it's fair to consider this as an exhaustive list
quoting the doc:
in reality, wasp isn't a magical executable that is only supported on those listed platforms
wasp produces a real code that you could produce yourself by hand, stored in separate folders, communicating between themselves via url and env variables (connection url to db, backend api url etc)
you can build wasp and deploy it to whatever you want, manually, folder by folder, and set those environment variables to point to the correct services
the only difference with documentation, is that you can deploy to services like Fly.io with one single command, that's because Wasp team worked on their CLI to deploy all the producable by wasp folders to Fly
Thanks for clearing that up!
Couldn't have said it better myself 😄
@hari Where would you like to deploy your app?
If it's on Fly - you can do it with a single command.
If it's on Netlify, Railway, or Heroku - you can foloow our step-by-step guide.
If it's somewhere else - you can follow our manual deployment guide that tells you how to build the app, and deploy it as you would any JS app that isn't using Wasp.