Giter Site home page Giter Site logo

adellahlou / meteor-openshift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sachinbhutani/meteor-openshift

0.0 3.0 0.0 157 KB

Meteor 1.2 cartridge to run meteor applications on OpenShift

License: MIT License

Shell 50.60% HTML 22.47% JavaScript 26.93%

meteor-openshift's Introduction

Fork is being maintained for Northwestern SESP IT

Run Meteor 1.2 on Red Hat's OpenShift PaaS

This git repository is a sample Meteor base cartidge with can be used with your Meteor application to run it on openshift.com PaaS platform

The catridge would install NodeJS version 0.10.40

Step 0

  1. Create on Openshift account at http://openshift.com/
  2. Install rhc tools to manage your openshift account : https://developers.openshift.com/en/managing-client-tools.html

Step 1 - Get NodeJS v0.10.40 running on your openshift app

Create a new application mynodeapp in your openshift login control panel using the standard NodeJS 0.10 cartrige. You may choose to add auto-scaling while setting this up. Choosing autoscaling would add an HAProxy instance you your application.

Now clone the git URL available on your application page to your local system

git clone SOURCE_CODE_URL  mylocalnodeapp

Add this github meteor-openshift repository to mylocalnodeapp

cd mylocalnodeapp
git remote add upstream -m master git://github.com/sachinbhutani/meteor-openshift.git
git pull -s recursive -X theirs upstream master

Then commit and push the repo to OpenShift

git add --all
git commit -a -m 'nodejs'
git push

You should now have a NodeJs version 0.10.40 application running at:

http://mynodeapp-mydomain.rhcloud.com
( See env @ http://mynodeapp-mydomain.rhcloud.com/env )

Check the URL http://mynodeapp-mydomain.rhcloud.com/env and save the environment variables to a local file. You may need some of them if something goes wrong.

Step 2 Setup Mongo DB 3.0

On your application page go to the link "See the list of cartridges you can add", paste the URL below in "Install your own cartridge" textbox at the bottom of the page and click "Next".

    http://cartreflect-claytondev.rhcloud.com/github/icflorescu/openshift-cartridge-mongodb

Alternatively if you like to use another MongoDB database hosts like http://compose.io or http://mongolab.com/ You would need to update the meteorshim.js file as described in the next section with a MONGO_URL if you plan to use an external MongoDB host.

Step 3 Update env variables

Update the file meteorshim.js to use your own MONGO_URL env variable. MAIL_URL and other env variables may also be added as needed.

Step 4 Adding your Meteor App

Build your meteor app and un-bundle it into the mylocalnodeapp directory for pushing to OpenShift

The following steps need to be repeated each time you want to push an updated version of your meteor app to openshift. You may create a shell script for it in your meteor repo

Assuming your awesome meteor app repo is in dir mymeteorapp

cd mymeteorapp 
meteor build tarball
cp tarball/mymeteorapp.tar.gz ~/path/to/mylocalnodeapp
rm tarball/mymeteorapp.tar.gz
cd ~/path/to/mylocalnodeapp
tar -xvf mylocalnodeapp.tar.gz -s '/^bundle//'
rm mymeteorapp.tar.gz
git add --all
git commit -a -m 'meteor-openshift'
git push

After a lot of messages from the remote server, your awesome Meteor app should be finally running at http://mynodeapp-mydomain.rhcloud.com


This repo has not been throughly tested, please report any issues or suggest improvements.

meteor-openshift's People

Contributors

sachinbhutani avatar ramr avatar adellahlou avatar ekuiter avatar kanakiyajay avatar

Watchers

James Cloos avatar  avatar  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.