-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Symfony] Add dump-env task #3856
Conversation
Add task to run dump-env on deployment
run('{{bin/composer}} dump-env "${APP_ENV:-prod}"'); | ||
}); | ||
}); | ||
|
||
desc('Deploys project'); | ||
task('deploy', [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to dump env on every deployment, you should add it to the deploy
task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do it in my project :) But it's nothing for the recipe IMHO
@richardhj Was it good idea? How can you do
|
dump-env is a symfony/flex utility - maybe that's the issue here? |
Yeah, but now, |
Ok, this is an ugly naming conflict that was unnoticed until now because the Symfony recipe in fact overrides the common.php's |
Which is actually a problem for us: #3938 |
Add task to run dump-env on deployment
Bug fix #…?
New feature?
BC breaks?
Tests added?
Docs added?
As recommended on https://symfony.com/doc/current/deployment.html#b-configure-your-environment-variables
Run
composer dump-env
on every deployment.The
$APP_ENV
shall be automatically when usingset('dotenv', '{{deploy_path}}/shared/.env.local');
in the deploy.php file.