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

Update Meteor stack to 1.6.1.1 #231

Merged
merged 1 commit into from
Jun 2, 2018
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
13 changes: 10 additions & 3 deletions stacks/meteor/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ set -euo pipefail

# Make meteor bundle

METEOR_WAREHOUSE_DIR="${METEOR_WAREHOUSE_DIR:-/home/vagrant/.meteor}"
METEOR_DEV_BUNDLE=$(dirname $(readlink -f "$METEOR_WAREHOUSE_DIR/meteor"))/dev_bundle
export NODE_ENV=production
sudo chown vagrant:vagrant /home/vagrant -R

cd /opt/app
meteor npm install --production
meteor build --directory /home/vagrant/
(cd /home/vagrant/bundle/programs/server && "$METEOR_DEV_BUNDLE/bin/npm" install)
# Use npm and node from the Meteor dev bundle to install the bundle's dependencies.
TOOL_VERSION=$(meteor show --ejson $(<.meteor/release) | grep '^ *"tool":' |
sed -re 's/^.*"(meteor-tool@[^"]*)".*$/\1/g')
TOOLDIR=$(echo $TOOL_VERSION | tr @ /)
PATH=$HOME/.meteor/packages/$TOOLDIR/mt-os.linux.x86_64/dev_bundle/bin:$PATH
cd /home/vagrant/bundle/programs/server
npm install --production

# Copy our launcher script into the bundle so the grain can start up.
mkdir -p /home/vagrant/bundle/opt/app/.sandstorm/
Expand Down
8 changes: 6 additions & 2 deletions stacks/meteor/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
set -euo pipefail

CURL_OPTS="--silent --show-error"
apt-get update
apt-get install -y build-essential git

cd /opt/

PACKAGE=meteor-spk-0.1.8
NODE_ENV=production
PACKAGE=meteor-spk-0.4.1
PACKAGE_FILENAME="$PACKAGE.tar.xz"
CACHE_TARGET="/host-dot-sandstorm/caches/${PACKAGE_FILENAME}"

Expand All @@ -36,7 +39,7 @@ cp -a /lib/x86_64-linux-gnu/libtinfo.so.* /opt/meteor-spk/meteor-spk.deps/lib/x8
# Unfortunately, Meteor does not explicitly make it easy to cache packages, but
# we know experimentally that the package is mostly directly extractable to a
# user's $HOME/.meteor directory.
METEOR_RELEASE=1.1.0.2
METEOR_RELEASE=1.6.1.1
METEOR_PLATFORM=os.linux.x86_64
METEOR_TARBALL_FILENAME="meteor-bootstrap-${METEOR_PLATFORM}.tar.gz"
METEOR_TARBALL_URL="https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/${METEOR_RELEASE}/${METEOR_TARBALL_FILENAME}"
Expand All @@ -55,3 +58,4 @@ cd /home/vagrant/
su -c "tar xf '${METEOR_CACHE_TARGET}'" vagrant
# Link into global PATH
if [ ! -e /usr/bin/meteor ] ; then ln -s /home/vagrant/.meteor/meteor /usr/bin/meteor ; fi
chown vagrant:vagrant /home/vagrant -R