diff --git a/Dockerfile b/Dockerfile index 3e7f1c4..4dd04c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:jessie +FROM debian:stretch MAINTAINER Jeremy Shimko RUN groupadd -r node && useradd -m -g node node @@ -28,7 +28,7 @@ ONBUILD ARG APT_GET_INSTALL ONBUILD ENV APT_GET_INSTALL $APT_GET_INSTALL ONBUILD ARG NODE_VERSION -ONBUILD ENV NODE_VERSION ${NODE_VERSION:-8.9.0} +ONBUILD ENV NODE_VERSION ${NODE_VERSION:-10.15.3} ONBUILD ARG NPM_TOKEN ONBUILD ENV NPM_TOKEN $NPM_TOKEN diff --git a/scripts/build-meteor.sh b/scripts/build-meteor.sh index 79a0f30..91ff8c9 100755 --- a/scripts/build-meteor.sh +++ b/scripts/build-meteor.sh @@ -23,7 +23,7 @@ cd $APP_SOURCE_DIR # Install app deps printf "\n[-] Running npm install in app directory...\n\n" -meteor npm install +meteor npm install && meteor npm install bcrypt # build the bundle printf "\n[-] Building Meteor application...\n\n" @@ -40,3 +40,6 @@ mv $BUILD_SCRIPTS_DIR/entrypoint.sh $APP_BUNDLE_DIR/bundle/entrypoint.sh # change ownership of the app to the node user chown -R node:node $APP_BUNDLE_DIR + +# Workaround with missing fiber binary. Remove and re-install +npm uninstall fibers && npm install fibers diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh index ef10605..1abb218 100755 --- a/scripts/install-deps.sh +++ b/scripts/install-deps.sh @@ -10,7 +10,7 @@ apt-get update # ensure we can get an https apt source if redirected # https://github.com/jshimko/meteor-launchpad/issues/50 -apt-get install -y apt-transport-https ca-certificates +apt-get install -y apt-transport-https ca-certificates gpg if [ -f $APP_SOURCE_DIR/launchpad.conf ]; then source <(grep APT_GET_INSTALL $APP_SOURCE_DIR/launchpad.conf) @@ -33,7 +33,18 @@ wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/downloa export GNUPGHOME="$(mktemp -d)" -gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +key="B42F6819007F00F88E364FD4036A9C25BF357DD4" + +# Try different key servers in case one is unresponsive +# See: https://github.com/bodastage/bts-ce-database/issues/1 +for server in ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu; do + gpg --keyserver "$server" --recv-keys "${key}" && break || echo "Trying new server..." +done + gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc