Note: this has only been tested on ddev 1.19 and above.
-
Clone main branch of repo:
git clone -b main [email protected]:USEPA/webcms.git
-
Then, start the project:
cd services/drupal && ddev start
-
Next, create the S3 bucket for s3fs:
ddev aws-setup
-
After that, please download the latest database (see https://forumone.atlassian.net/wiki/spaces/EPA/pages/1794637894/HOWTO+Import+D8+InnoDB+Cold+Backup) and put the .tar file in the
services/drupal/.ddev/db/
folder. The filename isn't important; you will be prompted to select the DB you wish to import during the next step. -
Import the database by running
ddev import-db
ddev import-db [--file=path/to/backup.sql.gz]
Note that for very large dumps this may time out. Sometimes, DDEV lets the import process run in the background (verify this by watching the CPU and I/O activity of
docker stats
).If DDEV kills the import process, try connecting a MySQL command-line client directly to the container (use
ddev status
to see the forwarded MySQL port) and import that way. -
Copy
cp .env.example .env
. -
Install dependencies:
ddev composer install
-
Install the requirements for the theme:
ddev gesso install
:ddev gesso install
-
Building/watching the CSS and Pattern Lab:
- to build
ddev gesso build
- to watch:
ddev gesso watch
-
Install Drupal from config (or restore a backup). You can install from config by running:
Note: Do not run this command if starting from a new installation. This will wipe the database out, instead skip to #11.
ddev drush si --existing-config
- Ensure the latest configuration has been fully applied and clear cache:
ddev drush deploy -y
-
Edit your
services/drupal/.env
file and change the line that readsENV_STATE=build
to readENV_STATE=run
-- without this change you will not make use of memcached caching. -
To unblock the user run
ddev drush user:unblock drupalwebcms-admin
-
Access the app at https://epa.ddev.site
- Terraform configuration: see infrastructure/terraform.
- Builds: see .buildkite.
If you run into an error trying to use elasticsearch
. Please run the following command:
ddev poweroff && docker volume rm ddev-epa-ddev_elasticsearch && ddev start
You will need to re-index
.
Here is a list of helpful commands:
ddev gesso install
> Installs the node modules needed forepa_core
.ddev gesso build
> Builds the current assets for CSS & PatternLab.ddev gesso watch
> Same thing as build but will watch for changes.ddev ssh
> Goes into the web container.ddev drush
> Runs any drush command.ddev import-db
> Will import a specific database.ddev export-db
> mExports a database with the current date.ddev aws-setup
> Sets up the requirements to get drupal file system to workddev describe
orddev status
> Get a detailed description of a running DDEV project.ddev phpmyadmin
> Launch a browser with PhpMyAdmin
The United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity , confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government.