Coder Social home page Coder Social logo

mayeco / lswautomaticupdatebundle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leaseweb/lswautomaticupdatebundle

1.0 2.0 0.0 171 KB

Symfony2 bundle that enables automatic updates of the application from the Web Debug Toolbar.

License: MIT License

PHP 100.00%

lswautomaticupdatebundle's Introduction

LswAutomaticUpdateBundle

screenshot

Symfony2 bundle that enables automatic updates of the application from the Web Debug Toolbar.

screenshot

Installation

Installation is broken down in 4 easy steps.

Step 1: Download LswAutomaticUpdateBundle using composer

Add LswAutomaticUpdateBundle in your composer.json:

{
    "require": {
        "leaseweb/automatic-update-bundle": "*",
        ...
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update leaseweb/automatic-update-bundle

Composer will install the bundle to your project's vendor/leaseweb directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    ...

    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        ...
        $bundles[] = new Lsw\AutomaticUpdateBundle\LswAutomaticUpdateBundle();
    }

}

Step 3: Add routes to support automatic update

Add the following lines to app/config/routing_dev.yml:

automatic_update:
    resource: "@LswAutomaticUpdateBundle/Resources/config/routing/update.yml"

Step 4: Allow access to the automatic update actions

Add the following lines to app/config/security.yml:

automatic_update:
    pattern: ^/update/
    security: false

Configuration

In parameters.yml you can specify the following:

parameters:
    automatic_update.options:
        secret: "SomeVerySecretPassword"
        dry_run_commands:
            - "svn status -u"
            - "php composer.phar update --dry-run --ansi"
            - "app/console doctrine:schema:update --dump-sql"
        execute_commands:
            - "svn up"
            - "php composer.phar update --ansi"
            - "app/console doctrine:schema:update --force"

NB: You might want to run 'apache2-mpm-itk' to enable your website to run as a normal user, not as 'www-data', because this will simplify file rights management.

License

This bundle is under the MIT license.

The "circular arrows" icon in the web debug toolbar is part of the Picas icon set (official website: http://www.picasicons.com). The icon is licensed and may only be used to identifying the LswAutomaticUpdateBundle in the Symfony2 web debug toolbar. All ownership and copyright of this icon remain the property of Rok Benedik.

lswautomaticupdatebundle's People

Contributors

fabiencrassat avatar

Stargazers

Angus H. avatar

Watchers

Mario Young avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.