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

Add HTTP_PROXY during build + fix 2 bugs in fibers and minifer modules #113

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ ONBUILD ENV INSTALL_GRAPHICSMAGICK $INSTALL_GRAPHICSMAGICK
ONBUILD ARG TOOL_NODE_FLAGS
ONBUILD ENV TOOL_NODE_FLAGS $TOOL_NODE_FLAGS

# Add option to specify http and https proxies if needed during build
ONBUILD ARG HTTP_PROXY
ONBUILD ARG HTTPS_PROXY
ONBUILD ENV HTTP_PROXY $HTTP_PROXY
ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY

# optionally custom apt dependencies at app build time
ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi

Expand Down
6 changes: 6 additions & 0 deletions dev.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ ONBUILD ENV INSTALL_PHANTOMJS ${INSTALL_PHANTOMJS:-true}
ONBUILD ARG INSTALL_GRAPHICSMAGICK
ONBUILD ENV INSTALL_GRAPHICSMAGICK ${INSTALL_GRAPHICSMAGICK:-true}

# Add option to specify http and https proxies if needed during build
ONBUILD ARG HTTP_PROXY
ONBUILD ARG HTTPS_PROXY
ONBUILD ENV HTTP_PROXY $HTTP_PROXY
ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY

# optionally custom apt dependencies at app build time
ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi

Expand Down
11 changes: 11 additions & 0 deletions scripts/build-meteor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ cd $APP_SOURCE_DIR
printf "\n[-] Running npm install in app directory...\n\n"
meteor npm install

# Removing buggy minifier package, to make build faster, more stable, low impact on final size
# see: https://github.com/meteor/meteor/issues/5329
printf "\n[-] Removing buggy minifier...\n\n"
meteor remove standard-minifier-js

# build the bundle
printf "\n[-] Building Meteor application...\n\n"
mkdir -p $APP_BUNDLE_DIR
Expand All @@ -31,6 +36,12 @@ printf "\n[-] Running npm install in the server bundle...\n\n"
cd $APP_BUNDLE_DIR/bundle/programs/server/
meteor npm install --production

# fix fibers bug - error in PATH bug hitting node>8.x..
# see: https://github.com/jshimko/meteor-launchpad/issues/92
printf "\n[-] Fixing Fibers PATH bug in node>8.x...\n\n"
cd $APP_BUNDLE_DIR/bundle/programs/server/
npm remove fibers && npm install fibers

# put the entrypoint script in WORKDIR
mv $BUILD_SCRIPTS_DIR/entrypoint.sh $APP_BUNDLE_DIR/bundle/entrypoint.sh

Expand Down