From 7e3d0f72df9de140a8118e4aa5b0a267a79ae28e Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 23 Jan 2018 16:08:39 +1300 Subject: [PATCH] NEW Add environmentcheck configuration as a project-file --- composer.json | 4 +++- mysite/_config/environmentcheck.yml | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 mysite/_config/environmentcheck.yml diff --git a/composer.json b/composer.json index 007f43f..d7b6719 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,9 @@ "phpunit/PHPUnit": "^5.7" }, "extra": { - "project-files": [], + "project-files": [ + "mysite/*" + ], "branch-alias": { "dev-master": "2.x-dev" } diff --git a/mysite/_config/environmentcheck.yml b/mysite/_config/environmentcheck.yml new file mode 100644 index 0000000..5e66ae6 --- /dev/null +++ b/mysite/_config/environmentcheck.yml @@ -0,0 +1,15 @@ +--- +Name: cwpcoreenvironmentchecks +--- +SilverStripe\EnvironmentCheck\EnvironmentCheckSuite: + registered_checks: + db: + definition: 'SilverStripe\EnvironmentCheck\Checks\DatabaseCheck()' + title: 'Is the database accessible?' + solr: + definition: 'SilverStripe\EnvironmentCheck\Checks\SolrIndexCheck()' + title: 'Are all Solr indexes available?' + registered_suites: + health: + - db + - solr