-
Notifications
You must be signed in to change notification settings - Fork 87
Deployment
Md Ali Ahsan Rana edited this page Aug 22, 2014
·
5 revisions
You can build this project automatically ready for *nix based system using a simple makefile given below, which will run all commands in order for you.
name: makefile
.PHONY: all update-repo dependency-install unit-tests file-permission
all: update-repo dependency-install unit-tests file-permission
update-repo:
git reset --hard
git pull origin master
dependency-install:
/usr/local/bin/composer install
/usr/local/bin/bower install
generate-proxies:
vendor/bin/doctrine orm:generate:proxies
unit-tests:
vendor/bin/phpunit
file-permission:
mkdir -p application/logs
mkdir -p application/cache
mkdir -p application/models/proxies
chmod 777 application/logs
chmod 777 application/cache
chmod 777 application/models/proxies
if you don't have any knowledge about makefile, you can consider reading this article on building php application using makefile
If you have your project hosted on a remote repository(github/bitbucket), then you can easily implement automated deployment process on push hook event. Put the following file on your project root with web server user has execution access to it and point to it from hook settings. See the magic!
name: deploy.php
<?php
echo shell_exec("make >application/logs/deploy.log 2>&1 </dev/null &");