Commit 23ad7598 authored by Benji Fisher's avatar Benji Fisher

Merge branch '4-configure-nginx-or-apache-to-serve-the-gatsby-site' into 'master'

Resolve "Configure nginx or apache to serve the Gatsby site"

Closes #4

See merge request !8
parents c20b0fdd f3d9c7d0
......@@ -12,13 +12,16 @@ proxy:
- cd drupal && composer install
- cd drupal/web && drush --yes site:install demo_umami --db-url=mysql://drupal8:drupal8@database:3306/drupal8 --account-pass=admin --site-name='Drupal-Gatsby' && drush --yes pm:enable jsonapi
- cd drupal/web && drush --yes site:install demo_umami --db-url=mysql://drupal8:drupal8@database:3306/drupal8 --account-pass=admin --site-name='Drupal-Gatsby'
- cd drupal/web && drush --yes pm:enable jsonapi
type: node:8.9
ssl: true
......@@ -30,6 +33,14 @@ services:
yarn: "1.13.0"
- cd gatsby && yarn install
type: nginx
ssl: true
webroot: gatsby/public
- nodejs: cd gatsby && gatsby build
......@@ -79,21 +79,26 @@ It will
- Install the [JSON:API]( Drupal
- Install a Gatsby project pulling data from the Drupal site.
- Build the Gatsby project.
- Tell you which URLs are being served.
In particular, you should be able to visit these pages in a web browser:
In particular, you should be able to visit these pages in a web browser.
- Your Drupal site:
- Your JSON API endpoint:
- Your Gatsby site:
- Your Gatsby pages imported from Drupal:
For now, the Gatsby pages will only be available once you have started the
Gatsby server. (See below.)
Your browser will give you a warning about the site's certificate.
If that bothers you, then you can use `http` instead of `https`.
The second command gives more information about the configured containers.
For sample command-line output from these two commands, see
[Start Lando](docs/
## Other ways to explore
### Build and run your Gatsby project
There are two ways you can use `nodejs` to serve your site:
......@@ -131,8 +136,6 @@ Use CTRL-C in your terminal window to stop the node server.
For sample command-line output, see
[Starting Gatsby](docs/
## Other ways to explore
### Create a Gatsby project
If you want to run additional Gatsby sites, then run the following commands
This diff is collapsed.
......@@ -9,8 +9,7 @@ module.exports = {
resolve: 'gatsby-source-drupal',
options: {
// Within the Lando network, the Drupal web server is nginx.
baseUrl: 'http://nginx/',
baseUrl: '',
// Using the JSON:API module, the base URL for REST queries is
// /jsonapi.
apiBase: 'jsonapi',
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment