All Projects → antonioribeiro → Deeployer

antonioribeiro / Deeployer

Licence: mit
Deploy your Laravel applications via Github or Bitbucket Hooks

Projects that are alternatives of or similar to Deeployer

Cipi
An Open Source Control Panel for your Cloud! Deploy and manage LEMP apps in one click!
Stars: ✭ 376 (+149.01%)
Mutual labels:  laravel, deployment
Envoy Deployscript
Laravel Envoy Deployment Script
Stars: ✭ 160 (+5.96%)
Mutual labels:  laravel, deployment
Laravel Caprover Template
Template to deploy a Laravel app in docker for CapRover
Stars: ✭ 56 (-62.91%)
Mutual labels:  laravel, deployment
Webloyer
Webloyer is a web UI for managing Deployer deployments
Stars: ✭ 199 (+31.79%)
Mutual labels:  laravel, deployment
Larapush
artisan push - Deploy your codebase into your web server with one Laravel artisan command and no SSH needed!
Stars: ✭ 150 (-0.66%)
Mutual labels:  laravel, deployment
Deployer
Deployer is a free and open source deployment tool.
Stars: ✭ 854 (+465.56%)
Mutual labels:  laravel, deployment
Laravel Deployer
🚀 Zero-downtime deployment out-of-the-box
Stars: ✭ 1,536 (+917.22%)
Mutual labels:  laravel, deployment
Laravel Translatable String Exporter
Translatable String Exporter for Laravel
Stars: ✭ 149 (-1.32%)
Mutual labels:  laravel
Laravel Graphql
Facebook GraphQL for Laravel 5. It supports Relay, eloquent models, validation and GraphiQL.
Stars: ✭ 1,793 (+1087.42%)
Mutual labels:  laravel
Laravel Api Templates
Laravel API starter kit collection using different structures.
Stars: ✭ 149 (-1.32%)
Mutual labels:  laravel
Laravel Shortcodes
Wordpress like shortcodes for Laravel 4.2, 5.x, 6.x, 7.x and 8.x
Stars: ✭ 148 (-1.99%)
Mutual labels:  laravel
Laravel Admin Template
Laravel 4.2 Bootstrap Admin Starter Template [with Oracle DB Support]
Stars: ✭ 149 (-1.32%)
Mutual labels:  laravel
Larecipe
🍪 Write gorgeous documentation for your products using Markdown inside your Laravel app.
Stars: ✭ 1,953 (+1193.38%)
Mutual labels:  laravel
Request Migrations
HTTP Request Migrations for API Versioning like Stripe
Stars: ✭ 149 (-1.32%)
Mutual labels:  laravel
Laravel Api Handler
Package providing helper functions for a Laravel REST-API
Stars: ✭ 150 (-0.66%)
Mutual labels:  laravel
Has Parameters
A trait that allows you to pass arguments to Laravel middleware in a more PHP'ish way.
Stars: ✭ 149 (-1.32%)
Mutual labels:  laravel
Adminlte Laravel
A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template and Pratt Landing Page with Bootstrap 3.0
Stars: ✭ 1,814 (+1101.32%)
Mutual labels:  laravel
Laravel Meta
HTML Meta Tags management package available for for Laravel 5.*
Stars: ✭ 150 (-0.66%)
Mutual labels:  laravel
Nova Cashier Manager
Managing Stripe subscriptions inside the incredible Laravel Nova admin panel.
Stars: ✭ 150 (-0.66%)
Mutual labels:  laravel
Laravel Gitlab
A GitLab bridge for Laravel
Stars: ✭ 150 (-0.66%)
Mutual labels:  laravel

Deeployer

Latest Stable Version

Automatically deploy Laravel applications every time it's pushed to the remote repository

Deployment via git webhooks is a common functionallity of most PaaS these days. This package is intended to be used for those that are hosting their websites in VPS, dedicated server or any other hosting provider that doesn't support web hooks.

Since this package uses Laravel remote (SSH-2) functionality to remote or locally deploy applications, your deployment app can be in one server and deploy applications to others, as many as you need.

Compatibility

This package currently works with

  • Github
  • Bitbucket

Using it with Laravel Envoy

Define an url for your deployer to be used, in Github you can find this at Settings > Service Hooks > WebHook URLs > URL, example:

http://deployer.yoursite.io/deploy

Create a route in your application for the deployer url:

Route::post('deploy', function() 
{
    return Deeployer::run();
});

If you are using Laravel Envoy, install it and create tasks using your project url and the branch as the task name:

@task('https://github.com/you/repo-name:master', ['on' => ['localhost']])
    touch /tmp/envoy-passthrough.txt
@endtask

And that's it, you're good to go! Configure your webook, push something and wait for it.

Normal Usage

If you prefer to use Deeployer own deployment system, edit the file app/config/packages/pragmarx/deeployer/config.php and create your projects. In my opinion, is better to not use the master branch while automatically deploying apps:

'projects' => array(
                        array(
                                'ssh_connection' => 'yoursite-staging',

                                'git_repository' => 'https://github.com/yourname/yoursite.io',

                                'git_remote' => 'origin',

                                'git_branch' => 'staging',

                                'remote_directory' => '/var/www/vhosts/yoursite.io/staging/',

                                'composer_update' => true,

                                'composer_optimize_autoload' => true,

                                'composer_extra_options' => '',

                                'composer_timeout' => 60 * 5, // 5 minutes

                                'artisan_migrate' => false,

                                'post_deploy_commands' => array(
                                                                    'zsh send-deployment-emails.sh',
                                                                ),
                            ),
                    ),

Create the remote connection by editing app/config/remote.php:

	'connections' => array(

		'yoursite-staging' => array(
			'host'     => 'yoursite.com:22', <-- you can set a different SSH port if you need 
			'username' => 'root',            <-- the user you use to deploy applications on your server
			'password' => 'Bassw0rt',
			'key'      => '',                <-- key files are safer than passwords
			'root'     => '/var/www',        <-- you can ignore this, deployment path will be changed by Deeployer
		),

	),

Go to your server and tail the log file:

php artisan tail

Add that url to Github or Bitbucket.

Push something to your branch to automatically deploy your application:

git pull origin master:testing
git pull origin master:staging
git pull origin master:production

If you are just testing, in Github you can press 'Test Hook' button, after saving your URL.

Installation

Requirements

  • Laravel 4.1+
  • Composer >= 2014-01-07 - This is a PSR-4 package
  • SSH-2 Server

Installing

First, you need to be sure you have a Composer that supports PSR-4, so execute

composer self-update

or

sudo composer self-update

Require the Deeployer package:

composer require pragmarx/deeployer dev-master

Once this operation completes, add the service provider to your app/config/app.php:

'PragmaRX\Deeployer\Vendor\Laravel\ServiceProvider',

Publish and edit the configuration file:

artisan config:publish pragmarx/deeployer

TODO

  • Create a deployment artisan command, to manually deploy something troubled.

  • Tests, tests, tests.

  • Bitbucket is not done yet. (DONE!)

Author

Antonio Carlos Ribeiro - [email protected] - http://twitter.com/iantonioribeiro

License

Deeployer is licensed under the MIT License - see the LICENSE file for details

Contributing

Pull requests and issues are more than welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].