Wasp Deploy Client only to Flyio
Possible to deploy and upload only the client?
4 Replies
Wohooo @Nick, you just became a Waspeteer level 1!
Hi @Nick. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The Wasp CLI currently does not support deploying only the client to Fly.io. The
wasp deploy
command is designed to deploy both the client and server of your Wasp app. However, you can manually deploy your client to any static hosting provider.
Here's how you can do it:
1. Generate the deployable code for your Wasp project with wasp build
command. This will create a .wasp/build
directory in your project root.
2. Navigate to the .wasp/build
directory with cd .wasp/build
.
3. Run the flyctl deploy --remote-only --config ../../fly.toml
command. This will build and deploy the backend of your Wasp app on Fly.io.
4. Deploy your client and add the client URL by running flyctl secrets set WASP_WEB_CLIENT_URL=<url_of_deployed_client>
. You can use any static hosting provider for your client, but Netlify is suggested.
Here are the commands:
Remember to replace <url_of_deployed_client>
with the actual URL of your deployed client.
For more details, you can refer to the Wasp documentation on manual deployment (https://wasp-lang.dev/docs/advanced/deployment/manually#deploy-to-a-flyio-app).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Nick, 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?Yep, the bot is correct, you can always manually deploy the Wasp client to whichever hosting you want sincei it's just a React app. Here are the docs on manual deployment: https://wasp-lang.dev/docs/advanced/deployment/manually
Deploying Manually | Wasp
This document explains how to build and prepare your Wasp app for deployment.
Thanks. I have done it successfully.