-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,526 changed files
with
642,725 additions
and
3,444 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,2 @@ | ||
.DS_Store | ||
|
||
application/cache/* | ||
!application/cache/index.html | ||
|
||
application/logs/* | ||
!application/logs/index.html | ||
|
||
!application/*/.htaccess | ||
|
||
composer.lock | ||
|
||
user_guide_src/build/* | ||
user_guide_src/cilexer/build/* | ||
user_guide_src/cilexer/dist/* | ||
user_guide_src/cilexer/pycilexer.egg-info/* | ||
/vendor/ | ||
|
||
# IDE Files | ||
#------------------------- | ||
/nbproject/ | ||
.idea/* | ||
|
||
## Sublime Text cache files | ||
*.tmlanguage.cache | ||
*.tmPreferences.cache | ||
*.stTheme.cache | ||
*.sublime-workspace | ||
*.sublime-project | ||
/tests/tests/ | ||
/tests/results/ | ||
nbproject/ | ||
vendor/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2015 Kenji Suzuki <https://github.com/kenjis> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
# CodeIgniter Deployer | ||
|
||
[](https://packagist.org/packages/kenjis/codeigniter-deployer) [](https://packagist.org/packages/kenjis/codeigniter-deployer) [](https://packagist.org/packages/kenjis/codeigniter-deployer) [](https://packagist.org/packages/kenjis/codeigniter-deployer) | ||
|
||
A Deployment Tool for [CodeIgniter](https://github.com/bcit-ci/CodeIgniter) 3.0. | ||
|
||
You can deploy CodeIgniter with one command. | ||
|
||
This is based on [Deployer](http://deployer.org/) 3.0. | ||
|
||
## Folder Structure | ||
|
||
``` | ||
codeigniter/ | ||
└── deploy/ | ||
├── deploy.php ... config file for Deployer | ||
├── deploy.sh ... script to deploy | ||
└── logs/ | ||
``` | ||
|
||
## Requirements | ||
|
||
* PHP 5.4.0 or later | ||
* Composer | ||
* Git | ||
* SSH | ||
* Shell | ||
|
||
## Installation | ||
|
||
Install this project with Composer: | ||
|
||
~~~ | ||
$ cd /path/to/codeigniter/ | ||
$ composer require kenjis/codeigniter-deployer:1.0.x@dev --dev | ||
~~~ | ||
|
||
Install `deploy` folder to your CodeIgniter application folder: | ||
|
||
~~~ | ||
$ php vendor/kenjis/codeigniter-deployer/install.php | ||
~~~ | ||
|
||
* Above command always overwrites exisiting files. | ||
* You must run it at CodeIgniter project root folder. | ||
|
||
## Configuration | ||
|
||
Configure `deploy/deployer.php`. | ||
|
||
### Servers | ||
|
||
~~~php | ||
// 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. | ||
|
||
### Repository | ||
|
||
~~~php | ||
// Your Git repository | ||
set('repository', '[email protected]:org/your-codeigniter-app.git'); | ||
~~~ | ||
|
||
You need `git` command on your servers, and make sure you can `git clone` on the servers. | ||
|
||
### Reference | ||
|
||
* https://github.com/deployphp/docs | ||
|
||
## Configure Your Servers | ||
|
||
### Apache | ||
|
||
See the sample below. In this case, `/var/www/your-codeigniter-app` is a base folder. | ||
|
||
~~~ | ||
your-codeigniter-app/ | ||
├── current -> /var/www/your-codeigniter-app/releases/20150529181638 | ||
└── releases/ | ||
├── 20150529180505/ | ||
├── 20150529181203/ | ||
└── 20150529181638/ | ||
~~~ | ||
|
||
Each deployment is installed in `releases/YYYYMMDDHHMMSS` folder. | ||
|
||
The current release is `your-codeigniter-app/current` folder, and it is a symbolic link to `releases/20150529181638` folder. | ||
|
||
So if you use [codeigniter-composer-installer](https://github.com/kenjis/codeigniter-composer-installer)'s folder structure, your Apache configuratoin is like this: | ||
|
||
~~~ | ||
DocumentRoot /var/www/your-codeigniter-app/current/public | ||
~~~ | ||
|
||
If you use CodeIgniter as the default folder structure, your Apache configuratoin is like this: | ||
|
||
~~~ | ||
DocumentRoot /var/www/your-codeigniter-app/current | ||
~~~ | ||
|
||
### sudo | ||
|
||
Deployer will try to get write permission with the `sudo` command, so this command has to be running without prompt password and without tty. | ||
|
||
Here is an example of configuration: | ||
|
||
~~~ | ||
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`. | ||
|
||
~~~php | ||
set('writable_use_sudo', false); | ||
~~~ | ||
|
||
## How to Deploy | ||
|
||
~~~ | ||
$ cd /path/to/codeigniter/ | ||
$ cd deploy/ | ||
$ sh deploy.sh | ||
~~~ | ||
|
||
## Related Projects for CodeIgniter 3.0 | ||
|
||
* [CodeIgniter Composer Installer](https://github.com/kenjis/codeigniter-composer-installer) | ||
* [Cli for CodeIgniter 3.0](https://github.com/kenjis/codeigniter-cli) | ||
* [CI PHPUnit Test](https://github.com/kenjis/ci-phpunit-test) | ||
* [CodeIgniter Simple and Secure Twig](https://github.com/kenjis/codeigniter-ss-twig) | ||
* [CodeIgniter Doctrine](https://github.com/kenjis/codeigniter-doctrine) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
<IfModule authz_core_module> | ||
Require all denied | ||
</IfModule> | ||
<IfModule !authz_core_module> | ||
Deny from all | ||
</IfModule> | ||
RewriteEngine on | ||
|
||
<Files "index.php"> | ||
AcceptPathInfo On | ||
</Files> | ||
|
||
RewriteCond $1 !^(index\.php|resources|assets|robots\.txt) | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-f | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-d | ||
|
||
RewriteRule ^(.*)$ index.php?/$1 [L,QSA] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.