From 20e574490369b2b58c26d80b50227621f0257ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Tue, 31 May 2022 15:21:08 -0400 Subject: [PATCH] Clarify and correct new Drutopia site documentation - update config directory - pull out 'notes' - tone down build_source messaging --- tools/creating-new-drutopia-site.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/creating-new-drutopia-site.md b/tools/creating-new-drutopia-site.md index 77b1bb7..69130df 100644 --- a/tools/creating-new-drutopia-site.md +++ b/tools/creating-new-drutopia-site.md @@ -64,7 +64,11 @@ Webserver, PHP, and MySQL versions and types are selected here to match those us In order to get a configuration that has the proper site key, it is easiest to first deploy the site to the eventual live location, and sync that database locally. -If you are creating a specialized build of Drutopia, you will have to add that to the host vars, and build that prior to deploying the site. `ahoy vars-edit` and `ahoy deploy-build ` are used for this. Note that new builds should be added ONLY as absolutely required. Configuration, and themes should be leveraged as much as possible prior to resorting to a new build. If additional/different modules are required, a new build is required - do *NOT* add them to `build_source` except when they are known to be required for *ALL* Drutopia basic sites. +If you are creating a specialized build of Drutopia, you will have to add that to the host vars, and build that prior to deploying the site. `ahoy vars-edit` and `ahoy deploy-build ` are used for this. + +```{note} +New builds should be added **only** as absolutely required. Configuration, and themes should be leveraged as much as possible prior to resorting to a new build. If additional modules are required, consider adding them to `build_source`, knowing they will be available for *all* Drutopia SaaS sites. +``: Create a new site (member entry) per instructions in Drutopia hosting. The simplest method is to use `ahoy new-site ` and follow its output to get started. Then use `ahoy deploy-site ` to deploy one. Because the install using `drush site-install` that would be run when `drupal_install: true` is set in the site settings in Drutopia hosting, it is currently recommended to set this to false and use the UI installer or run `php docroot/core/scripts/drupal quick-start drutopia --no-interaction` when ssh'd into the server. @@ -98,10 +102,10 @@ This will create a self.site.yml using the expected pattern of "site_name_INSTAN ### Syncing, and setting up configuration -Drutopia releases will expect the configuration in `$project_root/config/sync`. Be sure to set the appropriate variable in `settings.php` for it to be stored/retrieved from there. Note not to use `settings.ddev.php`, as this will be generated during `ddev start`: +Our standard is to place configuration exports in `$project_root/config`. Set the this in `settings.php`: ```php -$settings['config_sync_directory'] = '../config/sync'; +$settings['config_sync_directory'] = '../config'; ``` While in `web/sites/default/settings.php` also prevent site administrators being told they can install new modules when they can't and add: @@ -112,6 +116,10 @@ $conf['allow_authorize_operations'] = FALSE; (All this should be updated to use a distribution-wide settings.php when we have that. Until the, use `git add -f web/sites/default/settings.php` to include this in your repo) +```{note} +Do not to use `settings.ddev.php`, as this will be re-generated during `ddev start`. +``` + Once you also have a working Drush installation and a live instance, you can then aquire and export the initial configuration with: ```