GithubHelp home page GithubHelp logo

itielshwartz / sanic-nginx-docker-example Goto Github PK

View Code? Open in Web Editor NEW
86.0 5.0 18.0 3 KB

Sanic + Nginx + Docker basic example

Python 80.03% HTML 19.97%
sanic docker docker-compose example skeleton nginx

sanic-nginx-docker-example's Introduction

Sanic & Nginx & docker-compose example

About

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: https://realpython.com/blog/python/dockerizing-flask-with-compose-and-machine-from-localhost-to-the-cloud/

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!

Features:

  • /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.

Development

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

License

MIT - Free Software, Hell Yeah!

sanic-nginx-docker-example's People

Contributors

itielshwartz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sanic-nginx-docker-example's Issues

Responsible disclosure policy

Hey there!

I belong to an open source security research community, and a member (@vikychoi) has found an issue, but doesn’t know the best way to disclose it.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

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.