Code Monkey home page Code Monkey logo

any-saas's Introduction

any-saas

The premise behind any-saas is more an implementation of something theoretical than it is practical to use.

In July, a site called Try RethinkDB was launched. The premise? Using http://docker.io containers, it was very simple to create a SaaS to allow people to use your software without any upfront investment. All a user had to do was click a button for their own sandboxed environment.

So, what is this?

Using this package will allow you to have a starting point for creating your own SaaS for any Docker image of your choice.

I recently modified it (and the template shows) to be a MongoDB SaaS by default. In about 15 lines of code.

Code Review

api.py is the main entrypoint. This code ensures the environment has been configured properly or exits if it hasn't. It sets up a main flask app and then starts it on port 5000 (defualt)

api.new()

You could say here's where the magic happens. Using http://github.com/dotcloud/docker-py we connect to the configured DOCKER_HOST to instantiate and get some information about a new Docker container.

Right now, dynamic routing is managed by http://github.com/dotcloud/hipache - my favorite reverse proxy.

Configuration is managed by Redis, and adding the route is as simple as rpushing some values to a key.

launch

This file makes a few assumptions:

  1. You're using hipache
  2. You're deploying any-saas as a container (named trymongo-website)

Other than that, modifying a few keys is all that's needed to make your own mongodb SaaS work out of box.

Bitdeli Badge

any-saas's People

Contributors

bitdeli-chef avatar cglewis avatar keeb avatar

Watchers

 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.