Adding a Flask App to Trellis

Hi All,

So i know this has kind of been covered in Discourse as is but I don’t want to eff-up a perfectly working Trellis install so thought i’d ask the community first.

I’ve built a Flask/SQLalchemy API to provide some AJAX endpoints to my Trellis/Bedrock/Sage setup. I’d love to manage it alongside what i have on the same DO droplet and environments since it’s part and parcel of my Sage development.

No doubt, the config is all in the ansible space but I’m concerned about blasting anything that is Trellis/Wordpress bound. Any tips? I’ll need to provision the source files, dependencies with pip and Flask runs it’s own webserver and routing so i guess that’s not a factor?

Well since you already have the ability to spin up new identical servers, why not try to get it working on your local box, spin up a staging or test server and make sure it works on DO, then do it on production, or even spin up a new production box.

Sharing my progress for what it’s worth. The net result is that i’ve had to ditch the effort to integrate it into my trellis ansible deploy. It was totally feasible until discovering that python3 support only comes in on ansible 2.2 which is in tech preview.
Since my app was built in python3, cos it’s 2017, I either have to refactor for python2 or upgrade ansible (and fork away from trellis master) or not manage through ansible.
I’m choosing the latter for the time being until I can refactor to Py2 and get into trellis deploy.