a year ago
I am trying to deploy this project but it keeps giving error when it runs the dockerfile on railway: https://github.com/Corkscrews/taille-auth/actions/runs/12760997822/job/35567334745
I tried everything, it appears that target is not being copied to railway?
74 Replies
a year ago
COPY ./target/release/taille-auth /taille-authYet target/release/taille-auth does not exist in that repo.
Its a good thing it doesn't though, you want to have the Dockerfile build the binary, not copy it in.
I don't want to use the dockerfile to build the binary, that's why it's done in the github workflow
@Brody in that link, if you check the step before, I added a ls to check if target exists
I could upload the binary and download it on the dockerfile but it seems cumbersome
a year ago
why do you not want the Dockerfile to build the binary?
a year ago
we don't charge for build?
a year ago
and even if we did, i still could not recommend what you are attempting to do
a year ago
its needless added complexity
ok, just find odd that the cli doesn't copy all the files in ., I checked the source code but I couldn't figure out why. I'd expect it to do something like docker build . and then run.
a year ago
the cli does not run docker build
a year ago
you are also telling the cli not to copy the target folder -
because it's correct, I have target on my local machine and I dont want on remote
a year ago
then you can forego the workflow all together, simply deploy via github
hmm, everything appears to be up and running but:
{
"status": "error",
"code": 502,
"message": "Application failed to respond",
"request_id": "Ka9mROjeTSi6yw-aVO1Z_A_499424464"
}a year ago
your target port was likely wrong
a year ago
404 is returned from your app
a year ago
i would recommend you add more verbose logs to your app so that you can figure out why its sometimes failing to start
@Brody That's odd, running docker build -t taille-auth . and docker run -it -p 3000:3000 taille-auth in the Dockerfile from main branch works just fine and I can use the server in my localhost.
nothing yet, I tried adding a healthcheck, removed tini, added more logs, nothing 😦
a year ago
your current deployment has exited
a year ago
not sure what to tell you but this isn't an issue with the platform, when you only see starting container, your app has already exited.
a year ago
not being rude at all
@Brody I believe I found the issue, it's because inside the docker I was applying some optimisation to compile the dependencies in a layer up in the list, but it wasn't invalidating the binary. Then the new code was coming, being compiled but it wasn't generating a new binary.
a year ago
that's an interesting find!
I read it's recommended to keep railway to decide the port, how I can setup it in the dockerfile? (in the expose part)
a year ago
railway does not read from the expose keyword in your Dockerfile, your application simply needs to listen on the PORT variable
it's working now if I set it to automatically set the port, just think a warning about that would make things clear
a year ago
8080 is what Railway sets the variable to
a year ago
no, the target port on the domain does not control the PORT variable
a year ago
so all good now?
a year ago
!s
Status changed to Solved brody • over 1 year ago






