A faster route to deploying static content in Magento 2? Dev to Live etc?

前端 未结 8 655
名媛妹妹
名媛妹妹 2021-01-30 07:02

This is my environment. Please note this is also set in the relevant development modes and production modes.

Dev:
https://ar.dev.loc/
https://en.dev.loc/

Live:
         


        
相关标签:
8条回答
  • 2021-01-30 08:03

    In our company we manage Magento2 deploys by using Capistrano, there is also a specific taks set for Magento 2 that works very well.

    With capistrano you configure your webserver root to point to a symlink that points to a "release" folder. When you start a deploy all the compiling (di, static contents, ecc) is made on a separated folder so your online website isn't affected and remains online. At the end of the procedure, and only if there are no errors, the symlink is switched to the new release.

    In this way there downtime is usually zero or reduced to a couple of seconds.

    Capistrano also provides a basic "rollback" feature that allows to quickly revert to an old release if something goes wrong.

    0 讨论(0)
  • 2021-01-30 08:06

    I am not familiar with magneto but this may work for you. When I update my sites I follow those steps:

    Suppose the site is located under site directory.

    $ cp -r site site-update
    
    # update the site in site-update directory
    
    $ mv site site-old && mv site-update site
    

    This way my sites are updated without any downtime.

    0 讨论(0)
提交回复
热议问题