Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: fix npm cache clear #355

Merged
merged 5 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ RUN apk update \
&& apk add ${BUILD_PACKAGES} \
&& mkdir -p /root \
&& mkdir -p /app \
&& npm config set unsafe-perm true \
&& npm install -g npm@4 \
&& npm install -g node-gyp@latest \
&& node-gyp install \
&& $METEORD_DIR/build_app.sh \
&& $METEORD_DIR/rebuild_npm_modules.sh \
&& apk del --purge ${BUILD_PACKAGES} \
&& $METEORD_DIR/clean-final.sh

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
}
}
},
"resolutions": {
"elliptic": "^6.5.3"
},
"scripts": {
"preinstall": "npx npm-force-resolutions",
"start": "meteor run",
"debug": "meteor run --inspect",
"lint": "run-s eslint yamllint jsonlint dockerlint markdownlint",
Expand Down
26 changes: 4 additions & 22 deletions private/scripts/build_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,7 @@

set -e

if [ -d /bundle ]; then
cd /bundle
tar xzf *.tar.gz
cd /bundle/bundle/programs/server/
npm install
cd /bundle/bundle/
elif [[ $BUNDLE_URL ]]; then
cd /tmp
curl -L -o bundle.tar.gz $BUNDLE_URL
tar xzf bundle.tar.gz
cd /tmp/bundle/programs/server/
npm install
cd /tmp/bundle/
elif [ -d /app ]; then
cd /app
cd /app/programs/server/
npm install
cd /app
else
echo "=> You don't have an meteor app to run in this image."
exit 1
fi
cd /app
cd /app/programs/server/
npm install
cd /app
3 changes: 1 addition & 2 deletions private/scripts/clean-final.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

set -e

npm uninstall -g node-gyp
npm cache clear
npm cache clear --force

rm -rf $METEORD_DIR/bin /usr/share/doc /usr/share/man /tmp/* /var/cache/apk/* \
/usr/share/man /tmp/* /var/cache/apk/* /root/.npm /root/.node-gyp #/usr/lib/node_modules/npm
89 changes: 0 additions & 89 deletions private/scripts/rebuild_npm_modules.sh

This file was deleted.