diff --git a/bin/command/install/bootstrap.sh b/bin/command/install/bootstrap.sh index 090d841d0..6e4cd73c7 100644 --- a/bin/command/install/bootstrap.sh +++ b/bin/command/install/bootstrap.sh @@ -46,6 +46,7 @@ function Command::bootstrap() { local defaultProjectYaml=$([ -f "./deploy.local.yml" ] && echo -n "./deploy.local.yml" || echo -n "./deploy.yml") local projectYaml=${1:-${defaultProjectYaml}} local projectDeployTemplatesDirectory="./config/deploy-templates/" + local customServicesTemplatesDirectory="./config/custom-services-templates/" if [ -n "${SKIP_BOOTSTRAP_IF_DONE}" ] && [ -f "${DESTINATION_DIR}/project.yml" ]; then if cmp -s "${DESTINATION_DIR}/project.yml" "${projectYaml}"; then @@ -67,6 +68,7 @@ function Command::bootstrap() { rm -rf "${tmpDeploymentDir}" fi mkdir "${tmpDeploymentDir}" + mkdir "${tmpDeploymentDir}/custom-services-templates" tmpDeploymentDir="$(cd "${tmpDeploymentDir}" >/dev/null 2>&1 && pwd)" @@ -97,6 +99,9 @@ function Command::bootstrap() { if [ -d "${projectDeployTemplatesDirectory}" ]; then cp -rf "${projectDeployTemplatesDirectory}" "${tmpDeploymentDir}/project-deploy-templates" fi + if [ -d "${customServicesTemplatesDirectory}" ]; then + cp -rf "${customServicesTemplatesDirectory}" "${tmpDeploymentDir}/custom-services-templates" + fi Console::end "[DONE]" Console::info "${INFO}Running generator${NC}" diff --git a/generator/index.php b/generator/index.php index caaebf7dd..1a3e1685c 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 . 'custom-services-templates'), ]); $twig = new Environment($loaders); $nginxVarEncoder = new class() {