Commit 66b5abea authored by Alain Takoudjou's avatar Alain Takoudjou

stack/drupal: add proxy to .well-know backend server

parent 93d4e5a0
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
"title": "Admin username", "title": "Admin username",
"description": "Admin username.", "description": "Admin username.",
"type": "string" "type": "string"
},
"instance.wellknown-proxy": {
"title": "Well-known backend URL",
"description": "Backend URL for /.well-known/acme-challenge to add as proxy. This is usefull to automatically sign certifcate with letsencrypt.",
"type": "string",
"format": "uri"
} }
} }
} }
...@@ -7,6 +7,7 @@ Listen {{ parameter_dict['ip'] }}:{{ parameter_dict['node-port'] }} ...@@ -7,6 +7,7 @@ Listen {{ parameter_dict['ip'] }}:{{ parameter_dict['node-port'] }}
ProxyRequests Off ProxyRequests Off
ProxyPreserveHost on ProxyPreserveHost on
ProxyPass / http://{{ parameter_dict['node-server'] }}/ ProxyPass / http://{{ parameter_dict['node-server'] }}/
ProxyPassReverse / http://{{ parameter_dict['node-server'] }}/ ProxyPassReverse / http://{{ parameter_dict['node-server'] }}/
......
...@@ -61,7 +61,7 @@ environment = ...@@ -61,7 +61,7 @@ environment =
[pathauto.pattern.article.yml] [pathauto.pattern.article.yml]
<= template-download-base <= template-download-base
url = ${:_profile_base_location_}/config/${:filename} url = ${:_profile_base_location_}/${:filename}
# Update stack lamp for drupal # Update stack lamp for drupal
...@@ -78,6 +78,7 @@ context = ...@@ -78,6 +78,7 @@ context =
key buildout_egg_directory buildout:eggs-directory key buildout_egg_directory buildout:eggs-directory
key buildout_develop_directory buildout:develop-eggs-directory key buildout_develop_directory buildout:develop-eggs-directory
key buildout_directory buildout:directory key buildout_directory buildout:directory
key custom_application_template custom-application-deployment:path
key template_instance_drupal template-drupal-instance:target key template_instance_drupal template-drupal-instance:target
key instance_lamp lamp-instance:output key instance_lamp lamp-instance:output
key composer_location composer:location key composer_location composer:location
......
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = ee73fe8e6b6959cfa137a02b9ce038f0 md5sum = 70abf44d3fd17771c9829a7285b904f6
[template-drupal-instance] [template-drupal-instance]
filename = drupal-instance.cfg.in filename = drupal-instance.cfg.in
md5sum = 680ba3cbecae8b25e677a1b6e7aacfc7 md5sum = 8ebc6c67e912c612f6f9801a3db47907
[template-settings.php] [template-settings.php]
filename = default.settings.php.in filename = default.settings.php.in
...@@ -16,8 +16,8 @@ md5sum = 2692b85c568694c618255095ecea11c5 ...@@ -16,8 +16,8 @@ md5sum = 2692b85c568694c618255095ecea11c5
[template-drupal-apache.conf] [template-drupal-apache.conf]
filename = apache.conf.in filename = apache.conf.in
md5sum = fa1d986228151256cacab67037ce4bfc md5sum = fecd0db8de8134eec6907091e417a5e5
[pathauto.pattern.article.yml] [pathauto.pattern.article.yml]
filename = pathauto.pattern.article.yml filename = config/pathauto.pattern.article.yml
md5sum = 92bea34b59f3493336eb593c8957fdc9 md5sum = 92bea34b59f3493336eb593c8957fdc9
...@@ -5,6 +5,7 @@ extends = ...@@ -5,6 +5,7 @@ extends =
{{ logrotate_cfg }} {{ logrotate_cfg }}
{{ nxdtest_template }} {{ nxdtest_template }}
{{ templace_apache_php }} {{ templace_apache_php }}
{{ parameter_dict["custom-application-template"] }}
parts += parts +=
drupal-site-install drupal-site-install
...@@ -17,6 +18,7 @@ offline = true ...@@ -17,6 +18,7 @@ offline = true
[apache-php-configuration] [apache-php-configuration]
document-root = ${:default-document-root}/docroot document-root = ${:default-document-root}/docroot
wellknown-proxy = ${instance-parameter:well-known-url}
[template-base] [template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -169,6 +171,7 @@ site-name = ${slap-parameter:instance.site-name} ...@@ -169,6 +171,7 @@ site-name = ${slap-parameter:instance.site-name}
site-mail = ${slap-parameter:instance.site-mail} site-mail = ${slap-parameter:instance.site-mail}
account-name = ${slap-parameter:instance.account-name} account-name = ${slap-parameter:instance.account-name}
account-mail = ${slap-parameter:instance.account-mail} account-mail = ${slap-parameter:instance.account-mail}
well-known-url = {{ slapparameter_dict.get("instance.wellknown-proxy", "") }}
[publish-connection-information] [publish-connection-information]
admin-username = ${instance-parameter:account-name} admin-username = ${instance-parameter:account-name}
......
...@@ -15,6 +15,7 @@ offline = true ...@@ -15,6 +15,7 @@ offline = true
[dynamic-template-drupal-parameters] [dynamic-template-drupal-parameters]
# Additional parameters for instance apache-php # Additional parameters for instance apache-php
php8 = !py!{{ application_deployment_php8 }} php8 = !py!{{ application_deployment_php8 }}
custom-application-template = {{ custom_application_template }}
[dynamic-template-drupal] [dynamic-template-drupal]
<= jinja2-template-base <= jinja2-template-base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment