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