How does a typical development workflow look when using devilbox?


The simple version of this question is: how do you work on some code using git and devilbox?

The longer version:

We have started to check out devilbox as we have some old expressionengine sites (a bit like codeigniter) that run on older versions of php and mysql, and newer sites running in php7 and newer dbs, and we will need to both maintain the old ones and new ones.

At the moment they sit in various private bitbucket repos, and we think the process would be that a developer working on phpstorm would:

  • check out code from one of the repos,
  • configure devilbox .env to run with that particular flavour of old versions of php/mysql
  • do changes and have a look at them in that devilbox locally
  • push back the code to bitbucket
  • separately, that code would then be deployed to a staging environment once their branch was ready for testing.

So my first question is, once I have my legacy website running via phpstorm, how do I use git and devilbox to edit my branch and run that locally? The only git related info I found was here:

So does this mean my workflow idea can only work if we install devilbox to run in the lan, or can it work the way described above? Sorry if this is a stupid question but I’m quite new to developing with docker in the first place! I found this SE answer but am not sure if it would be the right way (second answer)

A second question is how would you then maintain the database or any related config? Would this be passed around as an docker image, or would it be easier to simply export or note any changes to DB structure outside of git?

Thanks very much!