Java is not found
It seems Java is not available out of the box. How do I configure Railway service to have Java so I can run a Java process?
60 Replies
Project ID:
1f1e865e-cb58-46db-b427-0b47e5dad0c1
Product ID: 1f1e865e-cb58-46db-b427-0b47e5dad0c1
what provider is currently being detected?
I don't need to build. I just need to run already built Java server
How do I check this?
build logs please https://bookmarklets.up.railway.app/log-downloader/
I don't know how to use that bookmarklets
It's confusing
please follow the instructions
I did, but when I click on bookmarklet from the bookmarks bar, it just goes to the page you sent me
And that makes sense because it's in the bookmarks bar...
you did not follow the instructions
I did. I opened the desired service and then clicked on the bookmarklet in the bookmarks bar
It looks like your instructions are not detailed enough...
What is it that you would like to see? The build log?
the build logs produced from that bookmarklet
This is from Railway Build logs
please use the bookmarklet
Is there a YouTube video or something that explains how to use bookmarklet?
there is an arrow and 3 steps on that page
please follow the instructions
Yes... I followed those 3 steps.
okay send the build logs please
I got the log from bookmarklet.. that was confusing to me sorry
that is the deployment logs
do you have a nixpacks.toml file?
no
any kind of config file relating to railway?
no nothing.
First time using Railway
do you have any service variables set?
No
do you have a start command set in the service settings?
yes
bin/run.sh root/config.yaml
the run.sh
calls java
to run the serverwhat languages do you need made available, other than java
Only Java
what version
17
do you need anything else in the container?
no
Just need Java that's all
would that just be jre?
Yes just JRE is ok
untested, but add this to a railway.json file in your project
Root folder of my project?
if thats what you have railway deploying from, yes
It's a monorepo that will have many things deployed from. This Java server is one of them.
How can I make it so that only one service is using this
railway.json
configuration. All the other services don't need Java
at allare they in subfolders?
Yeah
have you set a root directory for this railway service?
yes that root directory is the subfolder where this Java server is in
what did you set it to?
/apps/ib-client-portal
This is the root folder that's set in the settings of the servicethen that is where you should put that railway.json file
ok thank you. testing it out now
This showed up in build log so far. So I guess that's good.
indeed
Well build was successful and deployment shows this log
I think this is an issue I should solve myself.
My start command is
bin/run.sh root/config.yaml
where I pass the config.yaml
but it can't find that config file...where is the config file relative to the root of your entire project?
-
monorepo-root/apps/ib-client-portal/railway.json
- monorepo-root/apps/ib-client-portal/bin/run.sh
- monorepo-root/apps/ib-client-portal/root/config.yaml
should you have written
monorepo-root
? is that an actual folder within your projects root folder?no, i'm just letting you know the relative paths from my monorepo-root
That is the root folder in Github repo basically
okay so you dont actually have a
monorepo-root
in your root, that is the name of the root folder on your computer?yes
that's correct
ive updated this, please update your copy
Thanks. trying it out
im starting to think a dockerfile would be more suitable for this