mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-22 23:56:29 +00:00
Merge pull request #1701 from wallabag/v2-maintenance
Fix #1351: add maintenance mode
This commit is contained in:
commit
2b71f68c95
7 changed files with 80 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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": "~2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||
|
|
32
docs/en/developer/maintenance.rst
Normal file
32
docs/en/developer/maintenance.rst
Normal file
|
@ -0,0 +1,32 @@
|
|||
Maintenance mode
|
||||
================
|
||||
|
||||
If you have some long tasks to do on your wallabag instance, you can enable a maintenance mode.
|
||||
Nobody will have access to your instance.
|
||||
|
||||
Enable maintenance mode
|
||||
-----------------------
|
||||
|
||||
To enable maintenance mode, execute this command:
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:lock --no-interaction
|
||||
|
||||
You can set your IP address in ``app/config/config.yml`` if you want to access to wallabag even if maintenance mode is enabled. For example:
|
||||
|
||||
::
|
||||
|
||||
lexik_maintenance:
|
||||
authorized:
|
||||
ips: ['127.0.0.1']
|
||||
|
||||
|
||||
Disable maintenance mode
|
||||
------------------------
|
||||
|
||||
To disable maintenance mode, execute this command:
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:unlock
|
|
@ -41,3 +41,4 @@ The main documentation for this application is organized into a couple sections:
|
|||
|
||||
developer/docker
|
||||
developer/translate
|
||||
developer/maintenance
|
||||
|
|
33
docs/fr/developer/maintenance.rst
Normal file
33
docs/fr/developer/maintenance.rst
Normal file
|
@ -0,0 +1,33 @@
|
|||
Mode maintenance
|
||||
================
|
||||
|
||||
Si vous devez effectuer de longues tâches sur votre instance de wallabag, vous pouvez activer le mode maintenance.
|
||||
Plus personne ne pourra accéder à wallabag.
|
||||
|
||||
Activer le mode maintenance
|
||||
---------------------------
|
||||
|
||||
Pour activer le mode maintenance, exécutez cette commande :
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:lock --no-interaction
|
||||
|
||||
Vous pouvez spécifier votre adresse IP dans ``app/config/config.yml`` si vous souhaitez accéder à wallabag même si
|
||||
le mode maintenance est activé. Par exemple :
|
||||
|
||||
::
|
||||
|
||||
lexik_maintenance:
|
||||
authorized:
|
||||
ips: ['127.0.0.1']
|
||||
|
||||
|
||||
Désactiver le mode maintenance
|
||||
------------------------------
|
||||
|
||||
Pour désactiver le mode maintenance, exécutez cette commande :
|
||||
|
||||
::
|
||||
|
||||
bin/console lexik:maintenance:unlock
|
|
@ -42,3 +42,4 @@ La documentation principale de cette application est découpée en plusieurs sec
|
|||
|
||||
developer/docker
|
||||
developer/translate
|
||||
developer/maintenance
|
||||
|
|
Loading…
Reference in a new issue