From 1fa1b0e53bdd470fda5beb9ab0217a33e1c710be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20J=C3=A4ger?= Date: Tue, 21 Feb 2023 16:50:07 +0100 Subject: [PATCH 1/2] Feature: allow custom services With this PR you can add services to your environemt, by adding them to the services section in deploy.yml. Necessary templates have to be added at project level in directory config/custom-services-templates. --- bin/command/install/bootstrap.sh | 1 + generator/index.php | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/command/install/bootstrap.sh b/bin/command/install/bootstrap.sh index 090d841d0..a1071e3da 100644 --- a/bin/command/install/bootstrap.sh +++ b/bin/command/install/bootstrap.sh @@ -67,6 +67,7 @@ function Command::bootstrap() { rm -rf "${tmpDeploymentDir}" fi mkdir "${tmpDeploymentDir}" + mkdir "${tmpDeploymentDir}/project-deploy-templates" tmpDeploymentDir="$(cd "${tmpDeploymentDir}" >/dev/null 2>&1 && pwd)" diff --git a/generator/index.php b/generator/index.php index caaebf7dd..f7fa00c94 100644 --- a/generator/index.php +++ b/generator/index.php @@ -26,6 +26,7 @@ $loaders = new ChainLoader([ new FilesystemLoader(APPLICATION_SOURCE_DIR . DS . 'templates'), new FilesystemLoader($deploymentDir), + new FilesystemLoader($deploymentDir . DS . 'project-deploy-templates'), ]); $twig = new Environment($loaders); $nginxVarEncoder = new class() { From ffcaf410f53c5036ec906c54130f2e68bf9131c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20J=C3=A4ger?= Date: Fri, 14 Apr 2023 08:08:22 +0200 Subject: [PATCH 2/2] bugfix: copy without directory --- bin/command/install/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/command/install/bootstrap.sh b/bin/command/install/bootstrap.sh index a1071e3da..74d06d7ca 100644 --- a/bin/command/install/bootstrap.sh +++ b/bin/command/install/bootstrap.sh @@ -96,7 +96,7 @@ function Command::bootstrap() { cp ".known_hosts" "${tmpDeploymentDir}/" fi if [ -d "${projectDeployTemplatesDirectory}" ]; then - cp -rf "${projectDeployTemplatesDirectory}" "${tmpDeploymentDir}/project-deploy-templates" + cp -rf "${projectDeployTemplatesDirectory}/." "${tmpDeploymentDir}/project-deploy-templates" fi Console::end "[DONE]"