Giter VIP home page Giter VIP logo

Comments (5)

danslo avatar danslo commented on May 31, 2024

You should commit app/etc/config.php to version control anyway. Not sure if this is something that belongs in deployment.

from capistrano-magento2.

davidalger avatar davidalger commented on May 31, 2024

@chaohe There are no plans for this currently, sorry.

The gem expects the app/etc/config.php file to be committed to the project repository, and that file exists solely for the purpose of maintaining module enabled/disabled state.

The reason it spits out a list of disabled modules on deploy is so that you will know if you've forgotten to run module:enable and commit the config.php changes prior to deploy.

A couple benefits of this are:

  1. You can deploy with certain modules disabled.

  2. We can deploy with near zero downtime, as the db upgrade commands can be run after all the static content generation has occurred.

  3. It ensures all servers in deployments to multiple app servers end up with exactly the same code.

currently what we are doing is just running the deploy without enabling the module, then going directly into the release folder and running the module-related commands again. very clunky and totally defeats the purpose of the awesomeness of capistrano. any thoughts?

Before deploying a module, run the module:enable and commit the changes made to app/etc/config.php. Doing this will ensure the module is enabled on deploy.

You shouldn't have to run anything by hand on the remote server for a deployment, with the exception of having to add an entry to the database for new themes in some cases due to Magento not handling that correctly (see issue #63). We've been using this process for over a year on dozens of M2 sites without any problems. :)

from capistrano-magento2.

chaohe avatar chaohe commented on May 31, 2024

@davidalger thanks for explaining. just so i'm understanding correctly, is this your flow?

1.) run module:enable locally, commit all app/ files plus config.php change enabling module
2.) during deployment, static-content:deploy is run first, but it will actually generate static content for the new module (even though the module commands like module:enable and setup:upgrade haven't been run yet)
3.) the setup:upgrade step with MODULE => 1 in the config.php file turns the module on and the new module will work upon deployment completion.

i suppose the 2nd point is where my understanding was lacking?

from capistrano-magento2.

davidalger avatar davidalger commented on May 31, 2024

@chaohe That's pretty much it, yes. If a module is listed in config.php, it's considered enabled. So if it is listed in config.php and the db upgrade commands are run (the gem is actually running setup:db-schema:upgrade and setup:db-data:upgrade vs setup:upgrade) then it is correctly installed / upgraded along with all the other modules.

from capistrano-magento2.

chaohe avatar chaohe commented on May 31, 2024

Confirmed, that worked! Thanks a ton :)

from capistrano-magento2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.