Last active
August 29, 2015 14:01
-
-
Save msurguy/03cc2f19a98cc1426d5e to your computer and use it in GitHub Desktop.
Sample Boxfile (for a laravel application) and example of using DB credentials in the app
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 characters
web1: | |
document_root: public | |
php_version: 5.4.14 | |
php_upload_max_filesize: "10M" | |
php_post_max_size: "10M" | |
php_extensions: | |
- mbstring | |
- mcrypt | |
- curl | |
- gd | |
- pdo_mysql | |
- redis | |
- zip | |
- xcache | |
php_session_save_handler: redis | |
php_session_save_path: "tcp://tunnel.pagodabox.com:6379" | |
shared_writable_dirs: | |
- app/storage/cache | |
- app/storage/logs | |
- app/storage/meta | |
- app/storage/sessions | |
- app/storage/views | |
# if you users can upload to uploads folder | |
# - /public/uploads | |
after_build: | |
- "if [ ! -f composer.phar ]; then curl -s http://getcomposer.org/installer | php; fi; php composer.phar install --prefer-source" | |
after_deploy: | |
- "rm -f app/storage/cache/*" | |
- "php artisan cache:clear" | |
- "rm -f app/storage/views/*" | |
before_deploy: | |
# if you need to run migrations | |
# - "php artisan migrate" | |
cache1: | |
type: redis | |
db1: | |
type: mysql |
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 characters
'mysql' => array( | |
'driver' => 'mysql', | |
'host' => isset($_SERVER['DB1_HOST']) ? $_SERVER['DB1_HOST'] : 'localhost', | |
'database' => isset($_SERVER['DB1_NAME']) ? $_SERVER['DB1_NAME'] : 'my-app', | |
'username' => isset($_SERVER['DB1_USER']) ? $_SERVER['DB1_USER'] : 'notroot', | |
'password' => isset($_SERVER['DB1_PASS']) ? $_SERVER['DB1_PASS'] : 'notroot', | |
'charset' => 'utf8', | |
'collation' => 'utf8_unicode_ci', | |
'prefix' => '', | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment