- Ensure you have a Pantheon account
- Ping the TL your username to get added to the Pantheon site once you have an account
- Add your SSH key to your Pantheon account
- Install and Authenticate Terminus
- Test your access to the site by running
terminus site:list
and ensuringslac-alpha-d9
is in the list of sites you have access to
- Docker
- DDEV
- Clone the repo:
git clone git@github.com:slac/slac-alpha-d9.git
- Create
.env
file:cp .env.example .env
- Start the project:
ddev start
- Install dependencies:
ddev composer install
- Build the theme:
ddev gesso install && ddev gesso build
- Run
ddev drush si --existing-config
- Ensure all latest config is installed and clear cache:
ddev drush deploy
- Login to your Pantheon Dashboard, and Generate a Machine Token for ddev to use.
- Add the API token to the web_environment section in your global ddev configuration at ~/.ddev/global_config.yaml
web_environment: - TERMINUS_MACHINE_TOKEN=abcdeyourtoken
- Restart ddev with
ddev restart
- Run
ddev pull pantheon
to connect to Pantheon and download the latest backup of the database and files for thedev
environment - Clear cache:
ddev drush cr
To run drush commands on any of the Pantheon-hosted dev sites, you will
need to use Terminus. After installing and setting up, you can run
terminus drush slac-alpha-d9.[env] -- [drush command]
. For example, to clear
cache on the dev site, run terminus drush slac-alpha-d9.dev -- cr
.
Xdebug is available in the Docker container but it is not running by default. To spin up the project with Xdebug enabled, run ddev xdebug
to turn xdebug on, or ddev xdebug off
when you're done.
You'll also need to install an Xdebug plugin for your browser. Xdebug Helper is available for Chrome and Firefox.
PHP Debug is a popular Visual Studio Code extension to add support for XDebug. You'll need to configure pathMappings in the launch.json settings for PHP Debug:
"pathMappings": {
"/var/www/html": "${workspaceRoot}"
}