Having a quick go with Heroku buttons!

This commit is contained in:
James Brooks
2014-11-20 19:29:06 +00:00
parent f48e390adb
commit 957f81f730
5 changed files with 45 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
web: vendor/bin/heroku-php-apache2 public
+2
View File
@@ -1,5 +1,7 @@
# Cachet # Cachet
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
Cachet is an open source PHP status page system using the Laravel framework. Cachet is an open source PHP status page system using the Laravel framework.
For more information on why I started developing Cachet, check out my [blog post](http://james-brooks.uk/cachet/?utm_source=github&utm_medium=readme&utm_campaign=github-cachet). For more information on why I started developing Cachet, check out my [blog post](http://james-brooks.uk/cachet/?utm_source=github&utm_medium=readme&utm_campaign=github-cachet).
+14
View File
@@ -0,0 +1,14 @@
{
"name": "Cachet",
"description": "Single-site Status Page with Laravel",
"website": "http://james-brooks.uk/cachet",
"repository": "https://github.com/jbrooksuk/Cachet",
"keywords": ["cachet", "laravel", "status", "page"],
"addons": ["cleardb"],
"env": {
"ENV": "heroku"
},
"scripts": {
"postdeploy": "php artisan migrate"
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
$dbURL = parseurl(getenv('CLEARDB_DATABASE_URL'));
$dbName = substr($dbURL["path"], 1);
return array(
'default' => 'cleardb',
'connections' => array(
'cleardb' => array(
'driver' => 'mysql',
'host' => $dbURL['host'],
'database' => $dbName,
'username' => $dbURL['user'],
'password' => $dbURL['pass'],
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
)
);
+8 -4
View File
@@ -24,11 +24,15 @@ $app = new Illuminate\Foundation\Application;
| |
*/ */
$env = $app->detectEnvironment(array( $env = $app->detectEnvironment(function() {
// Take care of Heroku deployment for us.
if ($envName = getenv('ENV')) {
return $envName;
}
'local' => array('homestead', '*.local', '*.config', 'jbrooksuk'), // Always fall back to local.
return 'local';
)); });
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------