bcgov / workbc-main

Apache License 2.0
3 stars 3 forks source link

workbc-main

This is the WorkBC.ca site on Drupal.

Lifecycle:Maturing

Initial setup

For Windows users, you need a version of Windows that is able to run Docker using Hyper-V backend, e.g. Windows 10 Pro. When running a command above in PowerShell, you may need to wrap it using cmd /c "command".

Updating local dev environment from a deployment stage

You may want to get the latest data from a deployment stage (DEV, TEST or PROD). In that case, follow these steps:

Installing modules

Backup / restore

This repo includes a patched version of Backup and Migrate that supports PostgreSQL using the native pg_dump and psql tools. You can backup and restore Drupal, SSoT databases as well as Drupal public files using the module, using either the Drupal Admin UI or using drush:

Theming / styling

The WorkBC theme is a Bootstrap 5 subtheme.

Fonts

B.C. Government digital services are expected to make use of BCSans. See https://developer.gov.bc.ca/Typography for more details.

Development

The php Docker container has yarn, grunt, and grunt-dart-sass set up for compilation. You will need to yarn install from src/ to install all of the dependencies first.

Once dependencies are in place: yarn run grunt dart-sass will compile everything starting with the style.scss, and yarn run grunt watch will start a watch on all .scss files, and compile on detecting changes.

Testing / debugging

Load-testing

Refer to the src/scripts/test folder for instructions on load-testing the site.

Xdebug

The instructions here concern setting up Xdebug with Visual Studio Code. The current docker-compose.yml file enables Xdebug and attempts to connect the PHP container to VS Code's debugger listening on port 9003.

Testing the Drupal cache

By default, caching is disabled in the local development environment. To turn it on, set

const LOCAL_CACHE_ACTIVE = TRUE;

in the file settings.local.php.

Content migration / seeding

Troubleshooting