[Feature request] .railwayignore
maddsua opened this issue · 4 comments
That's another CI/CD one =)
Right now railway cli uses .gitignore
to just skip over files, which is not optimal for cases when an application is built in CI and then pushed to railway. In most cases build output is added to .gitignore
so that it won't pollute the repository, and here is the problem - nothing can be deployed this way without using temp directories and God knows what else.
My suggestion is to add a .railwayignore
which would override .gitignore
values (by default or at least have an option to do so). Or, alternatively, .dockerignore
may be used as the primary one.
Please don't use .gitignore
- humans add all sorts of things to it when the setup is one step more complex than just a GitHub repo with a single file in it.
This was brought up in another issue. I propose that cli does an ignore-priority thing, where flags
> .railwayignore
> .gitignore
. I'm uncertain about how difficult this would be, but I'm almost certain that it is possible...
Honestly. I don't understand why would the CLI even check gitignore file. There's dockeringore and even railwayingore! This holy trinity just makes me (and probably 2.5 more people) do all that FS gymnastics with copying build artifacts to a temp folder and pushing from there. It actually doesn't make sense to me, I'd say you've overdone the ignoring part just a bit.
.railwayignore
has existed for a while, but .gitignore
is also searched. with the merging of #484, you can now use the --no-gitignore
flag, which will then only read from .railwayignore
.