Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itielshwartz/sanic-nginx-docker-example
Sanic + Nginx + Docker basic example
https://github.com/itielshwartz/sanic-nginx-docker-example
docker docker-compose example nginx sanic skeleton
Last synced: about 1 month ago
JSON representation
Sanic + Nginx + Docker basic example
- Host: GitHub
- URL: https://github.com/itielshwartz/sanic-nginx-docker-example
- Owner: itielshwartz
- Created: 2017-03-18T13:44:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T13:29:03.000Z (about 7 years ago)
- Last Synced: 2024-11-13T13:38:37.130Z (2 months ago)
- Topics: docker, docker-compose, example, nginx, sanic, skeleton
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 86
- Watchers: 5
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-sanic - Sanic-Nginx-Docker-Example - compose. (Resources / Examples)
README
# 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!**
[//]: #URLs
[sanic]:
[nginx]: