2017 © Pedro Peláez
 

symfony-bundle maintenance-bundle

Corley Maintenance Bundle

image

corley/maintenance-bundle

Corley Maintenance Bundle

  • Monday, June 13, 2016
  • by wdalmut
  • Repository
  • 3 Watchers
  • 15 Stars
  • 27,203 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 15 Versions
  • 11 % Grown

The README.md

Corley Maintenance Bundle

THIS REPO IS NOW MIGRATED TO ANOTHER MAINTAINER: https://github.com/steveWinter/CorleyMaintenanceBundle, (*1)

Just an unified way to put a web application under maintenance mode using web server strategies. The maintenance mode will cut off all requests and it will replies with a static html file and a 503 header (Service Unavailable)., (*2)

Those conditions will ensure that a load balancer cut an instance off during a maintenance, (*3)

Build Status, (*4)

Install

In your composer.json add the requirement, (*5)

"require": {
    "corley/maintenance-bundle": "0.2.*"
}

Register the bundle in your AppKernel, (*6)

public function registerBundles()
{
    ...
    $bundles = array(
        ...
        new Corley\MaintenanceBundle\CorleyMaintenanceBundle(),
    );
    ...
    return $bundles;
}

Maintenance mode

When you want to put your web application under maintenance, (*7)

bin/console corley:maintenance:lock on

Restore the application status, (*8)

bin/console corley:maintenance:lock off

Configure your web server

If you use Apache2 you have to add few lines to your .htaccess, in case of nginx just add dedicated lines to web app configuration. Make sure that those lines precede any other rewrite rule. The mod_rewrite module in Apache2 has to be installed and enabled., (*9)

In order to obtain your configuration options just use the console, (*10)

Apache2

bin/console corley:maintenance:dump-apache

Nginx

bin/console corley:maintenance:dump-nginx

Configuration

You can configure the bundle in order to change the default behaviour (all options has a default value), (*11)

# config.yml
corley_maintenance:
    page: %kernel.root_dir%/../web/maintenance.dist.html
    hard_lock: lock.html
    symlink: false

Options:, (*12)

  • page is the original maintenance page
  • symlink If you want to use symlinks instead hardcopy strategy
  • hard_lock Is the name used in order to lock the website
  • web public folder (by default web folder)
  • soft_lock Is the name used in order to lock the website (using app layer)
  • whilelist Authorized connections [soft-lock only]
    • paths A list of paths that skip the maintenance lock
    • ips A list of ips that skip the maintenance lock

Soft locking

The soft locking strategy use the php layer in order to lock down the website. This means that the application must works in order to lock down the web site., (*13)

The soft lock runs at kernel.request and stop other event propagations., (*14)

When you want to put your web application under maintenance using a soft-locking strategy:, (*15)

bin/console corley:maintenance:soft-lock on

Restore the application status, (*16)

bin/console corley:maintenance:soft-lock off

The Versions

13/06 2016

dev-master

9999999-dev

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

12/06 2016

0.2.3

0.2.3.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

05/06 2016

0.2.2

0.2.2.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

05/06 2016

0.2.1

0.2.1.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

05/06 2016

0.2.0

0.2.0.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

12/01 2016

0.1.9

0.1.9.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

23/08 2015

0.1.8

0.1.8.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

26/09 2014

0.1.7

0.1.7.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

27/04 2014

0.1.6

0.1.6.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

26/04 2014

0.1.5

0.1.5.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

26/04 2014

0.1.4

0.1.4.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

25/04 2014

0.1.3

0.1.3.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

25/04 2014

0.1.2

0.1.2.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

25/04 2014

0.1.1

0.1.1.0

Corley Maintenance Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

maintenance apache apache2 nginx maintenance management 503

25/04 2014