-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Un.titled edited this page Apr 5, 2024
·
2 revisions
- DDev - This provides the local development environment
- Node.js (min version 12.x)
- From the Pantheon dashboard, Under Un.titled Organization create a new site
- Choose Custom Upstream
- On https://dashboard.pantheon.io/site/create-site/cms/custom-upstreams choose Syd D10 Media [upstream_id=0a212bc9-7321-44b3-bd2d-c184ee775317]
- Choose a concise name for the project
- Set the region to
European Union
- Choose Custom Upstream
- Once complete, visit the dashboard, hit
Visit development site
and install Drupal- Choose
Use existing configuration
on the profile selection screen - Set username to
dp_admin
, and email to[email protected]
, ensure a secure password is used - Make sure the credentials are saved to TClients
- Choose
- Once installed, in the Pantheon dashboard set the site to run in
Git
mode - Create a backup in the Pantheon dashboard (you can leave this running whilst you continue the next steps)
- Clone the repo to your local machine
- Change project name in
.ddev/config.yaml
& Runddev start
- Once the container is running, run
ddev composer install
- Edit
./.ddev/config.yaml
L15 to contain your Terminus machine code, e.g:
web_environment: ['TERMINUS_MACHINE_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxx']
- Edit
./.ddev/providers/pantheon.yaml
, updating the project name on L42, e.g.
project: <pantheon_site_name>.dev
- Run
ddev restart
- Ensure your changes to
./.ddev/config.yaml
aren't tracked in the repo, i.e.
git update-index --assume-unchanged .ddev/config.yaml
- Once complete, run
ddev pull pantheon
(Note: if you haven't run this elsewhere in your current session, you'll be prompted to runddev auth ssh
, this is a once per session task) - Run
ddev drush cr
- Update
./webpack.mix.js
L10 to contain your local development url, e.g.
const hostname = '<site_name>.ddev.site'
- Add, commit & push all changes to the repo 🍻
- Using drush & composer commands via
ddev
is just a case of runningddev composer x
orddev drush y
- Replace the contents of
./web/sites/development.services.yml
with:
parameters:
http.response.debug_cacheability_headers: true
twig.config:
debug: true
auto_reload: true
cache: false
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
- Add the following lines to the top of
./web/sites/default/settings.ddev.php
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
$settings['cache']['bins']['page'] = 'cache.backend.memory';
$settings['cache']['bins']['render'] = 'cache.backend.memory';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.memory';
- Run
ddev drush cr
to clear caches and allow the changes above to take effect
- Run
npm i
from the site root directory - Run
npm start
to begin local development - Run
npm run-script production
before adding/commiting/pushing to the repo