/Labdoo-3.0

Labdoo 3.0

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

Gitpod ready-to-code

Labdoo 3.0

Moving the Labdoo platform to Drupal 9/10

This project is the Labdoo 3.0 source code base for the Labdoo platform using Drupal 9 (and eventually Drupal 10).

You can install and develop locally using DDEV or entirely in the Cloud using Gitpod.

Custom Code Static Checking

Before submitting a pull request, please make sure any custom code meets Drupal Coding Standards and is using the latest Drupal APIs in anticipation of the project being released on Drupal 10 when it is released December 2022, using phpstan with phpstan-drupal. To run those tests use the following commands:

ddev ssh
phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/custom
phpstan --level=5 analyze web/modules/custom

If a PR is modifying code in the theme, add the command

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/themes

Pull requests that have errors will not be approved and merged.

Installing and developing locally using DDEV

Prerequisites:

  1. DDEV, which itself requires
  2. Docker

Once those are installed and this repository is cloned, from the project root you cloned the repository into, start the DDEV environment using the command ddev start.

Note that unlike the Gitpod start below, DDEV locally doesn't automatically install a Drupal site. To setup for local development you can use the .scripts/dev-start.sh script which will

  1. Install Drupal using the standard profile
  2. Run any Drupal database updates
  3. Import the configuration in config/default (twice in case the first import enables additional configuration, e.g. for config_ignore & config_split)

Remembering to prefix most commands like composer, drush, etc with ddev.

Developing entirely in the cloud using Gitpod.

Video Demo

Watch a 5 minutes walkthrough video:

Setup a full Drupal dev environment in a browser

Prerequisites:

  1. Sign up for gitpod.io

Try it out:

  1. Click on the following link https://gitpod.io/#https://github.com/Labdoo/Labdoo-3.0
  2. Your environment is being prepared, wait a few minutes the first time, less than a minute after that. (A splash screen will appear)
  3. VScode IDE will be displayed, a few seconds later you will see an empty Drupal site. User 1 login is admin/admin.
  4. Run in terminal ddev xdebug on
  5. Open VScode's debugger, place a new breakpoint in web/index.php
  6. Open your website's URL in a browser.
  7. 🎉

Do you like PhpStorm instead of Theia or VScode?

  1. Open a bash window at the bottom
  2. .ddev/run-phpstorm.sh

How does it work?

  1. Gitpod - development environment based on Docker
    1. .gitpod.yml
      1. Defines the main docker image this environment is built on - .gitpod.Dockerfile
      2. Run prebuild commands:
        1. Start ddev
        2. Run composer install
        3. Install empty website using standard profile
    2. .gitpod.Dockerfile
      1. Set base image to Gitpod's workspace-full (link)
      2. Install ddev using brew
  2. ddev - ridiculously simple setup for complex development environments, allows developers working locally or working with Gitpod in the cloud.
    1. .ddev/config.yaml - main ddev (default) configuration, can be generated by running ddev config

Thank you

@rfay for your endless patience and relentless support that made this project possible. @shaal for the repository this one started out copying, https://github.com/shaal/ddev-gitpod

Persistent Storage:

  • Gitpod backs up the state of the /workspace/ folder between workspace starts, so that you can revisit them later. Attention: Files in other locations will not be saved!
  • Additional Storage Solutions