Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fjerbi committed Aug 10, 2018
1 parent 319e267 commit 6057b90
Show file tree
Hide file tree
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.
33 changes: 2 additions & 31 deletions .gitignore
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/
20 changes: 20 additions & 0 deletions .idea/Djerba_online_shopping.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

839 changes: 839 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions LICENSE.md
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.
141 changes: 141 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# CodeIgniter Deployer

[![Latest Stable Version](https://poser.pugx.org/kenjis/codeigniter-deployer/v/stable)](https://packagist.org/packages/kenjis/codeigniter-deployer) [![Total Downloads](https://poser.pugx.org/kenjis/codeigniter-deployer/downloads)](https://packagist.org/packages/kenjis/codeigniter-deployer) [![Latest Unstable Version](https://poser.pugx.org/kenjis/codeigniter-deployer/v/unstable)](https://packagist.org/packages/kenjis/codeigniter-deployer) [![License](https://poser.pugx.org/kenjis/codeigniter-deployer/license)](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)
30 changes: 15 additions & 15 deletions adminfiles/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@
.progressSlim.blue .ui-progressbar-value,
.label-info,
.badge-info {
background: #578EBE !important;
border-color: #578EBE !important;
background: #0db0dd !important;
border-color: #0db0dd !important;
color: #fff;
}

Expand Down Expand Up @@ -461,16 +461,16 @@ a.brand span {

.nav-tabs.nav-stacked > li.active > a,
.nav-tabs.nav-stacked > li > ul > li.active > a {
background: #578EBE;
border-bottom: 1px solid #578EBE;
background: #0db0dd;
border-bottom: 1px solid #0db0dd;
}

.nav-tabs.nav-stacked > li.active > a:hover,
.nav-tabs.nav-stacked > li > ul > li.active > a:hover {
background: #578EBE;
background: #0db0dd;
color: #fff;
border: none;
border-bottom: 1px solid #578EBE;
border-bottom: 1px solid #0db0dd;
}
.header-nav .nav li:hover{
background: #3A3A3A;
Expand Down Expand Up @@ -587,14 +587,14 @@ border-bottom: 1px solid transparent;
.dropdown-submenu:hover > a {
color: #ffffff;
text-decoration: none;
background: #578EBE;
background: #0db0dd;
}

.dropdown-menu .active > a,
.dropdown-menu .active > a:hover {
color: #ffffff;
text-decoration: none;
background: #578EBE;
background: #0db0dd;
}

.dropdown-menu .disabled > a,
Expand Down Expand Up @@ -824,7 +824,7 @@ ul.messages li .message {
}

.box {
border: 2px solid #578EBE;
border: 2px solid #0db0dd;
background: #fff !important;
margin-bottom: 28px;
}
Expand All @@ -834,7 +834,7 @@ ul.messages li .message {
font-size: 16px;
line-height: 16px;
padding: 10px;
background: #578EBE;
background: #0db0dd;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
Expand Down Expand Up @@ -1656,8 +1656,8 @@ fieldset[disabled] .btn:active {
}

.btn-primary {
background-color: #578EBE;
border-color: #578EBE;
background-color: #0db0dd;
border-color: #0db0dd;
}

.btn-primary:hover,
Expand All @@ -1676,8 +1676,8 @@ fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active {
background-color: #578EBE;
border-color: #578EBE;
background-color: #0db0dd;
border-color: #0db0dd;
}

.btn-warning {
Expand Down Expand Up @@ -1799,7 +1799,7 @@ fieldset[disabled] .btn-link {

.btn-link {
font-weight: normal;
color: #578EBE;
color: #0db0dd;
cursor: pointer;
border-radius: 0;
}
Expand Down
19 changes: 13 additions & 6 deletions application/.htaccess
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]
1 change: 1 addition & 0 deletions application/config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['libraries'] = array('facebook');
$autoload['packages'] = array();

/*
Expand Down
6 changes: 3 additions & 3 deletions application/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = 'http://127.0.0.1/pfeprojet/';
$config['base_url'] = 'http://localhost/codeignitershop/';

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -136,7 +136,7 @@
| Note: This will NOT disable or override the CodeIgniter-specific
| autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = FALSE;
$config['composer_autoload'] = TRUE;

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -379,7 +379,7 @@
*/
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expiration'] = 7500;
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
Expand Down
Loading

0 comments on commit 6057b90

Please sign in to comment.