Coder Social home page Coder Social logo

mcdata's Introduction

mcdata

This is an http server for storing and retrieving myCollar settings, using MongoDB for storage.

Setup

mcdata can run on any server or hosting environment where you can run python and access MongoDB.

Ubuntu

Assuming you're running Ubuntu Linux, here are the steps to take to get running:

# Install MongoDB
sudo apt-get install mongodb

# Install python-virtualenv, for putting Python packages into isolated
# environments
sudo apt-get install python-virtualenv

# clone the mcdata repo.  Assumes you have git installed.
git clone https://github.com/nirea/mcdata.git 
cd mcdata

# Create a new virtualenv, enter it, and install the dependencies
virtualenv --no-site-packages env
source env/bin/activate
pip install -r requirements.txt

# Run the program.  Will start on port 5000 by default.  Requires the
# MCDATA_SUPERUSER environment variable
MCDATA_SUPERUSER="some av key" python app.py

# Or run with gunicorn, which lets you start multiple workers.
MCDATA_SUPERUSER="some av key" gunicorn app:app -w 2 -b 0.0.0.0:5000

(Those steps were tested on Oneiric Ocelot, but ought to work all the way back to Lucid Lynx.)

Heroku

mcdata runs nicely on Heroku with the MongoLab addon. You must have a Heroku account, and the Heroku Toolbelt installed. Heroku has good instructions.

Once your account is created and the toolbelt installed, follow these steps:

# clone the mcdata repo.
git clone https://github.com/nirea/mcdata.git 

# Create a Heroku remote
cd mcdata
heroku create --stack cedar  

You should see output like this:

Creating falling-wind-1624... done, stack is cedar
http://falling-wind-1624.herokuapp.com/ | [email protected]:falling-wind-1624.git
Git remote heroku added

The app name there is 'falling-wind-1624'. Yours will be different. You'll need to use it in the next command to finish your git configuration.

git remote add heroku [email protected]:<appname>.git

Just replace with the name given during the 'heroku create' step above.

Set the MCDATA_SUPERUSER environment variable to your av key.

heroku config:add MCDATA_SUPERUSER="some av key"

You probably want to use the MongoLab addon, which has a free "starter" tier that gives you 256MB of storage . IMPORTANT: You'll need to verify your Heroku account before typing this next step.

heroku addons:add mongolab:starter

You're now ready to push the code to Heroku.

git push heroku master 

And start up your process

heroku scale web=1 

mcdata's People

Contributors

nirea avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

raj441977

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.