[buildout]
extends =
  buildout.hash.cfg
  ../../component/caddy/buildout.cfg
  ../../component/dash/buildout.cfg
  ../../stack/slapos.cfg

parts +=
  slapos-cookbook
  instance-profile
  template-caddy

[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output =${buildout:directory}/instance.cfg
mode = 0644

[template-caddyfile]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644

[template-caddy]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance-caddy.cfg.in
mode = 0644

[template-public-html]
recipe = slapos.recipe.template
url =  ${:_profile_base_location_}/${:filename}
output =  ${buildout:directory}/index.html
mode = 0644

[template-caddy-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-caddy-service.sh.in
mode = 0644
