Skip to content

drunomics/lupus-decoupled-project

 
 

Repository files navigation

Gitpod ready-to-code

lupus decoupled project

A ddev + Gitpod enabled decoupled project template

Set up on Gitpod.

Use gitpod.io to setup a full Drupal dev environment in a browser.

This project demonstrates a complete Drupal 10 development environment, utilizing ddev and Gitpod, through your browser. Refer to https://gitpod.io/#https://github.com/shaal/ddev-gitpod for usage documentation.

Local setup with ddev

ddev is a ridiculously simple setup for complex development environments, based upon docker compose.

Requirements:

Resources:

Optionally, customize the project:

  # Configure a different frontend repository.
  ddev config --web-environment-add="FRONTEND_REPOSITORY=https://github.com/drunomics/lupus-decoupled-nuxt3-demo"

To spin up the project locally run:

  ddev start
  ddev composer install
  ddev drush site-install -y --account-pass=admin --site-name='lupus_decoupled' standard
  ddev drush pm-enable lupus_decoupled, services_env_parameter -y
  # Configure lupus-decoupled frontend base URL
  ddev drush config:set lupus_decoupled_ce_api.settings frontend_base_url https://lupus-nuxt.ddev.site -y
  # Login and get started adding some test-nodes
  ddev drush upwd admin somepass
  ddev launch /user/login

When using ddev locally the URLs are by default:

Configuration

Change the default frontend repository

For example, to change the repository from nuxt3 to nuxt2 run the following command:

  ddev config --web-environment-add="FRONTEND_REPOSITORY=${FRONTEND_REPOSITORY:-https://github.com/drunomics/lupus-decoupled-nuxt-demo}"

Automatic frontend login via a shared-cookie domain

In order to setup a shared cookie domain, adjust the cookie_domain option of Drupal via the services.yml configuration file, or set the option via an environment variable via pre-installed servies_env_parameter module. For that, simply set suiting values for ddev/gitpod at the locations as output by:

 git grep -B 1 DRUPAL_SERVICE_session__storage__options___cookie_domain

The commented values work by default for the Gitpod/ddev setup, but consider the following SECURITY WARNING:

The values suggested are configured to share the session cookie on the shared domain .gitpod.io by default. This allows all *.gitpod.io instances to read your session cookie. When using Gitpod for anything else than testing purposes, use a custom parent domain.

Development

When working on this template, things can be tested best on gitpod by modifying the launch link to test a custom branch of the template. Use the following link and replace <<BRANCH>> with the actual branch, if it contains slashes, keep them:

https://gitpod.io/new/#DP_PROJECT_NAME=lupus_decoupled,DP_ISSUE_BRANCH=1.x,DP_PROJECT_TYPE=project_module,DP_MODULE_VERSION=1.x,DP_CORE_VERSION=10.3,DP_PATCH_FILE=,FRONTEND_REPOSITORY=https%3A%2F%2Fgithub.com%2Fdrunomics%2Flupus-decoupled-nuxt3-demo,CUSTOM_ELEMENTS_VERSION=3.*,DP_INSTALL_PROFILE=standard/https://github.com/drunomics/lupus-decoupled-project/tree/<<BRANCH>>

About

A full Drupal dev environment in a browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 98.9%
  • Vue 1.1%