diff --git a/sandbox.md b/sandbox.md new file mode 100644 index 000000000..dc5dcc8e6 --- /dev/null +++ b/sandbox.md @@ -0,0 +1,26 @@ +# Sandbox Environment + +## Description + +The `sandbox` branch creates a long-living multidev that provides a permanently available sandbox environment that mirrors production where editors can safely practice and use the CMS without fear of messing up the live site. + +This environment can be used for guided training classes, self learning, or experimentation, etc. + +## Environment Updates + +This environment should be a replica of the live site so it needs to be updated as part of the deployment process in order to stay in sync with the live site. + +Run these commands to keep this branch up to date: + +``` +git checkout sandbox +git rebase origin/master +git push -f +``` + +## Code Changes + +This branch should only have a few code changes from the `master` branch: +1. `sandbox.md` (This file) +2. `web/modules/custom/portland_openid_connect/src/Routing/RouteSubscriber.php` (Enabling Office 365 login for this site) +3. `web/sites/default/settings.php` (Define environment indicator for Sandbox) diff --git a/web/modules/custom/portland_openid_connect/src/Routing/RouteSubscriber.php b/web/modules/custom/portland_openid_connect/src/Routing/RouteSubscriber.php index 19ad57b74..fe2951455 100644 --- a/web/modules/custom/portland_openid_connect/src/Routing/RouteSubscriber.php +++ b/web/modules/custom/portland_openid_connect/src/Routing/RouteSubscriber.php @@ -63,7 +63,7 @@ protected function alterRoutes(RouteCollection $collection) { in_array($_ENV['PANTHEON_ENVIRONMENT'], [ // uncomment this line for local testing //'lando', - 'demo', 'dev', 'test', 'live','pe-380']) + 'demo', 'dev', 'test', 'live','sandbox']) ) { // only log in with an OpenID provider if ($route = $collection->get('user.login')) { diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index f0198697d..54dfd0434 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -52,6 +52,13 @@ $config['environment_indicator.indicator']['fg_color'] = '#ffffff'; $config['environment_indicator.indicator']['name'] = 'Test'; } + elseif ($_ENV['PANTHEON_ENVIRONMENT'] === 'sandbox') { + /** Replace www.example.com with your registered domain name */ + $primary_domain = 'sandbox.employees.portland.gov'; + $config['environment_indicator.indicator']['bg_color'] = '#ffb81c'; + $config['environment_indicator.indicator']['fg_color'] = '#ffffff'; + $config['environment_indicator.indicator']['name'] = 'Sandbox'; + } elseif ($_ENV['PANTHEON_ENVIRONMENT'] === 'lando') { /** Replace www.example.com with your registered domain name */ $primary_domain = 'employees.lndo.site';