This could be one kind of discussion more than a question.
I’d like to know which deployment policy you follow with Magento2 & local > staging > production environments
After some tries we’ve decided the best (or at least, the most solid) approach would be this gitignore file including vendor folder in git.
So we run composer only in local environment: As any new extension, or software upgrade is tested in local, then validated and committed. We’d probably then include app/etc/config.php file in git too but that file is rewriten when running
Including vendor means repository size will be bigger than (maybe) recommended but this way when deploying code, we just run the sequence:
bin/magento setup:di:compile (optional)
See why we choose compile command as optional Magento 2 – setup:di:compile ?
The truth is we are having some problems when deploying code changes in our published Magento 2 projects
Changes work in local & staging (checked in both modes: developer & production… although we conceptually configure that environments in developer mode), but some of them don’t work in production environment (in production mode), etc… so I am not sure we are following the right strategy. I’d like to see what’s the appropriated command sequence, and the relevance of the order in that commands
In fact, every day I am less convinced about the utility of Magento 2 production mode, unless you are not going to change anything in the project. Can you change my mind?
Get this bounty!!!