Skip to content

Commit

Permalink
Merge pull request #2 from department-of-veterans-affairs/develop
Browse files Browse the repository at this point in the history
Update from VAGOV
  • Loading branch information
schiavo authored Jan 9, 2019
2 parents d409f37 + 6ecb076 commit b7106ca
Show file tree
Hide file tree
Showing 22 changed files with 1,136 additions and 46 deletions.
1 change: 1 addition & 0 deletions Dockerfile-appserver
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ COPY docker/config/engine/scripts/add-cert.sh /scripts/add-cert.sh
COPY docker/config/engine/scripts/load-keys.sh /scripts/load-keys.sh
COPY docker/config/services/helpers/sql-import.sh /helpers/sql-import.sh
COPY docker/config/services/helpers/sql-export.sh /helpers/sql-export.sh
COPY docker/config/engine/scripts/wait-for-it.sh /usr/bin/wait-for-it.sh
COPY . /app

# Custom vagovcms settings
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-database
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY docker/config/services/config/drupal8/mysql /etc/mysql/conf.d
COPY docker/config/engine/scripts/lando-entrypoint.sh /lando-entrypoint.sh
COPY . /app
COPY docker/config /lando
COPY drupal8.headless.gz /docker-entrypoint-initdb.d/dump.sql.gz
COPY drupal8-fixed.headless.gz /docker-entrypoint-initdb.d/dump.sql
COPY docker/config/engine/scripts/user-perms.sh /helpers/user-perms.sh
COPY docker/config/engine/scripts/add-cert.sh /scripts/add-cert.sh
COPY docker/config/engine/scripts/load-keys.sh /scripts/load-keys.sh
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@ How to start:
What it does:
* Spins up php, mysql, and node containers
* Dependencies (including components project) are pulled in via composer
* Base config installs uswds and sets a subtheme for this project
* Base config installs uswds and sets a subtheme for this project (project is headless, so this isn't critical)

How to use:
* visit the site by clicking one of the urls provided (aliased and https options are available)
* compile scss to css by going to theme dir and running `lando gulp`
* drush commands are prefixed with lando, e.g.: `lando drush cr`
* composer is used for project management, e.g.: `composer require drupal/uswds`

Theme structure:
Theme structure (project is headless, so this isn't critical):
* Base theme is USWDS: https://www.drupal.org/project/uswds
* vagov Subtheme lives in themes/custom
* Uses twig templating
* Scss is compiled to css via gulp (from vagov dir run `lando gulp`)

Running Behat Tests:
* `cd tests`
* `cd tests/behat`
* `lando behat --tags=name-of-tag`

Running Phpunit Tests:
Expand All @@ -52,6 +50,9 @@ Xdebug:
* Set a test breakpoint on /docroot/vendor/drush/drush/drush
* Run `lando drush status` and it should trigger the breakpoint

Troubleshooting:
* Sometimes after initial setup or `lando start`, Drush is not found. Running `lando rebuild -y` once or twice usually cures, if not, see: https://github.com/lando/lando/issues/580#issuecomment-354490298

Workflow:
* We use [drupal-spec-tool](https://github.com/acquia/drupal-spec-tool) to keep track of config changes, and sync tests
* After updating config, cd into /tests, and run `lando behat --tags=spec`
Expand All @@ -64,6 +65,5 @@ pertains to the test you are updating, and paste into the test file in /tests/be
* Export config to code: `lando drush config:export` then commit changes to code.

Todo:
* Configure phantomjs to run js phpunit tests - using this pattern for setup is not working: https://www.breaktech.com/blog/using-lando-for-drupal-development.
* decide how we are going to sync files across environments
* work out settings.php for various environments - lando db settings are stored in settings.lando.php
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"drush/drush": "^9.0",
"drupal/media_entity_generic": "^1.0",
"acquia/lightning_dev": "dev-8.x-1.x",
"acquia/drupal-spec-tool": "^2.0",
"phpunit/phpunit": "^6"
"acquia/drupal-spec-tool": "^2.0"
},
"require": {
"drupal-composer/drupal-scaffold": "^2.0.0",
Expand Down Expand Up @@ -43,7 +42,9 @@
"drupal/node_title_help_text": "^1.0",
"drupal/field_group": "^1.0",
"drupal/social_media_links": "^2.6",
"weitzman/drupal-test-traits": "dev-master"
"phpunit/phpunit": "^6",
"weitzman/drupal-test-traits": "dev-master",
"drupal/redirect": "^1.3"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit b7106ca

Please sign in to comment.