Last active
May 27, 2016 10:56
-
-
Save jhgaylor/ef5f2748b7b9b94ded46 to your computer and use it in GitHub Desktop.
A script for deploying a meteor application to modulus.io using codeship.io for CI. Useful if your meteor app is not at the root of your repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# assumes a clean install on a fresh linux box. | |
# for use w/ codeship.io | |
set -e | |
set -u | |
# a reference to the cloned repository's path | |
PWD=`pwd` | |
METEOR_APP_PATH="$PWD/MeteorApp" | |
MODULUS_PROJECT_NAME=_YOUR_PROJECT_NAME_ | |
MODULUS_TOKEN=_YOUR_API_TOKEN_ | |
### Install Meteor & Meteorite | |
# https://gist.github.com/mlocher/1f872bd9842a5c7ad136 | |
curl https://install.meteor.com > ./install_meteor | |
# modify the install script to | |
sed -i'' -e 's/PREFIX=.*/PREFIX="$HOME"/g' ./install_meteor | |
chmod u+x ./install_meteor | |
./install_meteor | |
# add meteor to the path | |
export PATH=$PATH:"$HOME/.meteor" | |
# install meteorite | |
npm install -g meteorite | |
### Meteor finished installing | |
### Deply to modulus | |
npm install -g modulus | |
export MODULUS_TOKEN=$MODULUS_TOKEN | |
cd $METEOR_APP_PATH | |
modulus deploy -p $MODULUS_PROJECT_NAME | |
### Deploy to modulus finished | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see this script is a couple of year old. I have recently been trying to deploy a Meteor 1.3 app from CodeShip to Modulus. However, I am encountering the problem in this following forum post (despite having used a custom script to use the latest Modulus version as the post advises):
https://forums.meteor.com/t/modulus-deployment-error-mnt-input-meteor-directory-must-exist/22533
tl;dr: a /mnt directory is not available (which seems to be an issue with the Modulus tool)
I am able to deploy from my dev machine (OS X Mavericks) using the process described in the post but it still fails on CodeShip (ticket in with their service desk).
I am wondering if the above would resolve the issue if I were to use the above.
UPDATE:
Issue resolved. The latest Modulus deployment process (Version 6 - mentioned in the above link) requires your bundle to have the .meteor directory (which was not being included with my GitHub checkin). This now works: GitHub => CodeShip => Modulus (for Meteor 1.3). Details on:
http://blog.modulus.io/the-new-meteor-build-image
Specifically the section around FILE STRUCTURE.