# see https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/azd-schema
name: <%- solutionSlug %>
metadata:
  template: <%- generatorId %>@<%- generatorVersion %>
services:
<% if (withBackend) { -%>
  backend:
    language: python
    project: src/backend
    host: containerapp
    docker:
      path: ./Dockerfile
      remoteBuild: true
<% if (solutionLevel > 100) { -%>
      context: ../..
<% } -%>
<% } -%>
<% if (withFrontend) { -%>
  frontend:
    language: python
    project: src/frontend
    host: containerapp
    docker:
      path: ./Dockerfile
      remoteBuild: true
<% if (solutionLevel > 100) { -%>
      context: ../..
<% } -%>
<% } -%>
hooks:
  preprovision:
    windows:
      shell: pwsh
      run: .\scripts\preprovision.ps1
      interactive: true
      continueOnError: false
    posix:
      shell: sh
      run: ./scripts/preprovision.sh
      interactive: true
      continueOnError: false
  postprovision:
    windows:
      shell: pwsh
      run: .\scripts\postprovision.ps1
      interactive: true
      continueOnError: false
    posix:
      shell: sh
      run: ./scripts/postprovision.sh
      interactive: true
      continueOnError: false
  predown:
    windows:
      shell: pwsh
      run: .\scripts\predown.ps1
      interactive: true
      continueOnError: false
    posix:
      shell: sh
      run: ./scripts/predown.sh
      interactive: true
      continueOnError: false

