Last active
May 19, 2021 23:59
-
-
Save TiuTalk/dd18b2797f9bbddce8dc to your computer and use it in GitHub Desktop.
Revisions
-
TiuTalk revised this gist
Jun 1, 2014 . 1 changed file with 34 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -69,3 +69,37 @@ location ~ ^/index.php$ { ``` web: Vendor/bin/heroku-php-nginx -C Config/nginx.conf webroot ``` #### Config/database.php ```php <?php class DATABASE_CONFIG { public $default; public $test = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'login' => 'user', 'password' => 'password', 'database' => 'test_database_name', 'prefix' => '', //'encoding' => 'utf8', ); public function __construct() { $DATABASE_URL = parse_url($_ENV['DATABASE_URL']); $this->default = array( 'datasource' => 'Database/Postgres', 'persistent' => false, 'host' => $DATABASE_URL['host'], 'login' => $DATABASE_URL['user'], 'password' => $DATABASE_URL['pass'], 'database' => substr($DATABASE_URL['path'], 1), 'prefix' => '', 'encoding' => 'utf8', ); } } ``` -
TiuTalk revised this gist
Jun 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ #### webroot/index.php ```php <?php define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . APP_DIR . "/Vendor/cakephp/cakephp/lib"); ``` #### Config/bootstrap.php -
TiuTalk revised this gist
Jun 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ #### webroot/index.php ```php <?php define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib'); ``` #### Config/bootstrap.php -
TiuTalk revised this gist
Jun 1, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,7 @@ #### webroot/index.php ```php <?php define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . APP_DIR . '/Vendor/cakephp/cakephp/lib'); ``` #### Config/bootstrap.php -
TiuTalk revised this gist
Jun 1, 2014 . 1 changed file with 17 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ # CakePHP via composer #### composer.json ```json { @@ -15,13 +17,13 @@ } ``` #### webroot/index.php ```php <?php define('CAKE_CORE_INCLUDE_PATH', '../Vendor/cakephp/cakephp/lib'); ``` #### Config/bootstrap.php ```php <?php // Load Composer autoload. @@ -34,7 +36,17 @@ spl_autoload_unregister(array('App', 'load')); spl_autoload_register(array('App', 'load'), true, true); ``` #### .gitignore ``` tmp/* app/tmp/* !empty Vendor ``` # CakePHP on Heroku #### config/nginx.conf ```nginx location / { try_files $uri @rewriteapp; @@ -53,15 +65,7 @@ location ~ ^/index.php$ { } ``` #### Procfile ``` web: Vendor/bin/heroku-php-nginx -C Config/nginx.conf webroot ``` -
TiuTalk revised this gist
Jun 1, 2014 . 1 changed file with 32 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,26 +1,27 @@ ## composer.json ```json { "name": "assando-sites", "require": { "cakephp/cakephp": ">=2.5.0", "ext-apcu": "*", "ext-imagick": "*", "ext-memcached": "*" }, "config": { "vendor-dir": "Vendor/" } } ``` ## webroot/index.php ```php <?php define('CAKE_CORE_INCLUDE_PATH', '../Vendor/cakephp/cakephp/lib'); ``` ## Config/bootstrap.php ```php <?php // Load Composer autoload. @@ -33,8 +34,31 @@ spl_autoload_unregister(array('App', 'load')); spl_autoload_register(array('App', 'load'), true, true); ``` ## config/nginx.conf ```nginx location / { try_files $uri @rewriteapp; } location @rewriteapp { rewrite ^(.*)$ /index.php last; } location ~ ^/index.php$ { fastcgi_pass heroku-fcgi; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTTPS off; } ``` ## Procfile ``` web: Vendor/bin/heroku-php-nginx -C Config/nginx.conf webroot ``` ## .gitignore ``` tmp/* app/tmp/* -
TiuTalk revised this gist
Jun 1, 2014 . 1 changed file with 1 addition and 14 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -40,17 +40,4 @@ tmp/* app/tmp/* !empty Vendor ``` -
TiuTalk renamed this gist
Jun 1, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
TiuTalk created this gist
Jun 1, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,56 @@ # composer.json ```json { "name": "example", "require": { "cakephp/cakephp": ">=2.5.0" }, "config": { "vendor-dir": "Vendor/" } } ``` # webroot/index.php ```php <?php define('CAKE_CORE_INCLUDE_PATH', '../Vendor/cakephp/cakephp/lib'); ``` # Config/bootstrap.php ```php <?php // Load Composer autoload. require APP . '/Vendor/autoload.php'; // Remove and re-prepend CakePHP's autoloader as Composer thinks it is the // most important. // See: http://goo.gl/kKVJO7 spl_autoload_unregister(array('App', 'load')); spl_autoload_register(array('App', 'load'), true, true); ``` # .gitignore ``` tmp/* app/tmp/* !empty Vendor ``` ```php <?php // Load Composer autoload. require APP . '/Vendor/autoload.php'; // Remove and re-prepend CakePHP's autoloader as Composer thinks it is the // most important. // See: http://goo.gl/kKVJO7 spl_autoload_unregister(array('App', 'load')); spl_autoload_register(array('App', 'load'), true, true); ```