[buildout]
parts =
  switch-softwaretype

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

[peertube]
recipe = slapos.recipe.template:jinja2
url = ${instance-peertube:target}
output = $${buildout:directory}/instance-peertube.cfg
context =
  key eggs_directory              buildout:eggs-directory
  key develop_eggs_directory      buildout:develop-eggs-directory
  raw monitor_template            ${monitor2-template:output}
  key slapparameter_dict          slap-configuration:configuration
  raw ipv6_random                 $${slap-configuration:ipv6-random}
  raw ipv4_random                 $${slap-configuration:ipv4-random}
  raw template_peertube_yaml      ${template-peertube-yaml:output}
  raw template_nginx_configration ${template-nginx-configuration:output}
  raw template_peertube_service   ${template-peertube-service:output}
  raw template_peertube_restore   ${template-peertube-restore-script:output}
  raw postgresql10_location       ${postgresql10:location}
  raw template_nginx_service      ${template-nginx-service:output}
  raw redis_binprefix             ${redis:location}/bin
  raw template_dcron_service      ${template-dcron-service:output}
  raw template_peertube_backup    ${template-peertube-backup-script:output}
  raw template_crontab_line       ${template-crontab-line:output}
  raw coreutils_cat               ${coreutils-output:cat}
  raw template_crontab            ${template-crontab:output}
  raw dcron_output                ${dcron-output:crontab}
  raw peertube_location           ${peertube:location}
  raw nodejs_location             ${nodejs:location}

[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = peertube:output

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer= $${slap-connection:computer-id}
partition=$${slap-connection:partition-id}
url     = $${slap-connection:server-url}
key     = $${slap-connection:key-file}
cert    = $${slap-connection:cert-file}

