lch / maintenance-bundle
Symfony LchMaintenanceBundle
Installs: 612
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.2
- symfony/console: ^4.2
- symfony/filesystem: ^4.2
- symfony/framework-bundle: ^4.2
Requires (Dev)
- symfony/phpunit-bridge: ^4.3
README
Provides helper to set web app in maintenance mode. This is useful when using automated deploying processes, ensuring website is properly inaccessible during the deploy process.
This bundle provides a flat html fil for maintenance splash screen. This is done to avoid generating cache during the maintenance time.
Installation
composer require lch/maintenance-bundle
Usage
Use the command to toggle maintenance mode :
php bin/console lch:maintenance:mode 1
for enabling maintenance (creates a.maintenance
file inpublic/
)php bin/console lch:maintenance:mode 0
for disabling maintenance (remove the.maintenance
file inpublic/
)
When maintenance mode is on, static splash html page will be served with a 503 HTTP code.
TODO
- make html file configurable
- add options
- Enhance exceptions
- ...