Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artgris/maintenancebundle
Symfony Bundle to place your Symfony website in maintenance mode
https://github.com/artgris/maintenancebundle
maintenance-mode symfony symfony-bundle symfony3
Last synced: 2 months ago
JSON representation
Symfony Bundle to place your Symfony website in maintenance mode
- Host: GitHub
- URL: https://github.com/artgris/maintenancebundle
- Owner: artgris
- Created: 2016-11-16T12:22:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-06T07:11:03.000Z (10 months ago)
- Last Synced: 2024-10-13T06:04:57.041Z (2 months ago)
- Topics: maintenance-mode, symfony, symfony-bundle, symfony3
- Language: PHP
- Size: 38.1 KB
- Stars: 23
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MaintenanceBundle
Symfony Bundle to place your Symfony website in maintenance mode - [**Default Maintenance Page**](https://artgris.github.io/MaintenanceBundle/)Installation
============### 1) Download
`composer require artgris/maintenance-bundle`
### 2) Configure the Bundle
Adds following configurations
to ` config/packages/artgris_maintenance.yaml` :
```yml
artgris_maintenance:
enable: true # Enable|Disable maintenance - default: false
ips: ["127.0.0.1","::1",...] # IPs allow (prod) - default: []
response: 503 # Maintenance Page HTTP Status Code - default: 503
```
### 3) Override maintenance.html.twig (optional)in `templates/bundles/ArtgrisMaintenanceBundle/maintenance.html.twig`
ex:
```twig
{% extends "@!ArtgrisMaintenance/maintenance.html.twig" %}{% block content %}
Site en cours de maintenance
Nous reviendrons bientôt. Désolé pour le dérangement.
{% endblock %}
```Usage
=====The `dev` environment was not affected by maintenance.
- Enable|Disable maintenance : `enable: true|false`
- Add authorized IPs to prod : `ips: ["127.0.0.1","::1",...]`
- Maintenance Page HTTP Status Code : `response: 503`Don't forget to clear the `prod` cache :
php bin/console cache:clear