Include recipe in deploy.php
file.
require 'recipe/shopware6.php';
The recipe extends the symfony recipe of core deployer, so you have to include this recipe in deploy.php
too:
require 'recipe/symfony.php';
-
Update shared dirs + parameters from repo - see: update_shared
before('deploy:shared', 'deploy:update_shared_dirs');
Default dirs:
['custom/plugins', 'files']
set('shared_files', []); before('deploy:shared', 'deploy:stage_specific_files');
Attention: The shared files may have to be reset!
Example for
.env
files (.env.ci_{{stage}}
)set('stage_specific_files', [ [ 'source' => '.env.ci_{{stage}}', 'target' => '.env', 'delete' => '.env.*' ] ]);
before('deploy:update_shared_dirs', 'deploy:clear_shared_dirs');
-
For Gitlab-CI see: gitlab_ci
-
Clear cache
after('deploy:symlink', 'deploy:cache_status_clear'); after('deploy:symlink', 'deploy:opcache_reset'); // don't forget to set `public_url` per stage
-
build
- build project withbuild:composer, shopware:build:recovery, shopware:build:js
-
shopware:build:recovery
- build shopware recovery (called whilebuild
) -
shopware:build:js
- build shopware Javascript (called whilebuild
) -
shopware:install:lock
- touch shopwareinstall.lock
(called beforedeploy:vendors
) -
shopware:bundle:dump
- dump bundle config (called beforedeploy:vendors
) -
shopware:generate-jwt-secret
- generate JWT Secret, if it does not exist (called afterdeploy:vendors
) -
shopware:asset:install
- install assets (called afterdeploy:vendors
) -
shopware:compile:theme
- compile shopware theme (called afterdeploy:cache:clear
) -
shopware:migrate
- migrate shopware database -
shopware:cache:warmup
- warmup shopware http cache (called afterdeploy:cache:warmup
)