Happyculture / combawa

Helper to set up Drupal projects and build them all along their life.
GNU General Public License v3.0
14 stars 2 forks source link

Remove dependency on Composer on prod? #101

Closed Artusamak closed 2 years ago

Artusamak commented 2 years ago

In an ideal world, we build project sources on an environment and then deploy the buit files to a production server. In such a use case, we should try to avoid having to use Composer on the production server. There is no obvious need for it there in order for the website to be functional at run time.

We are using it in dev/compilation mode to generate the environment file, that's fine. The problem is that we need it at run time when we try to deploy. We are doing a prerequisite check if the build mode is defined in the composer.json file and then we evaluate the real value during Combawa build.

If we put this value back into the .env file, we might get a chance to remove the dependency on our prod server. This might be going backward to a discussion we already had about this variable being in the .env file or not if i remember correctly.

Artusamak commented 2 years ago

Thanks for the one liner, it works! :)