docs/guides/installing-krawler.md
# Installing Krawler ## As Command-Line Interface (CLI) ```bashnpm install -g @kalisio/krawler// Or with Yarnyar global add @kalisio/krawler``` ## As module As dependency in another module/app: ```bashnpm install @kalisio/krawler --save// Or with Yarnyar add @kalisio/krawler``` Or when developing: ```bashgit clone https://github.com/kalisio/krawlercd krawleryarn installyarn link// Now you can launch the krawler CLIkrawler jobfile.js// Or link wirh it in another packageyarn link @kalisio/krawler``` > Please refer to the [KDK documentation](https://kalisio.github.io/kdk/guides/development/setup.html) to setup your development environment. A native command-line executable can be generated using [pkg](https://github.com/zeit/pkg) eg for windows: ```bashpkg . --target node8-win-x86``` > Because it relies on the GDAL native bindings you will need to deploy the *gdal.node* file (usually found in *node_modules\gdal\lib\binding*) to the same directory as the executable. Take care to generate the executable with the same architecture than your Node.js version. ## As a Docker container When using krawler as a Docker container the arguments to the CLI have to be provided through the ARGS environment variable, along with any other required variables and the data volume to make inputs accessible within the container and get output files back: ```bashdocker pull kalisio/krawlerdocker run --name krawler --rm -v /mnt/data:/opt/krawler/data -e "ARGS=/opt/krawler/data/jobfile.js" -e S3_BUCKET=krawler kalisio/krawler```