R
Railwayβ€’2y ago
nlits

How to setup my app?

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
20 Replies
Percy
Percyβ€’2y ago
Project ID: 5ab21ded-4893-4eb7-9e05-02e3e2fc2e9d
nlits
nlitsOPβ€’2y ago
5ab21ded-4893-4eb7-9e05-02e3e2fc2e9d
Adam
Adamβ€’2y ago
Please post your github repo as well
nlits
nlitsOPβ€’2y ago
won't help... as it is private, but ok: https://github.com/thatrandomperson5/Random-Battle-Snake
Adam
Adamβ€’2y ago
Gotta make it public then
Brody
Brodyβ€’2y ago
public*
Adam
Adamβ€’2y ago
oop yeah
nlits
nlitsOPβ€’2y ago
There is a public replit one (moving from replit) https://replit.com/@dragonhunter1/Random-Battle-Snake
Adam
Adamβ€’2y ago
Best to give as much info as possible so people can help you out tldr, they're deploying nim know of any templates @Brody
nlits
nlitsOPβ€’2y ago
i gtg, pls ping on replies
Brody
Brodyβ€’2y ago
nlits
nlitsOPβ€’2y ago
that is only for jester.. But it is what I am using anyway, so thanks! omg it is working! thanks! I am now getting server error when trying to access the url: random-battle-snake-production.up.railway.app let me try setting the port var everything works now! thanks!
Adam
Adamβ€’2y ago
love to hear it! Welcome to Battlesnake and Railway!
nlits
nlitsOPβ€’2y ago
πŸ‘ 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!
Brody
Brodyβ€’2y ago
awesome, glad my template helped you, it was my first time using nim
Adam
Adamβ€’2y ago
Totally valid, I do all my testing locally because I have it all set up
nlits
nlitsOPβ€’2y ago
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
FROM nimlang/nim:1.6.12-alpine

WORKDIR /app

COPY . .

RUN nimble refresh

RUN nimble build -d:release

CMD ./main
Brody
Brodyβ€’2y ago
wow I could have sworn I read somewhere that nimble build uses -d:release internally thank you though, I will make this change
nlits
nlitsOPβ€’2y ago
nimble install does, nimble build does not πŸ‘
Brody
Brodyβ€’2y ago
thank you for the tip, much appreciated πŸ™
Want results from more Discord servers?
Add your server