Sanic + Nginx + Docker basic example
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
app First commit Mar 18, 2017
nginx First commit Mar 18, 2017
.env First commit Mar 18, 2017
.gitignore First commit Mar 18, 2017
docker-compose.yml First commit Mar 18, 2017 "sanity push to start codeship" Dec 28, 2017

Sanic & Nginx & docker-compose example


Simple and easy to use skeleton-project using Sanic behined nginx.

Using docker and docker-compose to orchestrate everything.

The app is based on the (great) blog-post for flask:

How to run?

  • git clone the project
  • Start a new docker-machine: docker-machine create -d virtualbox sanic;
  • Attach to the machine: eval "$(docker-machine env sanic)"
  • Build the containers (This will take a while for the first time!): docker-compose build
  • Create and start containers: docker-compose up -d

Ok what now?

  • Use docker-machine ip sanic to get the machine IP
  • Go to MACHINE-IP/hello-world or MACHINE-IP/static/index.html and validate everything worked.
  • That's It!


  • /static/* files are served using the nginx.
  • Use the .env file to override or add config values (i override the logo):
    • Just add SANIC_ prefix before var name.


Want to contribute? Great! Feel free to open PR/Issue :)


MIT - Free Software, Hell Yeah!