fspringveldt / db-read-only-mode
Places a SilverStripe website in read-only mode, blocking all write requests.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Type:silverstripe-module
Requires
- silverstripe/cms: ^3.4
- silverstripe/framework: ^3.4
This package is auto-updated.
Last update: 2024-11-13 10:39:53 UTC
README
This module places your entire SilverStripe site into read only mode to safely reduce downtime during deployments. When activated all DML and DQL queries which changes the data are blocked from executing, allowing user to continue using your site in a view-only mode.
Minimum requirements
silverstripe/framework: ^3.4.*
silverstripe/cms: ^3.4.*
Installation and Setup
To install, run below from root of SilverStripe installation:
> composer require fspringveldt/db-read-only-mode
http://your-site-url?flush=1 once composer is complete the flush the manifest.
Switching it on and off
Readonly mode is activated by default. To switch it on, find below in _ config/app.yml
ReadOnlyAspect: properties: activate: 1
and change the 1 to 0. Then flush again to clear the cache manifest, activating the module.
Switching off exceptions
If you'd like to throw a catchable exception, then switch it on in _ config/app.yml
ReadOnlyAspect: properties: throwExceptions: 0
by changing the 0 to 1. Flush the manifest afterwards.