[buildout]
extends =
  buildout.hash.cfg
  ../../stack/slapos.cfg
  ../../stack/monitor/buildout.cfg
  ../../component/hugo/buildout.cfg
  ../../component/nginx/buildout.cfg
  ../../component/openssl/buildout.cfg

parts =
  slapos-cookbook
  hugo
  template-cfg

[profile-common]
nginx_location = ${nginx:location}
dash_location = ${dash:location}
go_environment = ${gowork:env.sh}
openssl_location = ${openssl:location}
template_nginx_conf = ${template_nginx_conf:target}
template_mime_types = ${template_mime_types:target}
template_index_html = ${template_index_html:target}
template_monitor = ${monitor-template:output}

[template-cfg]
recipe = slapos.recipe.template:jinja2
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
context =
  section buildout buildout
  section parameter_list profile-common
  
[download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}

[template_nginx_conf]
<= download-base

[template_mime_types]
<= download-base

[template_index_html]
<= download-base
