Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions doc/default-deployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ public function configure()
}
```

You can optionaly define a directory by deployed server as :
```php
public function configure()
{
return $this->getConfigBuilder()
->server('user@hostname', ['app'], [
'deploy_dir' => '/var/www/my-project',
])
// ...
;
}
```

Then, the following directory structure is created on each remote server:

```
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/DefaultConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public function resetOpCacheFor(string $homepageUrl): self

protected function getReservedServerProperties(): array
{
return [Property::bin_dir, Property::config_dir, Property::console_bin, Property::cache_dir, Property::deploy_dir, Property::log_dir, Property::src_dir, Property::templates_dir, Property::web_dir];
return [Property::bin_dir, Property::config_dir, Property::console_bin, Property::cache_dir, Property::log_dir, Property::src_dir, Property::templates_dir, Property::web_dir];
}

private function setDefaultConfiguration(int $symfonyMajorVersion, $symfonyMinorVersion): void
Expand Down
2 changes: 1 addition & 1 deletion src/Deployer/DefaultDeployer.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private function initializeServerOptions(): void
$appServers = $this->getServers()->findByRoles([Server::ROLE_APP]);
foreach ($appServers as $server) {
$this->log(sprintf('<h3>Setting the %s property for <server>%s</> server</>', Property::deploy_dir, $server));
$server->set(Property::deploy_dir, $this->getConfig(Option::deployDir));
$server->set(Property::deploy_dir, $server->get(Property::deploy_dir, $this->getConfig(Option::deployDir)));
}
}

Expand Down