Skip to content

wunderio/decoupled-project

Repository files navigation

Wunder template for Drupal projects

This project template is an opinionated fork of the popular Drupal-composer template, configured to automatically deploy code to a Kubernetes cluster using CircleCI. Everything that works with the Drupal-composer project template will work with this repository, so we won't duplicate the documentation here.

Getting started

  • Click "Use this template" to generate a new project
    • Select correct owner
    • Name the project as client-COUNTRYCODE-CLIENT-PROJECT
    • Make the repository private (unless the project is public)
  • Clone project and modify project details
    • composer.json name
    • silta/silta.yml
      • See values options to override.
  • Log in to CircleCI using your Github account and add the new project using existing config.

For additional instructions, please see the Silta documentation.

Local development

  1. Install the latest Lando and read the documentation.
  2. Update your project name and other Lando Drupal 9 recipe's parameters at .lando.yml.
  3. Run lando start.
  • chrome - uses selenium/standalone-chrome image, uncomment the service definition at .lando.yml to enable.
  • elasticsearch - uses blacktop/elasticsearch:7 image. Uncomment the service and proxy definitions at .lando.yml to enable. You can change default ES settings at .lando/elasticsearch.yml.
  • kibana - uses blacktop/kibana:7 image, uncomment the service and proxy definitions at .lando.yml to enable.
  • mailhog - uses Lando MailHog service.
  • node - uses Lando Node service.
  • lando - tools / commands overview.
  • lando grumphp <commands> - run GrumPHP code quality checks. Modified or new files are checked on git commit, see more at lando grumphp -h or wunderio/code-quality.
  • lando npm <commands> - run npm commands.
  • lando xdebug-on, lando xdebug-off - enable / disable Xdebug for nginx.
  • lando xdebug-profiler-on, lando xdebug-profiler-off - enable/disable the Xdebug profiler. This requires xdebug-on to be executed first.

Elasticsearch and Kibana setup for Lando

Default ports for Elasticsearch (9200) and Kibana (5601) are changed as follows:

Drupal development hints

Setting up GraphQL server locally

Requirements

- Install Node 12 (either from the site or NVM)

steps

  1. Go to /api directory
  2. Install all project dependencies by running: npm i
  3. To run the application on your computer, simply run: npm run dev

Query examples

doc

Setting up the NextJS / React front end locally

  1. Go to the NextJS app folder: cd site
  2. Install the NPM packages: npm install
  3. Run the NextJS app in development mode: npm run dev