Host settings lost after changing tasks #4196
Answered
by
antonmedv
devjk1
asked this question in
Help needed
-
|
In deploy.php only a hostname is set for a host Thank you for your time |
Beta Was this translation helpful? Give feedback.
Answered by
antonmedv
Apr 23, 2026
Replies: 1 comment 2 replies
-
|
How do you run it? Run just before provision: For me settings are preserved: <?php
namespace Deployer;
localhost();
task('customtask', function () {
$php_version = '8.4';
$db_type = 'mysql';
currentHost()->set('hostname', function () {
return ask(' Enter the domain or ip of your server: ');
});
currentHost()->set('php_version', $php_version);
currentHost()->set('db_type', $db_type);
});
task('provision', function () {
writeln('Provisioning... {{php_version}}');
});
task('deploy', ['customtask', 'provision']); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
devjk1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you run it? Run just before provision:
For me settings are preserved: