velikonja / labby-bundle
Symfony bundle for retrieving database and assets from one stage to another.
Installs: 6 134
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.9
- symfony/framework-bundle: >2.3.1
- symfony/symfony: >2.3.1
- velikonja/sync-fs: ~0.2
Requires (Dev)
- doctrine/doctrine-bundle: ^1.2
- friendsofsymfony/user-bundle: *
- phpmd/phpmd: ~2.1
- phpunit/phpunit: ~4.3
- sebastian/phpcpd: ~2.0
- sensio/framework-extra-bundle: >2.3
- squizlabs/php_codesniffer: ~2.0
- symfony/phpunit-bridge: 2.7.x-dev
This package is auto-updated.
Last update: 2024-11-29 04:52:09 UTC
README
LabbyBundle is Symfony bundle for retrieving database and assets from one stage to another.
Warning Bundle is in early stage of development.
Installation
Prerequisites
- SSH connection to the remote server.
Add LabbyBundle by running this command
$ composer.phar require velikonja/labby-bundle "@stable"
Enable the bundle in AppKernel
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Velikonja\LabbyBundle\VelikonjaLabbyBundle(), ); }
Configure the bundle
velikonja_labby: # process_timeout: 300 # Timeout for each external process run (import, dump, ssh, scp, ...). # roles: [ remote, local ] remote: hostname: example.com # Server where the remote is hosted. path: /var/www/app # Path to application on remote. # env: prod # SF env to be run on remote (default true) fs: # timeout: 60 # Number of seconds in which one mapping (not all of them) sync timeouts. maps: # You can define more different mappings uploads: src: example.com:/var/www/uploads/ # Mind the trailing slash dst: web/uploads/ data: src: example.com:/var/www/data/ dst: app/data/ # db: # recreate: true # By default this value is true # Following options are automatically fetched from doctrine.dbal configuration. # driver: ~ # dbname: ~ # host: ~ # port: ~ # user: ~ # password: ~ # charset: ~ # Run commands (symfony or shell) on certain events. # event_executors: # pre_sync: # - shell: "whoami" # post_sync: # - sf: "cache:clear" # post_sync.db: # - sf: "fos:user:change-password admin admin"
Use the command to sync
Warning: Before you can first sync with remote, you have to deploy the code and configuration to remote.
Sync assets and database:
$ app/console labby:sync
Sync only DB:
$ app/console labby:sync:db
Sync only assets:
$ app/console labby:sync:fs
Contributing
Install dependencies
$ composer.phar install
Run tests
$ bin/phpunit
Check .travis.yml
for more information about setting up test environment.
Extra
$ bin/phpmd . text cleancode, codesize, controversial, design, naming, unusedcode --exclude vendor/ $ bin/phpcpd . --exclude=vendor