Files
fission-src/environments/python3/README.md
T
Damien GoujardandSoam Vasani 2725da6b1b Add initial support for PHP7 (#97)
* Add initial support for PHP7

* Update PHP env with now an PSR3 logger (Monolog). Now you can also create a handler function with PSR7 Http message and PSR3 logger in parameter.

* Add examples for PHP7 environement

* For development you can create a function in this path /app/userfuncdev.php it will be loaded

* Switch to alpine base image

* handler now receive an array with request, response and logger object
2017-02-02 11:28:28 -08:00

1.4 KiB

Fission: Python Environment

This is the Python environment for Fission.

It's a Docker image containing a Python 3.5 runtime, along with a dynamic loader. A few common dependencies are included in the requirements.txt file.

Customizing this image

To add package dependencies, edit requirements.txt to add what you need, and rebuild this image (instructions below).

You also may want to customize what's available to the function in its request context. You can do this by editing server.py (see the comment in that file about customizing request context).

Rebuilding and pushing the image

You'll need access to a Docker registry to push the image: you can sign up for Docker hub at hub.docker.com, or use registries from gcr.io, quay.io, etc. Let's assume you're using a docker hub account called USER. Build and push the image to the the registry:

   docker build -t USER/python-env . && docker push USER/python-env

Using the image in fission

You can add this customized image to fission with "fission env create":

   fission env create --name python --image USER/python-env

Or, if you already have an environment, you can update its image:

   fission env update --name python --image USER/python-env   

After this, fission functions that have the env parameter set to the same environment name as this command will use this environment.