From fbbda941102326ac91c2ebf2f67a269860290ad7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 19 Feb 2016 14:33:28 +0100 Subject: [PATCH] Fix #1351: add maintenance mode --- app/AppKernel.php | 1 + app/config/config.yml | 10 ++++++++++ composer.json | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/AppKernel.php b/app/AppKernel.php index 82d3aa38..08c9cc27 100644 --- a/app/AppKernel.php +++ b/app/AppKernel.php @@ -34,6 +34,7 @@ class AppKernel extends Kernel new Wallabag\ImportBundle\WallabagImportBundle(), new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Craue\ConfigBundle\CraueConfigBundle(), + new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(), ]; if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { diff --git a/app/config/config.yml b/app/config/config.yml index bd269b07..07a4b0b6 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -200,3 +200,13 @@ scheb_two_factor: kphoen_rulerz: executors: doctrine: true + +lexik_maintenance: + authorized: + ips: ['127.0.0.1'] + driver: + ttl: 3600 + class: 'Lexik\Bundle\MaintenanceBundle\Drivers\DatabaseDriver' + response: + code: 503 + status: "wallabag Service Temporarily Unavailable" diff --git a/composer.json b/composer.json index c65ebda1..826eb91b 100644 --- a/composer.json +++ b/composer.json @@ -65,7 +65,8 @@ "doctrine/doctrine-migrations-bundle": "^1.0", "paragonie/random_compat": "~1.0", "craue/config-bundle": "~1.4", - "mnapoli/piwik-twig-extension": "^1.0" + "mnapoli/piwik-twig-extension": "^1.0", + "lexik/maintenance-bundle": "dev-master" }, "require-dev": { "doctrine/doctrine-fixtures-bundle": "~2.2", -- 2.41.0