{"id":13852413,"url":"https://github.com/reload/deployotron","last_synced_at":"2026-01-11T05:50:38.808Z","repository":{"id":12418406,"uuid":"15072761","full_name":"reload/deployotron","owner":"reload","description":"Reload! deploy script","archived":true,"fork":false,"pushed_at":"2018-11-23T09:51:16.000Z","size":574,"stargazers_count":25,"open_issues_count":17,"forks_count":3,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-22T07:36:15.162Z","etag":null,"topics":["drush-commands"],"latest_commit_sha":null,"homepage":"http://reload.github.io/deployotron","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reload.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-12-10T09:34:28.000Z","updated_at":"2023-01-27T23:26:45.000Z","dependencies_parsed_at":"2022-09-12T15:24:08.444Z","dependency_job_id":null,"html_url":"https://github.com/reload/deployotron","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/reload/deployotron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdeployotron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdeployotron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdeployotron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdeployotron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reload","download_url":"https://codeload.github.com/reload/deployotron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reload%2Fdeployotron/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265094984,"owners_count":23710578,"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":["drush-commands"],"created_at":"2024-08-04T22:01:19.168Z","updated_at":"2025-07-13T05:32:57.498Z","avatar_url":"https://github.com/reload.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"Deployotron\n===========\n\nDeployotron is a Drush command to simplify deploying new code to a\nDrupal site.\n\nThere's already a lot of ways to deploy ones Drupal site, from FTPing\nup the files to having Capistrano deploy the site when the build\npasses in Jenkins. Deployotron aims to be simple to use, but also\nusable as a part of a bigger setup.\n\n[![Build Status](https://travis-ci.org/reload/deployotron.png?branch=master)](https://travis-ci.org/reload/deployotron)\n[![Code Coverage](https://scrutinizer-ci.com/g/reload/deployotron/badges/coverage.png?s=0f0d54845fc1c45affcc0ad8c111e40f4e40c359)](https://scrutinizer-ci.com/g/reload/deployotron/)\n[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/reload/deployotron/badges/quality-score.png?s=cd9fde12be1b74734b00d59618d4eb6c1bf5bfb0)](https://scrutinizer-ci.com/g/reload/deployotron/)\n\nOverview\n========\n\nIn order to keep things simple, we're working with a few assumptions:\n\nThat the code is in GIT, and that the root of the site is checked in.\n\nThat you can run Drush commands and GIT on the live webserver and the\nroot of the site on the webserver is a git checkout, and\n\nThat you've set up Drush aliases to reach the live webserver.\n\nFor everyone's sanity, we suggest having a Drush alias file in\n`sites/all/drush/\u003cshort-site-alias\u003e.aliases.drushrc.php` that defines\nrelevant environments (production, dev, etc.), so that everybody is\nusing the same settings.\n\nAnd we suggest that deployotron is installed by copying it into the\n`sites/all/drush` folder and committed to the site repository. This\nensures that everyone is running the exact same version of deployotron\nwhen deploying.\n\nSetup\n=====\n\nClone Deployotron into `sites/all/drush`. \n\nCreate a `\u003csitename\u003e.aliases.drushrc.php` file in the same directory,\nwith the definition of the different environments.\n\nDeployotron is configured for each alias by adding an array of options\nin the `'deployotron'` key of the alias array (see the example later,\nif that didn't make any sense). All the double-dash options the deploy\ncommand takes can be specified this way, and it's recommended to at\nleast define the `'branch'` option to select a default branch to\ndeploy.\n\nInitialize the environments by doing an initial git clone of the\ncodebase in the destination directories.\n\nUsage\n=====\n\nDeploying\n---------\n\nTo run the deployment, use a command like:\n\n    /var/www/site$ drush deploy @alias\n\nTo get a listing of all supported command line options, do a `drush\nhelp deploy`.\n\nExample configuration:\n\n    $aliases['staging'] = array(\n      'remote-host' =\u003e 'example.com',\n      'remote-user' =\u003e 'deploy_user',\n      'uri' =\u003e 'default',\n      'root' =\u003e '/path',\n      'deployotron' =\u003e array(\n        'branch' =\u003e 'develop',\n        'dump-dir' =\u003e '/backups', // Defaults to /tmp.\n        'num-dumps' =\u003e 3, // Defaults to 5. 0 for unlimited.\n        'post-deploy' =\u003e array(\n          'sudo apache2 graceful',\n          'drush -y fra',\n        ),\n      ),\n    );\n\nAs demonstrated, you can add external commands to be run before (pre-)\nor after (post-) the individual actions. All the possible options is\nlisted in `drush help deploy` and `drush deployotron-actions`.\n\nIn addition to command line options you can add messages to be\ndisplayed to the deploying user by using the following keys:\n\n * `message`: Shown at confirmation and after deployment.\n * `confirm_message`: Shown at confirmation.\n * `done_message`: Shown after deployment.\n * `confirm_message_\u003ccommand\u003e`: Shown at confirmation for the\n   `\u003ccommand\u003e`.\n * `done_message_\u003ccommand\u003e`: Shown after deployment for the\n   `\u003ccommand\u003e`.\n\nThese can be useful to remind the user of extra manual steps, or other\nthings they should be aware.\n\nRecovering\n----------\n\nIn case everything goes to hell after a deployment, you can do another\ndeployment using a known good revision, or use:\n\n    /var/www/site$ drush omg @alias\n\nThis will try to find recent database dumps, ask which to use and\nattempt to import the database and revert the codebase to the previous\nrevision. It will not attempt to clear caches or restarting any\nservices.\n\nHelp\n----\n\nRunning `drush deployotron-actions` will give a full list of which\ncommands uses which actions, and the options of all actions.\n\nSudo setup\n==========\n\nTo run sudo commands in pre/post hooks, you need to configure sudo to\nallow the command without a password.\n\nRun:\n\n    sudo visudo -f /etc/sudoers.d/deployotron\n\nAnd add something like following to the file (replacing `deploy_user`\nwith the `remote-user` of the alias used for deployment):\n\n    deploy_user          ALL=(root) NOPASSWD: /usr/sbin/service apache2 graceful,/usr/sbin/service varnish restart\n\nThis allows deployotron to run \"sudo service apache2 graceful\" and\n\"sudo service varnish restart\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freload%2Fdeployotron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freload%2Fdeployotron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freload%2Fdeployotron/lists"}