R
Railwayβ€’10mo ago
coltonidle

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
No description
34 Replies
Percy
Percyβ€’10mo ago
Project ID: N/A
coltonidle
coltonidleOPβ€’10mo ago
N/A
maddsua
maddsuaβ€’10mo ago
deployment success rate
Brody
Brodyβ€’10mo ago
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?
coltonidle
coltonidleOPβ€’10mo ago
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.
coltonidle
coltonidleOPβ€’10mo ago
here you can isee that i tried from github and from the ktor starter
No description
No description
coltonidle
coltonidleOPβ€’10mo ago
let me get logs... one sec
coltonidle
coltonidleOPβ€’10mo ago
when i click the bookmark. maybe because im mid-deply?
No description
coltonidle
coltonidleOPβ€’10mo ago
proj id ac2c2914-f0fa-415a-8477-d974a53cf860
Brody
Brodyβ€’10mo ago
well yes you would want to wait until the build is done to get the logs, but please read the message of the alert
coltonidle
coltonidleOPβ€’10mo ago
I think I have a service open? I see my ktor starter service listed there?
Brody
Brodyβ€’10mo ago
you have a project open, you have yet to open the service
coltonidle
coltonidleOPβ€’10mo ago
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
coltonidle
coltonidleOPβ€’10mo ago
still new to backend dev. so that error doesn't make sense to me. but lemme google it
Brody
Brodyβ€’10mo ago
@aleks - java time
coltonidle
coltonidleOPβ€’10mo ago
java time indeed πŸ˜‚
Brody
Brodyβ€’10mo ago
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
coltonidle
coltonidleOPβ€’10mo ago
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 πŸ˜‚
Brody
Brodyβ€’10mo ago
you don't need to learn docker to have a Dockerfile sitting around in your repo
coltonidle
coltonidleOPβ€’10mo ago
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
Brody
Brodyβ€’10mo ago
fair enough
root
rootβ€’10mo ago
Are you using maven or gradle?
coltonidle
coltonidleOPβ€’10mo ago
im using gradle. essentially all the defaults from start.ktor.io
No description
root
rootβ€’10mo ago
Try following the guide here, specifically the mainClass.set part: https://ktor.io/docs/gradle-application-plugin.html
coltonidle
coltonidleOPβ€’10mo ago
yep. 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. cheers
root
rootβ€’10mo ago
Sorry for taking so long to get back, all I had to do was set PORT and then add a nixpacks.toml:
[start]
cmd = 'java $JAVA_OPTS -jar build/libs/*-all.jar'
[start]
cmd = 'java $JAVA_OPTS -jar build/libs/*-all.jar'
(which is basically the same as setting the start command that you had) Changing the build command shouldn't be necessary.
coltonidle
coltonidleOPβ€’10mo ago
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?
Brody
Brodyβ€’10mo ago
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)
coltonidle
coltonidleOPβ€’10mo ago
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.
root
rootβ€’10mo ago
I have one at https://buymeacoffee.com/aleksr - thank you so much for asking!
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.
coltonidle
coltonidleOPβ€’10mo ago
@aleks just sent something over. thank you!
root
rootβ€’10mo ago
Thank you so much! Glad I could help.
Want results from more Discord servers?
Add your server