deploy in fly.io with multiple environment
need to deploy client and server even the database for prod and dev or staging
1 Reply
Hi @victor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To deploy your Wasp app on Fly.io, you can use the Wasp CLI's
setup
command. This command creates your client and server apps on Fly.io and adds some secrets, but it does not deploy them. The command is as follows:
The <app-name>
is the name of your app and <region>
is the region where your app will be deployed. You can find the available regions here (https://wasp-lang.dev/docs/advanced/deployment/cli#flyio-regions).
After running setup
, Wasp creates two new files in your project root directory: fly-server.toml
and fly-client.toml
. You should include these files in your version control. You can edit these files to further configure your Fly deployments.
If you want to maintain multiple apps (for example, for different environments like production, staging, and development), you can add the --fly-toml-dir <abs-path>
option to point to different directories.
Remember to only run setup
once per app. If you run it multiple times, it will create unnecessary apps on Fly.
For deploying the app, you can use the launch
command which runs setup
, create-db
, and deploy
in sequence.
If your app requires any other environment variables, you can set them with the --server-secret
option:
Please refer to the Wasp CLI documentation (https://wasp-lang.dev/docs/advanced/deployment/cli#setup) for more details.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @victor, 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?