Skip to content

maxfi/shippable-meteor-galaxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

shippable-meteor-galaxy

Inspired by Migrating Meteor Apps from Modulus to Galaxy with Continuous Deployment from Codeship written by @nate-strauser

Use Shippable to deploy to Meteor Galaxy.

Overview

Shippable encourages users to encrypt sensitive data in encrypted environment variables rather than in plain text in their shippable.yml... and rightly so!

The only issue is that can be a real pain to get your Meteor authentication token and Meteor settings, both of which are JSON representations, working in Shippable.

The supplied shippable.yml in this repo helps you with that and will hopefully save you hours of debugging.

Please see @nate-strauser's article Migrating Meteor Apps from Modulus to Galaxy with Continuous Deployment from Codeship for a more details.

Requirements

Meteor settings

meteor_settings.json

{
	"galaxy.meteor.com": {
		"env": {
			"ROOT_URL": "http://www.awesomesite.com",
			"MONGO_URL": "mongodb://USERNAME:[email protected]:12345,candidate.21.mongolayer.com:12345/somedatabase",
			"MONGO_OPLOG_URL": "mongodb://USERNAME:[email protected]:12345,candidate.21.mongolayer.com:12345/local?authSource=somedatabase",
			"MAIL_URL": "smtp://postmaster@awesomesite:[email protected]:587"
		}
	}
}

For more info see Meteor.settings docs

Meteor auth token

On a box where you have meteor installed run:

$ METEOR_SESSION_FILE=meteor_token.json meteor login

to get the meteor_token.json file.

Shippable encrypted environment variable string

In the directory where you have your meteor_settings.json and meteor_token.json files run:

$ node create-env-string.js <hostname>

or if you have your files somewhere else run:

$ node create-env-string.js <hostname> <token-path> <settings-path>

NOTE: hostname is the fully qualified domain name where you're planning to host your application (for example, 'www.awesomesite.com').

Usage

  1. Get your METEOR_SETTINGS and METEOR_TOKEN into the correct format to enter in the encrypted environment variables section on your project's shippable settings page. Use the output from the Shippable encrypted environment variable string section above.

  2. Insert the formatted string in the encrypted environment variables section on your project's shippable settings page and click the encrypt button.

  3. Copy the output to the env section in the shippable.yml.

  4. Copy the updated shippable.yml to your project and enjoy automated Meteor Galaxy deployments. :-)

TODO

About

Shippable with Meteor Galaxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published