Is Railway still recommended? I note the instructions do not track the Railway site
Example: the docs state that we "generate domain" on the Railway site as the first step. Now, when you go to Railway, this is not an option, apparently it is done after the Deploy step? Unknown, hence, checking before spending significant time on it..
12 Replies
Hi @Conspyre. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The instructions provided in the Wasp documentation for deploying to Railway are based on the state of the Railway platform at the time of writing. It's possible that Railway has since updated their interface or process, which might cause some discrepancies between the current Railway process and the instructions in the Wasp documentation.
However, the general steps outlined in the Wasp documentation should still be applicable. The main steps involve building your Wasp app, creating a Railway account, installing the Railway CLI, and logging in to Railway. After that, you create a new project on Railway, set up domains for your server and client services, and then deploy your server and client.
If you're finding that the "Generate Domain" option is not available as the first step on Railway, it's possible that this step now occurs later in the process, or is handled automatically by Railway during the deployment process.
If you're unsure about any steps, I would recommend reaching out to Railway's support or checking their documentation for the most up-to-date information.
Here are the relevant links from the knowledge sources:
- Wasp Deployment to Railway (https://wasp-lang.dev/docs/advanced/deployment/manually#railway-server-client-and-database)
- Deploying the Server (https://wasp-lang.dev/docs/advanced/deployment/manually#deploying-the-server)
- Deploying the Client (https://wasp-lang.dev/docs/advanced/deployment/manually#deploying-the-client)
- Updates & Redeploying (https://wasp-lang.dev/docs/advanced/deployment/manually#updates--redeploying)
- Conclusion (https://wasp-lang.dev/docs/advanced/deployment/manually#conclusion)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Conspyre, 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?
@kapa.ai This is apparently an issue, we have created a Postgres instance and two empty shells called "client" and "server". When we do a "railway link" neither the client nor server block appear in the CLI - only the postgres instance, so we have to throw away the entire script in the wasp instructions and stumble through thisβ¦β¦β¦
Let me check the knowledge base for you. One moment! :books:
----------------------
I'm sorry to hear that you're encountering issues with the
railway link
command. The Wasp documentation does indicate that after running railway link
, you should be able to select your server
service when prompted. If this is not happening, it could be due to a change in Railway's process or an issue with the setup.
Here are a few things you could try:
1. Ensure that you're running the railway link
command from within your app's .wasp/build/
directory as instructed in the Wasp documentation (https://wasp-lang.dev/docs/advanced/deployment/manually#deploying-the-server).
2. Check that your client
and server
services have been properly created on Railway. They should be visible in your Railway dashboard (https://railway.app/dashboard).
3. Try logging out and then logging back in to Railway via the CLI to refresh your session.
4. If you're still having issues, it might be helpful to reach out to Railway's support or check their documentation for further assistance.
Remember, the Wasp documentation is a guide based on the state of the Railway platform at the time of writing, and there may be some discrepancies due to updates or changes on Railway's end.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Conspyre, 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, Wasp apps are just Node.js + React + Postgres in the end and deploying it to Railway should be possible. Of course, Railway might have updated their interface, and since we are not deploying apps every hour of the day and checking the docs, the docs might be out of date π That being said, let me check it tomorrow now and see what's up.
Please be mindful of our team and there's no need to be annoyed! Development is annoying sometimes and we'll figure it out together π
I guess the only thing that might have confused you is that when you run
I've just deployed a simple app according to the instructions and it works for me.
railway link
you only need to select the environemnt production
and not the project itself. You select the project in railway up
step.
The Generate domain
is still there and works for me π€·ββοΈI've just deployed a simple app according to the instructions and it works for me.
@kapa.ai @miho I had missed the "deploy" step on the Railway site after creating both the "client" and "server" blocks - this was necessary before being able to complete the directions. Under the "Deploy Your App to Railway" section - I could have used a hint to "Deploy from Railway.app" (or as the last step of the previous section).
Instructions are otherwise working out great (now that I know that every change on Railway must be deployed to be seen!). Consider this to be mostly user error / new to deploying React apps.
Let me check the knowledge base for you. One moment! :books:
----------------------
I'm glad to hear that you've managed to resolve the issue and that the instructions are working out for you now. It's a great point that the need to "Deploy from Railway.app" could be made clearer in the Wasp documentation.
For anyone else following these steps, it's important to remember that after creating the
client
and server
services on Railway, you need to deploy them from the Railway dashboard before you can link them using the railway link
command.
Also, keep in mind that any changes made on Railway need to be deployed to take effect.
Thank you for your feedback, it's very valuable in making the deployment process clearer for everyone. Happy coding with Wasp and Railway!
Here are the relevant links from the knowledge sources:
- Wasp Deployment to Railway (https://wasp-lang.dev/docs/advanced/deployment/manually#railway-server-client-and-database)
- Deploying the Server (https://wasp-lang.dev/docs/advanced/deployment/manually#deploying-the-server)
- Deploying the Client (https://wasp-lang.dev/docs/advanced/deployment/manually#deploying-the-client)
- Updates & Redeploying (https://wasp-lang.dev/docs/advanced/deployment/manually#updates--redeploying)
- Conclusion (https://wasp-lang.dev/docs/advanced/deployment/manually#conclusion)
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @Conspyre, 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?Thanks for the heads up π we'll update the docs to match the new Railway UI
@kapa.ai I'm hitting another issue, super basic node functionality. Under the instructions for Deploy Your App to Railway/Deploying the Client there is a step of exactly this: "npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build"
Substituting in the correct URL, the error is:
npm ERR! Missing script: "build"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
When I execute "npm run" as suggested, there is no output. Probably something is not configured with node?
Let me check the knowledge base for you. One moment! :books:
----------------------
The error message you're seeing typically means that there is no
build
script defined in your package.json
file. The build
script is a standard part of many Node.js projects and is used to prepare the application for production.
In the context of a Wasp project, the build
script should be automatically generated when you run wasp build
. This command generates the .wasp/build
directory, which includes the web-app
directory for your frontend code. Inside web-app
, there should be a package.json
file with a build
script defined.
Here are a few things you could check:
1. Make sure you're running the command from the correct directory. According to the Wasp documentation (https://wasp-lang.dev/docs/advanced/deployment/manually#deploying-the-client), you should be in the .wasp/build/web-app
directory when you run the npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
command.
2. Check that you've run wasp build
before trying to build the client. This command generates the necessary files and directories for deployment, including the build
script in the web-app/package.json
file.
3. If you're in the correct directory and you've run wasp build
, but you're still seeing the error, check the package.json
file in the web-app
directory. There should be a scripts
section with a build
script defined. If it's not there, there might be an issue with your Wasp setup.
If you're still having issues, it might be helpful to reach out to the Wasp community or check their documentation for further assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------Are you in the correct folder? Please check the docs for this carefully
Hi, sorry @miho I should have popped back in here when I solved it to leave breadcrumbs for the next traveler ... I solved it by cd'ing into the correct folder. π€¦ββοΈ