R
Railway6mo ago
nikivi

Help deploying Dockerfile of Elysia server to Railway

have Dockerfile here: https://github.com/nikitavoloboev/drophunt/blob/main/api/Dockerfile not sure how to deploy it cleanly, tried searching just Dockerfile here, found nothing
GitHub
drophunt/api/Dockerfile at main · nikitavoloboev/drophunt
Contribute to nikitavoloboev/drophunt development by creating an account on GitHub.
No description
Solution:
did a PR - https://github.com/nikitavoloboev/drophunt/pull/1 this requires you to deploy from github. set a service variable RAILWAY_DOCKERFILE_PATH=/docker/api/Dockerfile connect the repo in your service settings...
Jump to solution
56 Replies
Percy
Percy6mo ago
Project ID: N/A
nikivi
nikiviOP6mo ago
not sure what I should do with fly.io I could do something like flyctl launch and it would pick up the Dockerfile and deploy it
Brody
Brody6mo ago
same thing with railway.. railway up
Brody
Brody6mo ago
or if its already in github, simply choose the desired repo and railway will use the Dockerfile automatically
No description
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
says it fails to build Dockerfile no error logs
nikivi
nikiviOP6mo ago
GitHub
drophunt/api/Dockerfile at main · nikitavoloboev/drophunt
Contribute to nikitavoloboev/drophunt development by creating an account on GitHub.
nikivi
nikiviOP6mo ago
its from official docs for my http server
nikivi
nikiviOP6mo ago
Docker - ElysiaJS
You use Elysia with Docker with the following Dockerfile by using "oven/bun", or copy the snippet from the page
nikivi
nikiviOP6mo ago
so should be correct
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
it runs locally
Brody
Brody6mo ago
looks like the cli exited before it printed the full build logs, go check the dashboard
nikivi
nikiviOP6mo ago
Logs?
No description
nikivi
nikiviOP6mo ago
no logs
nikivi
nikiviOP6mo ago
No description
Brody
Brody6mo ago
open the deployments build logs
nikivi
nikiviOP6mo ago
trying to find yea not sure
Brody
Brody6mo ago
click on the service, click on the red deployment, click on build
nikivi
nikiviOP6mo ago
oh i see
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
i see ok will try fix, thank you
Brody
Brody6mo ago
i think i know whats up, not a code issue, this is a config issue
nikivi
nikiviOP6mo ago
GitHub
GitHub - nikitavoloboev/drophunt
Contribute to nikitavoloboev/drophunt development by creating an account on GitHub.
nikivi
nikiviOP6mo ago
yea its just my repo is monorepo
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
so bunlock is at root
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
but my dockerfile is in api/ not sure what best to do move Dockerfile at root i guess
Brody
Brody6mo ago
yeah, ill fork that and get it deploying, then will come back with instructions
nikivi
nikiviOP6mo ago
omg thank you so much
Brody
Brody6mo ago
nope
nikivi
nikiviOP6mo ago
will be afk so take your time ❤️ very grateful
Solution
Brody
Brody6mo ago
did a PR - https://github.com/nikitavoloboev/drophunt/pull/1 this requires you to deploy from github. set a service variable RAILWAY_DOCKERFILE_PATH=/docker/api/Dockerfile connect the repo in your service settings wait until it deploys
nikivi
nikiviOP6mo ago
merged pr I connected repo to railway how do I set a service variable RAILWAY_DOCKERFILE_PATH=/docker/api/Dockerfile
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
oh i see
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
yay
No description
nikivi
nikiviOP6mo ago
where can I see the deployed url
nikivi
nikiviOP6mo ago
oh i see
No description
nikivi
nikiviOP6mo ago
ok trying
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
I get 404 trying to hit it
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
thought it would be drophunt-production-0380.up.railway.app:6958 to hit the port but that fails too perhaps I misunderstand the domain I should use
Brody
Brody6mo ago
the updates you have sent while I was afk are awesome it is https://drophunt-production-0380.up.railway.app the https is key since it's exposed via port 443 externally
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
getting this error even with RONIN_TOKEN set it is being read from process.env.RONIN_TOKEN in the server ohh it went through
nikivi
nikiviOP6mo ago
No description
nikivi
nikiviOP6mo ago
very cool thank you so if i get it right how do i do a deploy of new api version now
Brody
Brody6mo ago
made the code changes, commit to github, and railway will do a new build for you
nikivi
nikiviOP6mo ago
can I tell railway to only do build if changes to api/ folder are made? otherwise it's kind of wasteful to do builds
Want results from more Discord servers?
Add your server