Commit 6a8dae1a authored by Jérome Perrin's avatar Jérome Perrin

stack/lamp: archive root 🚧

parent 29ec5ded
......@@ -28,6 +28,7 @@ url = ${:_profile_base_location_}/${:filename}
[application]
url = https://builds.matomo.org/matomo-4.7.1.zip
md5sum = 8d592676bc2c0d51363ad7b2caf171fe
archive-root = matomo
# give the location of the instance-matomo.cfg fil
# Without it the instance-matomo.cfg file will not be executed
......@@ -37,7 +38,6 @@ part-list = matomo-backup.sh matomo-backup-cron
db-name = matomo
db-user = matomo
db-password = 12345678
root-path = /matomo
[template-matomo-instance]
recipe = slapos.recipe.template:jinja2
......
<VirtualHost *:{{ parameter_dict['port'] }}>
ServerAdmin admin@example.com
DocumentRoot {{ parameter_dict['document-root'] }}{{ root_path }}
DocumentRoot {{ parameter_dict['document-root'] }}
SetEnvIf Origin "^http(s)?://(.+\.)?(app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
......
......@@ -37,6 +37,13 @@ url = ${:_profile_base_location_}/${:filename}
[application]
recipe = slapos.recipe.build:download-unpacked
# softwares using this stack can extend this section to provide the url of
# an archive containing the application using url and md5sum options.
# The archive will be extracted directly in apache's DocumentRoot folder.
# In case the archive contain multiple files and folders and only a
# specific folder should be used as DocumentRoot, archive-root can be
# set to the relative path of this folder.
archive-root =
[python]
part = python3
......@@ -57,14 +64,6 @@ part-list =
db-name = lamp
db-user = lamp
db-password = insecure
# routing
# The default location of the LAMP URL link is
# ~/srv/project/runner/instance/slappartX/srv/www/
# If you want to redirect it, edit this keyword
# for example, root-path = /matomo
# that means the root document path is changed to
# ~/srv/project/runner/instance/slappartX/srv/www/matomo
root-path = /
#----------------
#-- Instance-level buildout profiles.
......@@ -75,6 +74,7 @@ output = ${buildout:directory}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
context =
key application_location application:location
key application_archive_root application:archive-root
key application_deployment_part_list custom-application-deployment:part-list
key apache_location apache:location
key apache_php_location apache-php:location
......@@ -115,7 +115,6 @@ context =
key db_name custom-application-deployment:db-name
key db_user custom-application-deployment:db-user
key db_password custom-application-deployment:db-password
key root_path custom-application-deployment:root-path
key lamp_apache_httpd template-apache-httpd:target
[instance-apache-php]
......
......@@ -14,11 +14,11 @@
# not need these here).
[instance]
filename = instance.cfg.in
md5sum = 053f8ba78c2634a1ef7586e025dcc2cc
md5sum = 603d03f43ea04e95237c80d3b9e72ba7
[instance-apache-php]
filename = instance-apache-php.cfg.in
md5sum = b1494674c9a373d6e87affd55281ec4c
md5sum = 8506f245087dfdc02561e8739a567bd6
[instance-lamp]
filename = instance-lamp.cfg.jinja2.in
......@@ -34,4 +34,4 @@ md5sum = 980f603c34fcb008ce73a9dde2dbceb3
[template-apache-httpd]
filename = apache-httpd.conf.in
md5sum = b6c5a467759582a321063242ae2a635e
md5sum = 4ad906791f0d6fd3a4aef8f5a8018b45
......@@ -140,7 +140,6 @@ url = {{ lamp_apache_httpd }}
output = ${directory:apache.d}/lamp.conf
context =
section parameter_dict apache-php-configuration
raw root_path {{ root_path }}
[apache-php-conf]
recipe = slapos.recipe.template:jinja2
......
......@@ -54,7 +54,11 @@ extra-context =
raw db_password {{ db_password }}
[dynamic-template-apache-php-parameters]
{% if application_archive_root %}
application-location = {{ application_location }}/{{ application_archive_root }}
{% else %}
application-location = {{ application_location }}
{% endif %}
application-part-list = {{ application_deployment_part_list }}
template-apache-conf = {{ template_apache_conf }}
apache-location = {{ apache_location }}
......@@ -73,7 +77,6 @@ extra-context =
key custom_application_template application-parameters:custom-application-template
section parameter_dict dynamic-template-apache-php-parameters
raw lamp_apache_httpd {{ lamp_apache_httpd }}
raw root_path {{ root_path }}
[dynamic-template-mariadb-parameters]
bash = {{ bash_location }}
......
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