What does 10% mean when choosing a new project?
I'm new to railway. i want to build with railway. and deploy a ktor server. just have a quick question on what the 10% means. looks a bit scary because its red
34 Replies
Project ID:
N/A
N/A
deployment success rate
you can kinda think of it as a template health indicator, it indicates if the template deploy has failed recently
do you have your own ktor server code or where you looking to start from scratch?
I'm just getting into backend development. I know android/kotlin so im starting here https://start.ktor.io/
which just generates a dead simple project. i just want a few routes that respond with json. then inevitably add a database. but yeah. i tried to put my code on github and run it with railway with no luck.
build logs please https://bookmarklets.up.railway.app/log-downloader/
here you can isee that i tried from github and from the ktor starter
let me get logs... one sec
when i click the bookmark. maybe because im mid-deply?
proj id
ac2c2914-f0fa-415a-8477-d974a53cf860
well yes you would want to wait until the build is done to get the logs, but please read the message of the alert
I think I have a service open? I see my ktor starter service listed there?
you have a project open, you have yet to open the service
ah sorry. still learning railway. lol. with one service, I thought this "was" my service
assuming this is the error
no main manifest attribute, in build/libs/ktor-starter-0.0.1.jar
still new to backend dev. so that error doesn't make sense to me. but lemme google it
@aleks - java time
java time indeed π
the best advice I could give you as someone who doesn't know anything about java would be to to find an example ktor project that comes with a Dockerfile
yeah.... about that. i really dont wanna learn docker. lol. as a mobile dev. i feel like ive heard a ton of pros and cons. but maybe thats just the way to go. portability sounds cool, but ive never touched docker in my life. so trying to limit the things i gotta learn here π
you don't need to learn docker to have a Dockerfile sitting around in your repo
i feel ya. but my knowledge of docker goes as far as "i know its a thing". so you can hopefully see my initial hesistation. but ktor docs at least have a docker section. so it might be something i take a swing at
fair enough
Are you using maven or gradle?
im using gradle. essentially all the defaults from start.ktor.io
Try following the guide here, specifically the
mainClass.set
part: https://ktor.io/docs/gradle-application-plugin.htmlyep. when you use the starter generator I sent above (official from the jetbrains team) it does that for you
@aleks dont want to bother you, but if possible. can you use https://start.ktor.io and just download the baseline project there, and then recommend what settings you would change when uploading to railway.
Basically after I download that... I've done 3 things:
1. set build step to
gradle buildFatJar
2. set deploy step to gradle runFatJar
but sometimes that times out in free tier, instead java -jar thejarname-all.jar
seems to work fine without causing issues
3. set a variable of PORT to 8080
Just want a sanity check of someone that knows java + railway. thanks in advance if you find the time. cheersSorry for taking so long to get back, all I had to do was set
PORT
and then add a nixpacks.toml
:
(which is basically the same as setting the start command that you had)
Changing the build command shouldn't be necessary.No worries. just glad you got back to me!
"changing the build command shouldn't be necessary"
That's actually really interesting? how does it know how to build? is that also in nixpack thing? out of curiosity id love to find out what command it "actually" runs in case i wanted to test building that locally.
and in regards to the nixpacks.toml thing... is that something I should have known how to do? or is nixpack the railway specific config stuff your team has built?
aleks also doesnt work for railway, but yes nixpacks is something railway built for railway.
you can see the default commands that will be used in the build table at the top of the build (they will show the defaults unless you overwrote them)
oh hot damn. who the heck works here. lol. aleks let me know if youve got a buymeacoffee or whatever.
and oh cool. let me take a look at that. thanks @Brody its all starting to come together
i do wonder how nixpack figures out what command to run. might dig into that this weekend.
Buy Me a Coffee
Aleks RΕ«tiΕΕ‘ is trying to make code work
Howdy! I do code and stuff. I don't work for Railway, but I sometimes do customer support there.
@aleks just sent something over. thank you!
Thank you so much! Glad I could help.