Dockerfile not found?
santiagodiazs
FREEOP

9 months ago

Im deploying an application that has a backend, postrgres database, n8n and a frontend. Im having issues to deploy the frontend, which i want to run dockerized so i made a railway.toml file specifying to use the dockerfile to build the frontend. The problem is that when deploying i get an error in the logs saying Dockerfile 'dockerfile does not exist'.

This is strange because the file is absolutely there. I opted to use a railway.toml file because when trying to deploy with nixpacks or railpack it failed (i believe because they didnt use the dockerfile either).

I don't know if this is usefull but it is hosted as a github repo with the root directory pointing to the frontend folder (where the dockerfile is located)

$10 Bounty

3 Replies

medim
MODERATOR

9 months ago

You don't need to have a railway.toml to build using a Dockerfile, if a Dockerfile is present at root then Railway will use that.
Also, please check this docs page : https://docs.railway.com/guides/dockerfiles , it has some extra info regarding Dockerfiles such as root dir, dockerfile name...

Can we use that as a starting point? Try it, and tell me how it goes.


santiagodiazs
FREEOP

9 months ago

The thing is i tried that first, but as i said, railway was not using the dockerfile to build it. I believe it started its own container and started inputing commands like yarn build etc...


lofimit
HOBBY

9 months ago

Make sure the file is "Dockerfile" with upper case D.


Loading...