apiVersion: 1.0.0
metadata:
  name: php-plugin-test
projects:
  - name: php-web-simple
    source:
      location: 'https://github.com/che-samples/web-php-simple'
      type: git
components:
  - id: redhat/php/latest
    type: chePlugin
  - id: redhat/php-debugger/latest
    type: chePlugin
  - mountSources: true
    endpoints:
      - name: 8080-tcp
        port: 8080
    memoryLimit: 512Mi
    type: dockerimage
    volumes:
      - name: composer
        containerPath: /home/user/.composer
      - name: symfony
        containerPath: /home/user/.symfony
    alias: php
    image: 'registry.redhat.io/codeready-workspaces/stacks-php-rhel8:latest'
commands:
  - name: Debug current file
    actions:
      - referenceContent: |
          {
            "version": "0.2.0",
            "configurations": [
              {
                "name": "Launch currently open script",
                "type": "php",
                "request": "launch",
                "program": "${file}",
                "stopOnEntry": true,
                "cwd": "${fileDirname}",
                "port": 9000,
                "runtimeExecutable": "php"
              }
            ]
          }
        type: vscode-launch

