Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chhantyal/flask-docker
Fastest way to ship Python web apps, anywhere. Be shipping 🚀 (using Docker, Flask, Gunicorn, Whitenoise)
https://github.com/chhantyal/flask-docker
Last synced: 2 months ago
JSON representation
Fastest way to ship Python web apps, anywhere. Be shipping 🚀 (using Docker, Flask, Gunicorn, Whitenoise)
- Host: GitHub
- URL: https://github.com/chhantyal/flask-docker
- Owner: chhantyal
- License: bsd-3-clause
- Created: 2018-01-03T16:02:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T09:24:09.000Z (almost 7 years ago)
- Last Synced: 2024-10-12T07:25:15.552Z (3 months ago)
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 50
- Watchers: 4
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flask-docker
Fast and easy way to ship Python web apps, anywhere. Be shipping 🚀Building apps using Python is fun.
But shipping them, not so much (unlike PHP & NodeJS, which are supported almost everywhere)
However, Docker makes it really easy, here is how:- `Flask`: Web app framework. You could take any other WSGI framework
- `Gunicorn`: Production grade App server for Python
- `Whitenoise`: Serving static files (js, css, images etc)
- `Docker`: Contenarize codebase + all of the above tech to ship## Try
You can try sample Flask app container from Docker Hub.
For that, you don't need to clone this git source.- `docker pull chhantyal/flask-docker`
- `docker run -p 8000:8000 flask-docker`## Ship
In few steps, you can run on local, your colleague's local, AWS, Azure, anywhere.
Docker Container -> Container Registry -> Cloud
First build container:
* `docker build . -t flask-docker:latest`Test local container:
* Run: `docker run -p 8000:8000 flask-docker:latest`
* Open: `http://localhost:8000`If you want to deploy in the cloud:
* Tag it: `docker tag flask-docker:latest container_registry.com/flask-docker:latest`
* Push to remote container registry: `docker push container_registry.com/flask-docker:latest`
* Run in remote server: `docker run -d -p 80:8000 flask-docker:latest`See `Dockerfile` ✨🍰✨