From 64a0f3fa38c9845bdf5a10672f879e926456261e Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Wed, 12 Sep 2018 17:54:15 -0400 Subject: [PATCH] feat(docker): add download script separate from npm For the same reasons we need to avoid calling `npm start` in Docker containers, we need to avoid calling `npm run download`. By moving the knowledge of how to do a download from `package.json` to a small script, Docker containers can work without any NPM interference while still having consistency. `npm run download` can call this script for backwards compatibility and convenience when running outside Docker. Connects https://github.com/pelias/pelias/issues/745 --- bin/download | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 bin/download diff --git a/bin/download b/bin/download new file mode 100755 index 000000000..b5f2cebd0 --- /dev/null +++ b/bin/download @@ -0,0 +1,3 @@ +#!/bin/bash + +exec node utils/download_data.js diff --git a/package.json b/package.json index dc83c6262..06ba366b7 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "temp": "^0.8.3" }, "scripts": { - "download": "node utils/download_data.js", + "download": "./bin/download", "import": "./bin/start", "parallel": "./bin/parallel", "test": "NODE_ENV=test npm run units",