Anyone use railway for deployment

I want to deploy in railway and I don't know how to start. because the db and the frontend and backend all in wasp, it make me confus.
3 Replies
kapa.ai
kapa.ai7mo ago
Hi @jianjungki. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Sure, deploying a Wasp app on Railway involves several steps. Here's a step-by-step guide: 1. Prerequisites: Make sure your Wasp app is built by running wasp build in the project directory. Create a Railway account and install the Railway CLI. Run railway login to authenticate. 2. Create a New Project: Go to your Railway dashboard, click on New Project, and select Provision PostgreSQL from the dropdown menu. Create two empty services and name them server and client. 3. Setup Domains: Generate domains for both the server and client services. You will need these domains later. 4. Deploy the Server: Move into your app's .wasp/build/ directory and link your app build to your newly created Railway project using railway link. Set up the required environment variables in the Railway dashboard. Finally, push and deploy the project using railway up. 5. Deploy the Client: Change into your app's frontend build directory .wasp/build/web-app. Create the production build, link this specific frontend directory to your project, and configure Railway's static hosting for your client. Set the PORT environment variable to 8043 under the Variables tab. Finally, deploy the client using railway up. 6. Conclusion: Your Wasp app should now be deployed. You can check your newly deployed services: PostgreSQL, Server, and Client in your Railway dashboard. 7. Updates & Redeploying: When you make updates and need to redeploy, run wasp build to rebuild your app, run railway up in the .wasp/build directory (server), and repeat all the steps in the .wasp/build/web-app directory (client). For more detailed instructions, you can refer to the official Wasp documentation (https://wasp-lang.dev/docs/advanced/deployment/manually#railway-server-client-and-database). Please note that there is an open issue on GitHub discussing the possibility of one-line deployments to Railway. You can follow the discussion here (https://github.com/wasp-lang/wasp/issues/1232). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @jianjungki, 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
Hey @jianjungki we actually have quite detailed docs for Railway, check it out: https://wasp-lang.dev/docs/advanced/deployment/manually#railway-server-client-and-database .
jianjungki
jianjungkiOP7mo ago
thanks
Want results from more Discord servers?
Add your server