Skip to content

Commit

Permalink
[Symfony] Add dump-env task (#3856)
Browse files Browse the repository at this point in the history
* [Symfony] Add dump-env task

Add task to run dump-env on deployment

* docgen

* Run command in current path
  • Loading branch information
richardhj authored Oct 3, 2024
1 parent 15ce6fe commit 70e27b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/recipe/symfony.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down
7 changes: 7 additions & 0 deletions recipe/symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 70e27b4

Please sign in to comment.