Skip to content
rynop edited this page Nov 26, 2011 · 11 revisions

CakePlate is intended for Linux/Mac dev's who wish to get up and going fast on a CakePHP project with some best practices already baked in.

Quickstart

  1. Fork CakePlate then, git clone --recursive git://github.com/you/yourRepo.git YourProject && git submodule init && git submodule update --recursive. Don't use git? Just download and put into your version control system.
  2. Install APC. I have bootstrap.php and core.php setup to use it by default. I recommend v3.1.9. Simple sudo pecl install apc-3.1.9 should do the trick. If you are running multiple CakePHP apps on the same server, make sure to add a unique prefix in core.php and bootstrap.php.
  3. Change Security.cipherSeed and Security.salt
  4. Use PHP 5.3.
  5. AssetCompress is a plugin that combines, minifies and compresses your CSS and JS files. Configure webapp/app/Config/asset_compress.ini to use the css and JS filters you wish to use. I have it setup to use YuiCompressor for css and uglifyjs for JS. Uglifyjs requires a NodeJs server to be installed. You also need to put yuicompressor.jar into app/Vendor/yuicompressor dir. Download YUICompressor here. See AssetCompress docs for more info.
  6. For production, edit webroot/index.php and hard code (yes I said hard code) ROOT and APP_DIR

Then: cd into /webapp/app (ex: /opt/coolapp/webapp/app) and run

sudo chown -R <youruser>:www-data tmp
sudo chmod -R g+w tmp
sudo chown -R <youruser>:www-data webroot/cache_*
sudo chmod -R g+w webroot/cache_*

Recommendations

  • Read the docs for all the external projects, plugins, etc that I use. Getting up and running quick is cool, but knowing wtf ur doing will save you time in the long run.
  • Look at etc/zzz_php_overrides.ini. If you don't know what the directives do - you should. Look them up on php.net.
  • submodules are put in the submodules dir and symlinked in. This allows you to easily identify external dependencies, and keep things clean (and easily update-able).
Clone this wiki locally