#!/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 | |
The gui for the Modulus integration is great if your meteor app is in the root of your repo, but deploys as a node app if you have it in a subdirectory. Using this script you can keep your app anywhere in the repo.
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.
This is great, thank you!
Just an FYI to anyone else coming across this, Codeship now has a gui for their Modulus integration. However, you still need to add lines 14-27 (place in the Test section of the gui):