Maintenance page, pretty and simple.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
res
src
.gitignore
LICENSE.md
README.md
composer.json

README.md

FiveOhThree (503)

Latest Stable Version License

Easy to setup maintenance page.

Installation

composer require mesavolt/five-oh-three

Usage

In your app's entry point (something like public/app.php or web/app.php), add these two lines as very first instructions:

<?php

require __DIR__.'/../vendor/mesavolt/five-oh-three/src/FiveOhThree.php';
FiveOhThree::checkAndRender();

Before deploying your application, create a deploying.lock file in your project's root directory. Remove it once your app can go live:

# deploy-my-project.sh

# Create the lock file
touch deploying.lock

# Here goes your usual deployment steps
export SYMFONY_ENV=prod
composer -n --ansi --no-dev install --optimize-autoloader
bin/console --ansi -n --env=prod cache:clear --no-warmup
# ...

# Remove the lock file
rm deploying.lock

Customization

FiveOhThree::checkAndRender([
    'lock_path' => __DIR__.'/../estoy-deployin.lock',   // path to lock file
    'template' => __DIR__.'/res/deploying.html',        // path to custom template (can either be a PHP or HTML file)

    // when using the default template:
    'auto_refresh' => false,            // you can disable the auto-refresh...
    'auto_refresh_interval' => 30,      // ... or customize its interval
    'icon' => 'http://bestanimations.com/Site/Construction/under-construction-animated-gif-8.gif',
]);