Skip to content

Instantly share code, notes, and snippets.

@irasally
Last active December 23, 2015 14:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irasally/6647816 to your computer and use it in GitHub Desktop.
Save irasally/6647816 to your computer and use it in GitHub Desktop.
pagoda Boxfile for CakePHP
web1:
document_root: /app/webroot
shared_writable_dirs:
- app/tmp
- app/tmp/cache
- app/tmp/logs
- app/tmp/sessions
- app/tmp/tests
php_version: 5.4.14
php_extensions:
- mcrypt
- mbstring
- mysql
- pdo_mysql
- apc
- curl
- zip
- gd
- gettext
after_build:
- "mv app/Config/core.php.pagoda app/Config/core.php"
- "mv app/Config/bootstrap.php.pagoda app/Config/bootstrap.php"
- "mv app/Config/database.php.pagoda app/Config/database.php"
- "php composer.phar install --no-dev"
before_deploy:
- "mkdir -p app/tmp/logs app/tmp/sessions app/tmp/tests app/tmp/cache"
- "printf 'y\ny\n' |app/Console/cake schema create"
after_deploy:
# Stop Content-Length header from being set, by default the value is incorrect
php_zlib_output_compression: On
db1:
name: dicetrip
type: mysql
<?php
define("DB_HOST", $_SERVER['DB1_HOST']);
define("DB_NAME", $_SERVER['DB1_NAME']);
define("DB_USER", $_SERVER['DB1_USER']);
define("DB_PASS", $_SERVER['DB1_PASS']);
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => DB_HOST,
'login' => DB_USER,
'password' => DB_PASS,
'database' => DB_NAME,
'prefix' => '',
'encoding' => 'utf8',
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment