Python Flask on the devilbox

Hi,

I am currently working on a Python project using Flask and wanted to ask If I can somehow get this to work with the devilbox.

My goal is to use devilbox both for my php and python projects. Any help appreciated.

This should work very well already.

uswgi

As far as I know Python requires the uwsgi server to run, which will be responsible to interpret the Python code. Uswgi will beed to be configured and started during docker-compose up via: https://devilbox.readthedocs.io/en/latest/autostart/custom-scripts-per-php-version.html#

Reverse Proxy

The next step is to configure your vhost as a reverse proxy to route back to uwsgi. This will even make it available in the Devilbox intranet then. See here for details: https://devilbox.readthedocs.io/en/latest/reverse-proxy/reverse-proxy-with-https.html

Other example

I’ve already added an example for NodeJS, which is exactly the same, only of course you need to run uwsgi instead of node: https://devilbox.readthedocs.io/en/latest/autostart/autostarting-nodejs-apps.html


Let me know if this was clearly described and works for you.

There is now official Python Flask support. See here: Devilbox v1.7.0 released