tasks:
  - init: yarn install
    command: yarn dev
  - init: composer install
    command: |
      cp .env.example .env
      mkdir public/app/
      cp resources/assets/src/images/bg.webp resources/assets/src/images/favicon.ico public/app
      touch storage/database.db
      sed 's/DB_CONNECTION=mysql/DB_CONNECTION=sqlite/' -i .env
      sed 's/DB_DATABASE=blessingskin/DB_DATABASE=\/workspace\/blessing-skin-server\/storage\/database\.db/' -i .env
      php artisan key:generate
      php artisan serve --host=0.0.0.0
  - command: gp ports await 8080 && gp preview $(gp url 8000)

github:
  prebuilds:
    # enable for the master/default branch (defaults to true)
    master: true
    # enable for all branches in this repo (defaults to false)
    branches: false
    # enable for pull requests coming from this repo (defaults to true)
    pullRequests: true
    # add a check to pull requests (defaults to true)
    addCheck: true
    # add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
    addComment: false

vscode:
  extensions:
    - 'editorconfig.editorconfig'
    - 'eamodio.gitlens'
    - 'bmewburn.vscode-intelephense-client'
    - 'esbenp.prettier-vscode'
    - 'jpoissonnier.vscode-styled-components'
    - 'mblode.twig-language-2'
    - 'felixfbecker.php-debug'

ports:
  - port: 8080
    visibility: public
