Code Monkey home page Code Monkey logo

shippable-meteor-galaxy's Introduction

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

shippable-meteor-galaxy's People

Contributors

maxfi avatar

Watchers

James Cloos avatar Martin Eboh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.