Giter Club home page Giter Club logo

heroku-multi-flask's Introduction

heroku-multiflask

Deploy multiple flask apps to single heroku dyno

Using honcho to deploy multiple flask apps to single heroku dyno.

The flask app "FlaskWrapper" isn't required to just have multiple apps running but, when deployed to heroku, only the one app is ever exposed to the outside. The apps started with honcho don't have to be only flask apps, here is an example of a similar method being used to deploy a node and python app simultaneously.

I'm not really convinced FlaskWrapper will ever really be useful but it at least shows that two flask apps are running on one dyno.

Demo

https://heroku-multiflask.herokuapp.com/

Run Locally

git clone https://github.com/charlesastaylor/heroku-multiflask.git
cd heroku-multiflask
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
honcho start

FlaskWrapper @ localhost:5000

Flask1 @ localhost:5001 or localhost:5000/flask1

Flask2 @ localhost:5002 or localhost:5000/flask2

Deploy to heroku

Using heroku.com and GitHub Integration

Using heroku cli

Assuming the heroku cli is installed (see here if not) and you are autheniticated by using heroku login, the steps to create a new heroku app and deploy this repo would be:

git clone https://github.com/charlesastaylor/heroku-multiflask.git
cd heroku-multiflask
heroku create
git push heroku master

The app will then be accessible at the url outputed in the heroku create step.

heroku-multi-flask's People

Contributors

charlesastaylor 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.