Skip to content

Commit

Permalink
Create sandbox environment
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardDavies committed Nov 3, 2022
1 parent deab1cd commit 7ee9053
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
26 changes: 26 additions & 0 deletions sandbox.md
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down
7 changes: 7 additions & 0 deletions web/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 7ee9053

Please sign in to comment.