Sanic: Is there a deployment guide for heroku? or docker?

Created on 4 May 2017  ·  10Comments  ·  Source: sanic-org/sanic

Most helpful comment

@mrkaspa i've deployed Sanic apps to Heroku numerous times. It's as standard as a flask deployment, Procfile, runtime.txt containing 3.5+, and change the port to os.environ['$PORT'].

All 10 comments

its pretty straight forward to deploy. the web worker will be the main file in which you run the sanic monolith

@mrkaspa i've deployed Sanic apps to Heroku numerous times. It's as standard as a flask deployment, Procfile, runtime.txt containing 3.5+, and change the port to os.environ['$PORT'].

We open sourced this from a project I'm working on: https://github.com/DesignTbl/designtbl-proxy

It's used for modifying CORS headers. You just do git push heroku master to deploy it, assuming you have an heroku origin endpoint named heroku.

@seemethere maybe we should make a deployment section? cc https://github.com/channelcat/sanic/issues/688

@r0fls @seemethere what about a specific example section containing different deployments?

oh derp we already have that: http://sanic.readthedocs.io/en/latest/sanic/deploying.html

well it could help to link to some examples of potential prod deployments (e.g. docker, etc...) from there

@Sniedes722 looks we had the exact same thought at the same time. i think that would be awesome. I personally would like to see:

  • a docker swarm with multiple nodes example
  • a single node docker example (even though i agree that one is quite trivial)
  • a kubernetes example

I'm probably also forgetting some other good options.

oh lambda too, i haven't gotten that to work with or without zappa

@r0fls I opened up #699 for further discussion on this.

let's switch there then :) @mrkaspa feel free to reopen if you're still having issues deploying to docker or heroku and we can give you more help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aiurlano picture aiurlano  ·  4Comments

Souldat picture Souldat  ·  3Comments

misakar picture misakar  ·  4Comments

eseglem picture eseglem  ·  4Comments

jasonab picture jasonab  ·  3Comments