Skip to content

Commit

Permalink
chore: store npm cache on host (#110)
Browse files Browse the repository at this point in the history
# Ticket 🎫

This is part of dot-base/deployments#184

# Description 📖
Changes the npm cache location in the dev-overlay, so that the cache is
stored on the docker host.
  • Loading branch information
velramiir authored Apr 16, 2024
1 parent 438b324 commit e52b8e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# macOS
.DS_Store

# npm
.npm_cache
node_modules
build
/dist
Expand Down
3 changes: 2 additions & 1 deletion dev-overlay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ services:
user: ${USERID}
working_dir: /var/workspace
environment:
HOME: "/tmp" # This is needed so npm can create the cache at the default location ~/.npm
# default npm cache location (~/.npm) is not writeable in the container
npm_config_cache: /var/workspace/.npm_cache
volumes:
- ${DEV_OVERLAY_DIR}:/var/workspace/:cached
ports:
Expand Down

0 comments on commit e52b8e7

Please sign in to comment.