tasks:
  - init: >
      composer install &&
      npm i &&
      cp .env.example .env &&
      sed -i "s|APP_URL=|APP_URL=${GITPOD_WORKSPACE_URL}|g" .env &&
      sed -i "s|APP_URL=https://|APP_URL=https://8000-|g" .env &&
      php artisan key:generate
    command: >
      vendor/bin/sail up

ports:
  - port: 8000
    onOpen: open-preview
