Docksal install with ContentaCMS and GatsbyJS
An opinionated setup to start a headless or decoupled ContentaCMS (Drupal) backend with a GatsbyJS front end. Uses the wonderful Drupal Umami example profile to show how GatsbyJS can parse data using GraphQL on the front end from the JSON:API (which is now part of Drupal core as of 8.7.0) and generate a blazing fast static site.
The purpose of this setup is to simulate a two server setup with separate containers for the Gatsby instance and the Drupal instance and separate URLs http://gatsby.contenta.docksal
and http://contenta.docksal
. This makes for a portable setup that can be used across front and backend teams whether they share a codebase of if they are separate.
This project requires Docksal and whatever Docker flavor you choose (Docker for Mac, VirtualBox, etc.).
fin init
from the project root.
fin init
finishes doing the things, you can visit http://contenta.docksal
to view the Drupal backend or http://static.contenta.docksal
to view the static site that was generated. If you wish to run the Gatsby development server, run fin gatsby-dev
to start a development server that you can visit at http://gatsby.contenta.docksal
.fin gatsby-build
and your site will be generated.Currently, this is used only for demo purposes or as a starter kit to begin a project. Once you clone to your local, delete the .git
folder from the project root and do what you want with it. Get weird if you want, I won't judge.
Please contribute. Fork early, fork often, and submit those PRs, people!
This project is licensed under the MIT License - see the LICENSE.md file for details