thegallagher / cakephp-app-paas
CakePHP skeleton app for Paas / Heroku
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=5.4.16
- cakephp/cakephp: ~3.0
- cakephp/migrations: ~1.0
- cakephp/plugin-installer: *
- mobiledetect/mobiledetectlib: 2.*
- vlucas/phpdotenv: *
Requires (Dev)
- cakephp/bake: ~1.0
- cakephp/debug_kit: ~3.0
- psy/psysh: @stable
Suggests
- cakephp/cakephp-codesniffer: Allows to check the code against the coding standards used in CakePHP.
- friendsofcake/crud: CakePHP Application development on steroids - rapid prototyping / scaffolding & production ready code,
- phpunit/phpunit: Allows automated tests to be run without system-wide install.
This package is not auto-updated.
Last update: 2022-06-25 05:51:38 UTC
README
This is a fork of CakePHP Application Skeleton.
A skeleton for creating applications with CakePHP 3.0.
The framework source code can be found here: cakephp/cakephp.
Installation
- Download Composer or update
composer self-update
. - Run
php composer.phar create-project --prefer-dist thegallagher/cakephp-app-paas [app_name]
.
If Composer is installed globally, run
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.
Configuration
Configuration is done with environment variables or in config/.env
.
You can read config/.env
for information on the available variables.
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
.
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.
Deploying to Heroku
Make sure you have the Heroku toolbelt installed and logged in.
If you haven't already, create your repository:
git init
git add -A
git commit -m "Initial commit"
Create the app:
heroku apps:create git push heroku master heroku config:set SECURITY_SALT=[your-security-salt]
Create a MySQL database:
heroku addons:create cleardb old_db_url=`heroku config:get CLEARDB_DATABASE_URL` heroku config:set DATABASE_URL="$old_db_url"
Configure logs:
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
- Most of the code in this repository is from CakePHP Application Skeleton.
- A lot of ideas and code borrowed from Friends Of Cake App Template.