R

Railway

βœ‹ο½œhelp

Join Server

How to setup my app?

NLInot logged in5/9/2023
It errors out, and @Adam says that I need a docker image to get railway working with the lang I am using. I have found the image: https://hub.docker.com/repository/docker/nimlang/nim/ but i have never used docker and don't know how to implement it
NLInot logged in5/9/2023
5ab21ded-4893-4eb7-9e05-02e3e2fc2e9d
ADA Dumb5/9/2023
Please post your github repo as well
NLInot logged in5/9/2023
won't help... as it is private, but ok: https://github.com/thatrandomperson5/Random-Battle-Snake
ADA Dumb5/9/2023
Gotta make it public then
Bbrody5/9/2023
public*
ADA Dumb5/9/2023
oop yeah
NLInot logged in5/9/2023
There is a public replit one (moving from replit)

https://replit.com/@dragonhunter1/Random-Battle-Snake
ADA Dumb5/9/2023
Best to give as much info as possible so people can help you out
ADA Dumb5/9/2023
tldr, they're deploying nim
ADA Dumb5/9/2023
know of any templates @Brody
NLInot logged in5/9/2023
i gtg, pls ping on replies
Bbrody5/9/2023
yes, i do
NLInot logged in5/9/2023
that is only for jester.. But it is what I am using anyway, so thanks!
NLInot logged in5/9/2023
omg it is working!
NLInot logged in5/9/2023
thanks!
NLInot logged in5/9/2023
I am now getting server error when trying to access the url: random-battle-snake-production.up.railway.app
NLInot logged in5/9/2023
let me try setting the port var
NLInot logged in5/9/2023
everything works now! thanks!
ADA Dumb5/9/2023
love to hear it!
ADA Dumb5/9/2023
Welcome to Battlesnake and Railway!
NLInot logged in5/9/2023
πŸ‘
I am still using replit for devl and testing, but now i just push to the gh branch, make a pr, then merge and it is on railway. Super easy once you get setup!
Bbrody5/9/2023
awesome, glad my template helped you, it was my first time using nim
ADA Dumb5/9/2023
Totally valid, I do all my testing locally because I have it all set up
NLInot logged in5/9/2023
1 thing I do want want you to note is that nimble build does not build a release version, it builds a debug one. Optimally the dockerfile should be this:
FROM nimlang/nim:1.6.12-alpine

WORKDIR /app

COPY . .

RUN nimble refresh

RUN nimble build -d:release

CMD ./main
Bbrody5/9/2023
wow I could have sworn I read somewhere that nimble build uses -d:release internally
Bbrody5/9/2023
thank you though, I will make this change
NLInot logged in5/9/2023
nimble install does, nimble build does not πŸ‘
Bbrody5/9/2023
thank you for the tip, much appreciated πŸ™