diff --git a/docs/recipe/symfony.md b/docs/recipe/symfony.md index 8561a0cda..36a84d7c6 100644 --- a/docs/recipe/symfony.md +++ b/docs/recipe/symfony.md @@ -176,9 +176,17 @@ Clears cache. -### deploy +### deploy:env [Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L66) +Optimize environment variables. + + + + +### deploy +[Source](https://github.com/deployphp/deployer/blob/master/recipe/symfony.php#L73) + Deploys project. diff --git a/recipe/symfony.php b/recipe/symfony.php index 076c3581c..77149d1cf 100644 --- a/recipe/symfony.php +++ b/recipe/symfony.php @@ -62,6 +62,13 @@ } }); +desc('Optimize environment variables'); +task('deploy:env', function () { + within('{{release_or_current_path}}', function () { + run('{{bin/composer}} dump-env "${APP_ENV:-prod}"'); + }); +}); + desc('Deploys project'); task('deploy', [ 'deploy:prepare',