Requires installed gitolite in /home/git and following directory structure
/var
/www
/apps
/hosts
/libs
/pre-deploy
Contains applications, each one in separated folder named by it's git repository
when created folder in here (for example kdyby.l
), nginx will try to direct all the trafic from kdyby.l
and *.kdyby.l
to /var/www/hosts/kdyby.l/index.php
.
By the rule, only symlinks are in this directory, targeting folders from projects in /var/www/apps
Contains libraries, that are automatically deployed to directories %git-repo-name%/%refname%
.
So if I push to kdyby-framework
to branch master
, directory /var/www/libs/kdyby-framework/master
will be containing latest version of master. Works the same way for tags.
When pushed as $ git push origin :branch
, the branch will be deleted as usual and the directory containing deleted branch (or tag) will be deleted too.
Is used for deploying to apps
- Bare repository is
git-archive
'd to corresponding directory inpre-deploy
. - Script will build filters for rsync, using existing
.gitignore
files in project. - If this isn't the first deploy, and there is file
app/console
in the project, it will be called asapp/console deploy:begin
(yes it's symfony console in Kdyby sandbox based project) - Directories
/var/www/pre-deploy/project
and/var/www/apps/project
will be rsynched using defined filters - Deploy script will fix permissions
- If there is file
app/console
in the project, it will be called asapp/console deploy:finalize
- Directory
/var/www/pre-deploy
will be cleaned up