How do I deploy my code?

The job Deploy will run this following commands :

  1. Download source code from your git repository and copy it into a new release directory with the timestamp (path : /srv/www/app_type/releases). 
  2. Set environment variables defined by the developer on the server.
  3. Set write permission to all files and directories in the release.
  4. Generate application configuration files (for instance, wp-config.php for Wordpress or env.php for Magento 2).
  5. If composer.json file is found, it will install dependencies.
  6. Execute custom pre-deploy script (HOOK).
  7. Execute specific application deploy script. For instance for Magento 2: 
    1. If config.php not found, we run bin/magento module:enable -all
    2. php bin/magento maintenance:enable
    3. php bin/magento deploy:mode:set mode -s
    4. php bin/magento setup:upgrade
    5. if mode PROD, php bin/magento setup:di:compile
    6. If mode PROD, php bin/magento setup:static-content:deploy en_US fr_FR
    7. php bin/magento cache:clean
    8. php bin/magento maintenance:disable
  8. Execute custom post-deploy script (HOOK).
  9. Mount directories shared between releases (for instance /media directory).
  10. Switch the current symlink to the new release directory (the new code is online).
  11. Remove old releases. By default, we only keep the 5 previous releases (see How do I change the number of releases ?).
  12. Restart Apache2 or Nginx+PHP-FPM and reload OpCache.
  13. Deploy is finished.

 

Job details view:Screenshot_2019-10-28_at_17.18.11.png

 

Was this article helpful?
1 out of 1 found this helpful