docker-pythonapp/README.md

24 lines
817 B
Markdown
Raw Normal View History

2015-06-13 23:56:17 -07:00
Docker Pythonapp
================
2015-06-14 00:04:35 -07:00
For running uWSGI python3 apps.
2015-06-13 23:56:17 -07:00
**Usage:**
* build image: `docker build -t pyapp .`
* build a python3 app. for example, in a folder called testapp
2015-06-14 00:10:04 -07:00
* `testapp/app.py` is the main wsgi file. var `application` must be a wsgi callable.
2015-06-13 23:56:17 -07:00
* testapp/requirements.txt is used by pip to install required modules
* app/static will be mapped to http://server.address/static/
2015-06-14 00:04:35 -07:00
* run container: `docker run -p 80:80 -v /localpath/to/appdir/:/home/python/app/ pythonapp`
2015-06-13 23:56:17 -07:00
**Example app:**
http://gitlab.xmopx.net/dave/example-uwsgi-app/tree/master
2015-06-14 00:04:35 -07:00
**TODO**
* Figure out a way to run apps in "test" mode (I.E. CherryPy / Flask builtin server w/ debug mode)
* Easier way to change uwsgi ini file. (Maybe, override defaults if appdir/uwsgi.ini is present?)
* Multiple apps in a single container?