Skip to content

Commit

Permalink
feat(docker): add download script separate from npm
Browse files Browse the repository at this point in the history
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 pelias/pelias#745
  • Loading branch information
orangejulius committed Sep 21, 2018
1 parent 9575c59 commit 64a0f3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions bin/download
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exec node utils/download_data.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 64a0f3f

Please sign in to comment.