-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apify push should honor .dockerignore instead of .gitignore - to allow compiled languages #170
Comments
Hey @VaclavSynacek, thanks for the report. I got your point, but you have to think about apify push like git push which pushes your source code to apify platform. In this case, it makes sense to have all code on apify platform and view it in UI. Of course, there is a bonus of apify push which build your actor. But the build is simple docker build command and it follows .dockerignore. |
Hello @drobnikj, How about having an |
Currently
apify push
pushes all files except those in.gitignore
and.git
directory. This is fine default behavior for interpreted languages, but not so much for compiled languages.The usual docker building workflow with compiled languages is to have in
.gitignore
all results of compilation and have different set of files used for docker image building as defined in.dockerignore
. Typically the.dockerignore
would differ from.gitignore
that it would ignore all sources but it would include compilation result.There are ugly workarounds for the current
apify push
:gitignore
everytime beforeapify push
but these are both really ugly.
This I believe is applicable to all compiled languages. And as apify is mostly for JavaScript it seems like a rare edge case. But hey, don't you want to welcome compiled languages too?
A specific example is minimal actor in ClojureScript I made: https://github.com/VaclavSynacek/apify-cljs-whats-my-name . ClojureScript is a compile-to-JavaScript language (but all of above is applicable also for compile-to-binary languages). In this example, ideally the
compiled/main.js
file would be included in the actor andsrc
directory containing cljs source files (which the platform cannot understand anyway) does not need to be included. This is reflected in the.dockerignore
file. Butapify push
only honors.gitignore
so pushing this actor as-is will not work. If I manually change the.gitignore
to not ignorecompiled
and to do ignoresrc
thanapify push
pushes correct actor that actually does work.The text was updated successfully, but these errors were encountered: