Add Flask-WSGI routes to DDEV-Drupal project

38 Views Asked by At

I have a ddev-Drupal project and want to add web-routing for my python-flask project. Ideally something like this: https://github.com/docker/awesome-compose/tree/master/flask-redis - or maybe with gunicorn? In the end i want the flask-app to run at http:myproject.ddev.site:5000 or similar...

1

There are 1 best solutions below

2
rfay On

My recommendation would be to use two projects, one for your Drupal PHP project, and the other for your flask project.

They can easily communicate with each other as described in the FAQ

The Drupal project is just standard, easy setup, per the quickstart docs.

Your Flask project can also be set up using the quickstart docs

Now wire them together and it should be OK. Come on by the DDEV Discord if you need more interactive help. This is an unusual configuration!

Edit: I'm not sure why you'd be using flask for Redis. Have you checked out the ddev-redis add-on? https://github.com/ddev/ddev-redis