Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpalourdio/zf2-maintenance-mode
ZF2 maintenance mode module
https://github.com/mpalourdio/zf2-maintenance-mode
maintenance module zf2
Last synced: about 1 month ago
JSON representation
ZF2 maintenance mode module
- Host: GitHub
- URL: https://github.com/mpalourdio/zf2-maintenance-mode
- Owner: mpalourdio
- License: mit
- Created: 2015-06-11T23:00:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-29T09:12:33.000Z (almost 6 years ago)
- Last Synced: 2024-03-30T15:46:17.742Z (8 months ago)
- Topics: maintenance, module, zf2
- Language: PHP
- Size: 16.6 KB
- Stars: 2
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![PHP 7.0+][ico-engine]][lang]
[![MIT Licensed][ico-license]][license][ico-engine]: http://img.shields.io/badge/php-7.0+-8892BF.svg
[lang]: http://php.net
[ico-license]: http://img.shields.io/packagist/l/adlawson/veval.svg
[license]: LICENSEzf2 maintenance mode
====================This ZF2 "maintenance mode" module allows you to stall your application to maintenance (503 by default) via CLI.
It's heavily inspired from the [apigility development mode module] (https://github.com/zfcampus/zf-development-mode).It mainly short-circuits the module manager during modules initialization and short-circuits the framework bootstrapping to prevent any service to load, like db connections for example.
Requirements
============
PHP 7.0+Installation
============
Run the command below to install via Composer```shell
composer require mpalourdio/zf2-maintenance-mode
```Add "ZfMaintenanceMode" to your **modules list** in **application.config.php**
Eventually, copy ```maintenance.config.global.php.dist``` to ```config/autoload/maintenance.config.global.php``` to personalize the message and/or the http status code and/or the path of the flag file.
Instead of the message, you can add an html status page by providing the ```html``` option parameter.
Enable maintenance mode
==========================```sh
cd path/to/project/root
php public/index.php maintenance enable
```Note: clear your cached configuration if needed.
Disable maintenance mode
===========================```sh
cd path/to/project/root
php public/index.php maintenance disable
```