Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Add ability to use npm through docker-compose #488

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ services:
working_dir: /usr/src/app/frontend_build/
entrypoint: ../devops/deps_ok_then ./node_modules/.bin/grunt

npm:
image: node:6
volumes:
- $PWD:/usr/src/app
- npm_libs:/usr/src/app/frontend_build/node_modules/
working_dir: /usr/src/app/frontend_build/
entrypoint: ../devops/deps_ok_then npm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NBD, but one potential improvement would be to remove the duplication with YAML references. It'd look something like:

grunt: &NODE
    image: node:6
   ...
npm:
    <<: *NODE
    entrypoint: ../devops/deps_ok_then npm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is sitting here because I want to implement this before merging. If you think I should just merge, lmk.


volumes:
database_data:
prod_libs:
Expand Down