I have a very large dataset of cvs file that need to be regularly imported MongoDB.

I'd like to have the importer run off Heroku and write to a MongoDB Heroku add-on.

mongoimport is a separate binary tool that the MongoDB guys provide.

So, it is possible to run mongoimport off a Heroku dyno?

有帮助吗?

解决方案

The way to do this with Heroku is with buildpacks. This is a way of pulling in dependencies and verdored binary builds for use not only in your deployed application but also useful for one off process runs. So probably not just as a dyno.

The buildpack approach is increasingly supported/emulated by other PAAS providers, so it is worthwhile to get acquainted with. There are various examples on Github, which is where Heroku pulls in the required buildpack files from. Here are also a few links that should help out with the required repo information and other examples of buildpacks. And yes the client tools are available in a separate package.

http://www.petekeen.net/introduction-to-heroku-buildpacks

https://github.com/kstaken/dockerfile-examples/blob/master/nodejs-mongodb/Dockerfile

https://github.com/fabiokung/heroku-buildpack-fakesu

https://github.com/heroku/heroku-buildpack-nodejs

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top