[buildout]
extends =
  buildout.hash.cfg
  ../../component/redis/buildout.cfg
  ../../stack/lamp/buildout.cfg

[nc-download-base]
recipe = hexagonit.recipe.download
ignore-existing = true
download-only = true
url = ${:_profile_base_location_}/${:filename}
mode = 0644


[application]
url = https://download.nextcloud.com/server/releases/nextcloud-16.0.3.tar.bz2
md5sum = d81902d2dec5d547779bec6336a438be

[template-nextcloud-install.sh] 
<= nc-download-base

[template-apache-httpd]
<= nc-download-base

[template-nextcloud-config.json]
<= nc-download-base

[template-nextcloud-instance]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-nextcloud.cfg
extensions = jinja2.ext.do
context = 
          key gzip_location          gzip:location
          key python3_location       python3:location
          key news_updater_location  news-updater:location
          key php_location           apache-php:location
          raw redis_bin              ${redis:location}/bin/redis-server
          raw redis_cli              ${redis:location}/bin/redis-cli
          raw nextcloud_install_sh   ${template-nextcloud-install.sh:location}/${template-nextcloud-install.sh:filename}
          raw nextcloud_apache_httpd ${template-apache-httpd:location}/${template-apache-httpd:filename}
          raw nextcloud_parameter_json ${template-nextcloud-config.json:location}/${template-nextcloud-config.json:filename}

[custom-application-deployment]
path = ${template-nextcloud-instance:rendered}
part-list = nextcloud-install.sh

[news-updater]
recipe = hexagonit.recipe.download
url = https://github.com/nextcloud/news-updater/archive/10.0.1.tar.gz
md5sum = 37387199c0482e08d01e9294cd95eaad
strip-top-level-dir = true