{"id":24362190,"url":"https://github.com/matatirosolutions/corleymaintenancebundle","last_synced_at":"2025-04-10T10:43:54.688Z","repository":{"id":16393748,"uuid":"19144507","full_name":"matatirosolutions/CorleyMaintenanceBundle","owner":"matatirosolutions","description":"Maintenance web pages (Hard and Soft modes) - Symfony Bundle","archived":false,"fork":false,"pushed_at":"2023-04-24T21:12:58.000Z","size":74,"stargazers_count":23,"open_issues_count":2,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-08T15:09:08.970Z","etag":null,"topics":["bundle","maintenance","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"MineTheCube/MojangAPI","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matatirosolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-25T11:57:41.000Z","updated_at":"2024-11-13T14:26:19.000Z","dependencies_parsed_at":"2024-06-19T10:00:49.977Z","dependency_job_id":"347ebe7d-034c-4698-bc82-d172e0ba6bea","html_url":"https://github.com/matatirosolutions/CorleyMaintenanceBundle","commit_stats":{"total_commits":68,"total_committers":8,"mean_commits":8.5,"dds":"0.36764705882352944","last_synced_commit":"aed1576127d0bdd9b070509b9a83b5c5245088b1"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matatirosolutions%2FCorleyMaintenanceBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matatirosolutions%2FCorleyMaintenanceBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matatirosolutions%2FCorleyMaintenanceBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matatirosolutions%2FCorleyMaintenanceBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matatirosolutions","download_url":"https://codeload.github.com/matatirosolutions/CorleyMaintenanceBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248200450,"owners_count":21063898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle","maintenance","php","symfony","symfony-bundle"],"created_at":"2025-01-18T22:50:20.716Z","updated_at":"2025-04-10T10:43:54.660Z","avatar_url":"https://github.com/matatirosolutions.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Corley Maintenance Bundle\n\nA unified way of putting a web application under maintenance using web server strategies. The maintenance\nmode will cut off all requests and it will replies with a static html file and a 503 header (Service Unavailable).\n\nThose conditions will ensure that a load balancer cut an instance off during a maintenance\n\n[![Build Status](https://travis-ci.org/matatirosolutions/CorleyMaintenanceBundle.svg?branch=master)](https://travis-ci.org/matatirosolutions/CorleyMaintenanceBundle)\n\n## Install\n\n\nIn `composer.json` add the requirement. \n\nThe current version requires at least PHP 8.1 and a supported (as at time of release) version of Symfony (4.4, 5.4, 6.0 and 6.1).\n```json\n\"require\": {\n    \"corley/maintenance-bundle\": \"^0.5\"\n}\n```\n\nTo support earlier versions e.g. SF 3.4, 4.2, 4.3, 5.1 etc or PHP greater than 7.2 but less than 8.1 you will need to use: \n\n```json\n\"require\": {\n    \"corley/maintenance-bundle\": \"^0.4\"\n}\n```\n\nTo support earlier versions still, e.g. SF 2.x, 3.3, 4.1 etc or PHP less than 7.2 you will need to use:\n\n```json\n\"require\": {\n    \"corley/maintenance-bundle\": \"^0.2\"\n}\n```\nThis version can also be used for more recent Symfony versions, e.g. with 3.4 or 4.4 but is not compatible with Symfony 5 - only `0.3` or greater can be used there because of changes to the event structure in Symfony 5.0.\n\n\nFor pre-Flex applications register the bundle in `AppKernel.php`\n\n```php\npublic function registerBundles()\n{\n    ...\n    $bundles = array(\n        ...\n        new Corley\\MaintenanceBundle\\CorleyMaintenanceBundle(),\n    );\n    ...\n    return $bundles;\n}\n```\n\nFor projects built with recent versions of Flex, a default recipe will be generated which will add the bundle to your `bundles.php`. In older versions of Flex you may need to do this yourself\n```php\nCorley\\MaintenanceBundle\\CorleyMaintenanceBundle::class =\u003e ['all' =\u003e true],\n```\n\n## Maintenance mode\n\nWhen you want to put your web application under maintenance\n\n```shell\nbin/console corley:maintenance:lock on\n```\n\nRestore the application status\n\n```shell\nbin/console corley:maintenance:lock off\n```\n\n## Configure your web server\n\nIf you use Apache2 you have to add a few lines to your `.htaccess`, for nginx just add dedicated\nlines to web app configuration.\nMake sure that those lines precede any other rewrite rule.\nThe `mod_rewrite` module in Apache2 has to be installed and enabled.\n\nIn order to obtain your configuration options use the console\n\n### Apache2\n\n```shell\nbin/console corley:maintenance:dump-apache\n```\n### Nginx\n\n```shell\nbin/console corley:maintenance:dump-nginx\n```\n\n## Configuration\n\nYou can configure the bundle in order to change the default behaviour (all options have a default value)\n\nFor projects not using Flex\n```yml\n# config.yml\ncorley_maintenance:\n    page: %kernel.root_dir%/../web/maintenance.dist.html\n    hard_lock: lock.html\n    symlink: false\n    web: %kernel.root_dir%/../web\n```\n\nFor Flex projects\n```yml\n# config/packages/corley.yml\ncorley_maintenance:\n    page: %kernel.project_dir%/templates/maintenance.dist.html\n    hard_lock: lock.html\n    symlink: false\n```\n\nOptions:\n\n* `page` is the original maintenance page (default: `vendor/corley/maintenance-bundle/Corley/MaintenanceBundle/Resources/views/maintenance.html`)\n* `symlink` If you want to use symlinks instead hardcopy strategy (default: hardcopy)\n* `hard_lock` Is the name used in order to lock the website (default: `hard.lock`)\n* `web` public folder. Prior to 0.4 this defaulted to `%kernel.root_dir%/../web`, since 0.4.0 the new default is `%kernel.project_dir%/public` as the `%kernel.root_dir%` parameter has been deprecated since Symfony 4.2, and was removed in 5.1. If your project's public folder is still `web` (or some other folder) set this in the config file.\n* `soft_lock` Is the name used in order to lock the website (using app layer)\n* `whitelist` Authorized connections [soft-lock only]\n  * `paths` A list of paths that skip the maintenance lock\n  * `ips` A list of ips that skip the maintenance lock\n\n\n## Soft locking\nThe soft locking strategy uses the php layer in order to lock down the website. This means that the\napplication must work in order to lock down the web site.\n\nThe soft lock runs at `kernel.request` and stops other event propagation.\n\nWhen you want to put your web application under maintenance using a soft-locking strategy:\n\n```shell\nbin/console corley:maintenance:soft-lock on\n```\n\nRestore the application status\n\n```shell\nbin/console corley:maintenance:soft-lock off\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatatirosolutions%2Fcorleymaintenancebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatatirosolutions%2Fcorleymaintenancebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatatirosolutions%2Fcorleymaintenancebundle/lists"}