{"id":18085000,"url":"https://github.com/coderofsalvation/deployogi","last_synced_at":"2025-04-06T00:13:49.734Z","repository":{"id":9833296,"uuid":"11821765","full_name":"coderofsalvation/deployogi","owner":"coderofsalvation","description":"easy, automatic deployment of webapplications/databases on staging/production webservers using GIT hooks and bash triggers. DEPRECATED: use pm.sh","archived":false,"fork":false,"pushed_at":"2020-05-28T18:47:42.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T06:22:35.206Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://gumroad.com/l/hGYGh"}},"created_at":"2013-08-01T16:27:05.000Z","updated_at":"2020-05-28T18:47:45.000Z","dependencies_parsed_at":"2022-09-24T06:11:14.935Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/deployogi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdeployogi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdeployogi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdeployogi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fdeployogi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/deployogi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415976,"owners_count":20935387,"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":[],"created_at":"2024-10-31T15:09:01.045Z","updated_at":"2025-04-06T00:13:49.706Z","avatar_url":"https://github.com/coderofsalvation.png","language":"Shell","funding_links":["https://gumroad.com/l/hGYGh"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://www.dropbox.com/s/fu1cdwd3it31qvq/yoda-deploy.jpg?dl=1\"/\u003e\u003c/p\u003e\n\nDeployogi\n=========\nThe yoga of autodeployment, in other words: putting a new version of a website in production by simply hitting enter.\n\nWorkflow / the philosophy behind this deploymenttool/model\n==========================================================\nDeployogi assumes a push-backup-clone-merge-test and compare-deploymentmodel.\nRead [this article](http://leon.vankammen.eu/blog/automatic-deployment-with-git-and-deployogi-scripts) to learn more about it.\nHere you can see the simplest way of deploying (for more details read article) : \n\n\u003cimg src=\"https://dl.dropboxusercontent.com/s/88zzcgb4hp9k641/seqdiagram-deployogi-easy.png?dl=1\"\u003e \n\nWhy? For who?\n=============\nWell in the first place: to get rid of handhacked deployment, and for people who dont always need PaaS solutions.\nThere are many PaaS solutions which take away the pain of handhacked deployment.\nHowever, there are cases where deployogi does the same.\nDeployogi is an effort to stimulate teams to deploy and upgrade many webapplications in a similar way.\n\nDemonstration\n=============\nThis is a log of an [actual deploymentlog](https://raw.github.com/coderofsalvation/deployogi/master/example/examplelog.txt) facilitated by deployogi.\n\nAlso, check the following link to see a [very basic tutorial/showcase of deployogi](http://playterm.org/r/deployogi-automatic-webdeployment-1375465953)\n\n\u003e `NOTE`: the showcase is very basic, and does not really show how to extend deployogi. Many webframeworks offer entrypoints to trigger integritytests, \n\u003e configuration thru console. Please keep in mind that deployogi has been designed to specifically trigger these things, in order to \n\u003e find out if the deployment is going good or bad (and alternatively refuse to deploy). Ideally every webapplication has its own deployogi-triggerscripts\n\u003e and/or reuses scripts by using symbolic links.\n\nInstallation\n============\nFor now lets assume you wanna get started asap, then copy/paste this oneliner into your terminal :\n\n    wget \"https://raw.github.com/coderofsalvation/deployogi/master/deployogi\" -O deployogi; chmod 755 deployogi; \n\nThen run:\n\n    ./deployogi\n\n\nFor who?\n========\nWell not for one-man-banddevelopers, in those cases handhacking is part of the fun!\nBut in case of a devteam it is the only way to be flexible in scalability of your team.\nActually `deployogi` applies to Rule 14 of the UN*X philosophy: *Rule of Generation: Avoid hand-hacking; write programs to write programs when you can.*, \nso if you like unix, you'll like this as well. \n\nHow?\n====\nSimply by pushing to a remote git-repository.\nOnly thing to do once is writing a config-file, and make sure git calls deployogi when [you push to a sharedrepo with this git-hook](https://raw.github.com/coderofsalvation/deployogi/master/example/post-receive). \nThats it!\n\nFurther extension can be done using deployogi hook-scripts (n a similar fashion as git hooks), because deployogi automatically installs this folder to your githooks-dir:\n\n    deployogi.d/config             \u003c-- here you can define your project variables, so deployogi can do its magic\n    deployogi.d/10-on.begin\n    deployogi.d/20-on.backup\n    deployogi.d/30-on.begin\n    deployogi.d/40-on.merge\n    deployogi.d/50-on.configure\n    deployogi.d/60-on.generatedocs\n    deployogi.d/70-on.test\n    deployogi.d/80-on.exit\n\n\u003e NOTE: these files represent triggers which are described in the sequencediagram below.\n\nA typical, simplified setup for multiple websitedeployment would look like this (Lets suppose 2 Zendwebsites) :\n\n                 /var/www/.deployogi.shared/Zend.on.exit \u003c---------------------------------,--,\n                 /var/www/yourwebsite1    \u003c--- merge -------------,                        |  |\n                                                                  |                        |  |\n    git push --\u003e /gitrepos/yourwebsite1.git/hooks/post-receive ---'-,                      |  |\n                                                                    |                      |  |\n                                            hooks/deployogi.d/ (run hooks)                 |  |\n                                                                    |                      |  |\n                                            hooks/deployogi.d/70-on.exit  --- source    ---'  |\n                                                                                              |\n                 /var/www/yourwebsite1    \u003c--- merge ------------,                            |\n                                                                 |                            |\n    git push --\u003e /gitrepos/yourwebsite2.git/hooks/post-receive ----,                          |\n                                                                   |                          |\n                                            hooks/deployogi.d/ (run hooks)                    |\n                                                                   |                          |\n                                            hooks/deployogi.d/70-on.exit  --- symboliclink ---'\n\n\u003e `NOTE: dont worry, deployogi will not merge directly, you can tweak that process by merging to a clone of your website to see if things go fine`\n\nThe idea is that the deploymentmodel is the same, however each website can have its customized deployment, and\nstill benefit from shared code (using sourcing or symbolic links, see this [WIKI article](https://github.com/coderofsalvation/deployogi/wiki/hint:-shared-scripts).\n\nAre git hooks not enough?\n=========================\nNo, if you dive into this matter you'll soon find out there will be many obstacles because [GIT is not a deploymenttool](http://gitolite.com/the-list-and-irc/deploy.html) \n\nMy webapplication has no tests!\n===============================\nNo worries, Deployogi works well with [Testosteron](https://github.com/coderofsalvation/testosteron), a modular testingtool which works with all programminglanguages.\nJust write some testosteron tests and call `'./test all white'` in deployogi's 'deployogi.d/60-on.test'-hook.\n\nSyslog\n======\nIf installed, deployogi automatically logs to (r)syslogd daemon(almost on every linux system).\nYou can check the syslog by running 'tail -f /var/log/syslog' or using [logfilter](http://playterm.org/r/logfilter---an-interactive-greptool-1399067818), [lnav](http://lnav.org), or simply\nforward it to a remote syslogd service.\n\n\u003cimg src=\"http://static.squarespace.com/static/51bd4e13e4b0052d7873ad34/t/5337ae40e4b0fb540513b2b0/1396158018387/?format=750w\"/\u003e\n\nRequirements\n============\n\n* something which supports bash (usually LAMP/linuxserver)\n* a webapplication which supports cli-invokation (to configure frameworkrelated variables from the commandline)\n* you have to know about of commandline (bash) stuff \n\nBackups\n=======\nHere is an example '20-on.backup'-hook:\n\n     cd $PROJECTDIR \n     if [[ $USE_SQL ]]; then \n       echo \"[x] creating backup of current database $SQL_DB into '$PROJECTDIR/$PROJECTSQL'\"\n       mysqldump --extended-insert=FALSE -u $SQL_LOGIN -p$SQL_PW $SQL_DB \u003e $PROJECTDIR/$PROJECTSQL \n     fi\n     echo \"[x] make backup of current website: $BACKUPFILE (please wait)\"\n     zip -r $BACKUPFILE . -x *.git* -x *.log* | while read line; do printf \"\\r[x] $i files\"; ((i=i+1)); done; echo \"\"\n\nThis is handy, because in rare cases its faster to rollout the last database/code.     \nOfcoarse,  on failure deployogi automatically removes the last commit, but this could leave your database crippled.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fdeployogi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Fdeployogi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fdeployogi/lists"}