Skip to content
Snippets Groups Projects
Commit 6f2137ba authored by jurgenhaas's avatar jurgenhaas
Browse files

Add support for extra settings in composer.json for docker-compose.yml

parent 74e5f496
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -117,6 +117,11 @@ class Handler {
if (!$fs->exists($file)) {
$twig_loader->setTemplate($template, file_get_contents($pluginRoot . '/templates/' . $template . '.twig'));
$rendered = $twig->render($template, $options);
if (!empty($def['add2yaml']) && isset($options[$template])) {
$yaml = Yaml::parse($rendered);
$yaml = array_merge_recursive($yaml, $options[$template]);
$rendered = Yaml::dump($yaml, 9, 2);
}
file_put_contents($file, $rendered);
}
if (isset($def['link']) && ($def['link'] != $settingsPath)) {
......@@ -200,6 +205,7 @@ class Handler {
],
'docker-compose.yml' => [
'dest' => $projectRoot,
'add2yaml' => TRUE,
],
'aliases.drushrc.php' => [
'dest' => $projectRoot . '/drush',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment