{"id":15525164,"url":"https://github.com/antonioribeiro/deeployer","last_synced_at":"2025-05-08T00:09:02.720Z","repository":{"id":12961219,"uuid":"15639574","full_name":"antonioribeiro/deeployer","owner":"antonioribeiro","description":"Deploy your Laravel applications via Github or Bitbucket Hooks","archived":false,"fork":false,"pushed_at":"2015-02-18T16:26:52.000Z","size":403,"stargazers_count":146,"open_issues_count":4,"forks_count":12,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-08T00:08:54.824Z","etag":null,"topics":["deployment","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonioribeiro.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-04T21:02:43.000Z","updated_at":"2022-11-17T03:52:23.000Z","dependencies_parsed_at":"2022-09-18T23:11:55.018Z","dependency_job_id":null,"html_url":"https://github.com/antonioribeiro/deeployer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Fdeeployer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Fdeeployer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Fdeeployer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Fdeeployer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonioribeiro","download_url":"https://codeload.github.com/antonioribeiro/deeployer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252973690,"owners_count":21834108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployment","laravel","php"],"created_at":"2024-10-02T10:55:20.324Z","updated_at":"2025-05-08T00:09:02.699Z","avatar_url":"https://github.com/antonioribeiro.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deeployer\r\n\r\n[![Latest Stable Version](https://poser.pugx.org/pragmarx/deeployer/v/stable.png)](https://packagist.org/packages/pragmarx/deeployer)\r\n\r\n#### Automatically deploy Laravel applications every time it's pushed to the remote repository\r\n\r\nDeployment 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.\r\n\r\nSince 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.\r\n\r\n#### Compatibility\r\n\r\nThis package currently works with\r\n\r\n- Github\r\n- Bitbucket\r\n\r\n### Using it with Laravel Envoy\r\n\r\nDefine an url for your deployer to be used, in Github you can find this at Settings \u003e Service Hooks \u003e WebHook URLs \u003e URL, example:\r\n\r\n```\r\nhttp://deployer.yoursite.io/deploy\r\n```\r\n\r\nCreate a route in your application for the deployer url:\r\n\r\n```\r\nRoute::post('deploy', function() \r\n{\r\n    return Deeployer::run();\r\n});\r\n```\r\n\r\nIf you are using Laravel Envoy, install it and create tasks using your project url and the branch as the task name:\r\n\r\n```\r\n@task('https://github.com/you/repo-name:master', ['on' =\u003e ['localhost']])\r\n    touch /tmp/envoy-passthrough.txt\r\n@endtask\r\n```\r\n\r\nAnd that's it, you're good to go! Configure your webook, push something and wait for it.\r\n\r\n### Normal Usage\r\n\r\nIf 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:\r\n\r\n```\r\n'projects' =\u003e array(\r\n                        array(\r\n                                'ssh_connection' =\u003e 'yoursite-staging',\r\n\r\n                                'git_repository' =\u003e 'https://github.com/yourname/yoursite.io',\r\n\r\n                                'git_remote' =\u003e 'origin',\r\n\r\n                                'git_branch' =\u003e 'staging',\r\n\r\n                                'remote_directory' =\u003e '/var/www/vhosts/yoursite.io/staging/',\r\n\r\n                                'composer_update' =\u003e true,\r\n\r\n                                'composer_optimize_autoload' =\u003e true,\r\n\r\n                                'composer_extra_options' =\u003e '',\r\n\r\n                                'composer_timeout' =\u003e 60 * 5, // 5 minutes\r\n\r\n                                'artisan_migrate' =\u003e false,\r\n\r\n                                'post_deploy_commands' =\u003e array(\r\n                                                                    'zsh send-deployment-emails.sh',\r\n                                                                ),\r\n                            ),\r\n                    ),\r\n```\r\n\r\nCreate the remote connection by editing `app/config/remote.php`:\r\n\r\n```\r\n\t'connections' =\u003e array(\r\n\r\n\t\t'yoursite-staging' =\u003e array(\r\n\t\t\t'host'     =\u003e 'yoursite.com:22', \u003c-- you can set a different SSH port if you need \r\n\t\t\t'username' =\u003e 'root',            \u003c-- the user you use to deploy applications on your server\r\n\t\t\t'password' =\u003e 'Bassw0rt',\r\n\t\t\t'key'      =\u003e '',                \u003c-- key files are safer than passwords\r\n\t\t\t'root'     =\u003e '/var/www',        \u003c-- you can ignore this, deployment path will be changed by Deeployer\r\n\t\t),\r\n\r\n\t),\r\n```\r\n\r\nGo to your server and `tail` the log file:\r\n\r\n```\r\nphp artisan tail\r\n```\r\n\r\nAdd that url to Github or Bitbucket.\r\n\r\nPush something to your branch to automatically deploy your application:\r\n\r\n```\r\ngit pull origin master:testing\r\ngit pull origin master:staging\r\ngit pull origin master:production\r\n```\r\n\r\nIf you are just testing, in Github you can press 'Test Hook' button, after saving your URL.\r\n\r\n### Installation\r\n\r\n#### Requirements\r\n\r\n- Laravel 4.1+\r\n- Composer \u003e= 2014-01-07 - This is a PSR-4 package\r\n- SSH-2 Server\r\n\r\n#### Installing\r\n\r\nFirst, you need to be sure you have a Composer that supports PSR-4, so execute\r\n\r\n```\r\ncomposer self-update\r\n```\r\n\r\nor\r\n\r\n```\r\nsudo composer self-update\r\n```\r\n\r\nRequire the Deeployer package:\r\n\r\n```\r\ncomposer require pragmarx/deeployer dev-master\r\n```\r\n\r\nOnce this operation completes, add the service provider to your app/config/app.php:\r\n\r\n```\r\n'PragmaRX\\Deeployer\\Vendor\\Laravel\\ServiceProvider',\r\n```\r\n\r\nPublish and edit the configuration file:\r\n\r\n```\r\nartisan config:publish pragmarx/deeployer\r\n```\r\n\r\n### TODO\r\n\r\n- Create a deployment artisan command, to manually deploy something troubled.\r\n- Tests, tests, tests.\r\n\r\n- Bitbucket is not done yet. (DONE!)\r\n\r\n### Author\r\n\r\nAntonio Carlos Ribeiro - \u003cacr@antoniocarlosribeiro.com\u003e - \u003chttp://twitter.com/iantonioribeiro\u003e\r\n\r\n### License\r\n\r\nDeeployer is licensed under the MIT License - see the `LICENSE` file for details\r\n\r\n### Contributing\r\n\r\nPull requests and issues are more than welcome.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioribeiro%2Fdeeployer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonioribeiro%2Fdeeployer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioribeiro%2Fdeeployer/lists"}