apiVersion: xl/v2
kind: Blueprint

metadata:
  name: Docker compose
  description: Creates the necessary `docker-compose.yaml` needed to run your specific setup.
  author: XebiaLabs
  version: 2.0
  instructions: Please read the generated file "xebialabs/USAGE.md" for further usage instructions.
  
spec:
  parameters:
  - name: UseXLDeployFlag
    type: Confirm
    prompt: Do you want to install XL Deploy?
    default: true

  - name: XLDeployPort
    type: Input
    prompt: "Host port for XL Deploy:"
    promptIf: UseXLDeployFlag
    default: 4516

  - name: UseXLReleaseFlag
    type: Confirm
    prompt: Do you want to install XL Release?
    default: true

  - name: XLReleasePort
    type: Input
    prompt: "Host port for XL Release:"
    promptIf: UseXLReleaseFlag
    default: 5516

  - name: JetPackOrEnterprise
    type: Select
    prompt: "Do you want to use JetPack or XL Enterprise:"
    options:
      - JetPack
      - XL Enterprise

  - name: XLVersion
    type: Select
    prompt: "Select the version of XL you want to use:"
    promptIf: !expr "UseXLDeployFlag == true || UseXLReleaseFlag == true"
    options:
      - 8.6.1

  - name: UseDockerProxyFlag
    type: Confirm
    prompt: Do you want to be able to deploy to your local Docker instance?
    default: true

  files:
  - path: xebialabs/USAGE-docker-compose.md.tmpl
  - path: xebialabs/config.yaml.tmpl
  - path: docker/docker-compose.yml.tmpl
  - path: docker/data/configure-xl-devops-platform.yaml.tmpl
    writeIf: UseXLReleaseFlag
