dev-master
9999999-devA Deployment Tool for CodeIgniter 3.0
MIT
The Requires
- php >=5.4.0
- deployer/deployer ~3.0
by Kenji Suzuki
codeigniter deployment deploy
A Deployment Tool for CodeIgniter 3.0
A Deployment Tool for CodeIgniter 3.0., (*2)
You can deploy CodeIgniter with one command., (*3)
This is based on Deployer 3.0., (*4)
codeigniter/ โโโ deploy/ โโโ deploy.php ... config file for Deployer โโโ deploy.sh ... script to deploy โโโ logs/
Install this project with Composer:, (*5)
$ cd /path/to/codeigniter/ $ composer require kenjis/codeigniter-deployer:1.0.x@dev --dev
Install deploy
folder to your CodeIgniter application folder:, (*6)
$ php vendor/kenjis/codeigniter-deployer/install.php
Configure deploy/deployer.php
., (*7)
// Your production server server('prod', 'your.server.example.com', 22) ->user('username') ->forwardAgent() ->stage('production') ->env('branch', 'master') ->env('deploy_path', '/var/www/your-codeigniter-app');
See https://github.com/deployphp/docs/blob/master/servers.md for details., (*8)
// Your Git repository set('repository', 'git@github.com:org/your-codeigniter-app.git');
You need git
command on your servers, and make sure you can git clone
on the servers., (*9)
See the sample below. In this case, /var/www/your-codeigniter-app
is a base folder., (*10)
your-codeigniter-app/ โโโ current -> /var/www/your-codeigniter-app/releases/20150529181638 โโโ releases/ ย ย ย ย โโโ 20150529180505/ ย ย ย ย โโโ 20150529181203/ ย ย ย ย โโโ 20150529181638/
Each deployment is installed in releases/YYYYMMDDHHMMSS
folder., (*11)
The current release is your-codeigniter-app/current
folder, and it is a symbolic link to releases/20150529181638
folder., (*12)
So if you use codeigniter-composer-installer's folder structure, your Apache configuratoin is like this:, (*13)
DocumentRoot /var/www/your-codeigniter-app/current/public
If you use CodeIgniter as the default folder structure, your Apache configuratoin is like this:, (*14)
DocumentRoot /var/www/your-codeigniter-app/current
Deployer will try to get write permission with the sudo
command, so this command has to be running without prompt password and without tty., (*15)
Here is an example of configuration:, (*16)
Defaults:username !requiretty username ALL=(ALL) NOPASSWD: /usr/bin/setfacl
If you don't need sudo
for your deployment, you can set in deploy/deployer.php
., (*17)
set('writable_use_sudo', false);
$ cd /path/to/codeigniter/ $ cd deploy/ $ sh deploy.sh
A Deployment Tool for CodeIgniter 3.0
MIT
codeigniter deployment deploy