2017 © Pedro Peláez
 

project cakephp-app-paas

CakePHP skeleton app for Paas / Heroku

image

thegallagher/cakephp-app-paas

CakePHP skeleton app for Paas / Heroku

  • Friday, July 10, 2015
  • by thegallagher
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

CakePHP Application Skeleton for PaaS / Heroku

This is a fork of CakePHP Application Skeleton., (*1)

A skeleton for creating applications with CakePHP 3.0., (*2)

The framework source code can be found here: cakephp/cakephp., (*3)

Installation

  1. Download Composer or update composer self-update.
  2. Run php composer.phar create-project --prefer-dist thegallagher/cakephp-app-paas [app_name].

If Composer is installed globally, run, (*4)

composer create-project --prefer-dist thegallagher/cakephp-app-paas [app_name]

You should now be able to visit the path to where you installed the app and see the setup traffic lights., (*5)

Configuration

Configuration is done with environment variables or in config/.env. You can read config/.env for information on the available variables., (*6)

If you followed the above installation instructions to create your project, you will be asked to create config/.env. If you were not in interactive mode, you will need to use environment variables or cp config/default.env config/.env., (*7)

You may use any of the constants in config/paths.php by prefixing and suffixing the constant with two underscores (__). Eg. To use the LOGS constant, write __LOGS__ in the environment variable., (*8)

Deploying to Heroku

Make sure you have the Heroku toolbelt installed and logged in., (*9)

If you haven't already, create your repository:, (*10)

git init
git add -A
git commit -m "Initial commit"

Create the app:, (*11)

heroku apps:create
git push heroku master
heroku config:set SECURITY_SALT=[your-security-salt]

Create a MySQL database:, (*12)

heroku addons:create cleardb
old_db_url=`heroku config:get CLEARDB_DATABASE_URL`
heroku config:set DATABASE_URL="$old_db_url"

Configure logs:, (*13)

heroku config:set LOG_URL="console:///?levels[]=notice&levels[]=info&levels[]=debug"
heroku config:set LOG_ERROR_URL="console:///?levels[]=warning&levels[]=error&levels[]=critical&levels[]=alert&levels[]=emergency"

Notes

  • If you require multiple instances of your web process, you will need to configure your sessions to use database or cache.

Credits

The Versions