This is a generic Python engine used to launch Python web and worker services when using Nanobox.
To detect a Python app, this engine looks for a requirements.txt
.
- Installs
virtualenv
to create an isolated Python environment in which to build code. - In the Python environment, the engine installs requirements by running
pip install -r requirements.txt
. Requirements are installed in the project rather than globally.
- In order for the enine to know how to start the app, you must provide the
app_module
or aexec
in your web config. - This engine uses the Gunicorn web server. Granular Gunicorn config settings are available in the Advance Config Options.
This engine exposes configuration options through the Boxfile, a yaml config file used to provision and configure your app's infrastructure when using Nanobox.
This Readme outlines only the most basic and commonly used settings. For the full list of available configuration options, view the Advanced Python Configuration options.
build:
runtime: python27
js_runtime: nodejs-0.12
app_module: ''
Pyton Settings
JS Runtime Settings
Gunicorn Settings
The following setting allows you to define your Python runtime environment.
Specifies which Python runtime and version to use. The following runtimes are available:
- python27
- python 34
build:
runtime: python27
Many applications utilize Javascript tools in some way. This engine allows you to specify which JS runtime you'd like to use.
Specifies which JS runtime and version to use. The following runtimes are available:
- nodejs-0.8
- nodejs-0.10
- nodejs-0.12
- iojs-2.3
build:
js_runtime: nodejs-0.12
The following settings allow you to configure Gunicorn.
Of the pattern $(MODULE_NAME):$(VARIABLE_NAME)
. The module name can be a full dotted path. The variable name refers to a WSGI callable that should be found in the specified module.
# Example
build:
app_module: 'test:app'
This is a generic (non-framework-specific) Python engine provided by Nanobox. If you need help with this engine, you can reach out to us in the #nanobox IRC channel. If you are running into an issue with the engine, feel free to create a new issue on this project.