Having a quick go with Heroku buttons!
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# Cachet
|
||||
|
||||
[](https://heroku.com/deploy)
|
||||
|
||||
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).
|
||||
|
||||
14
app.json
Normal file
14
app.json
Normal 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
app/config/heroku/database.php
Normal file
20
app/config/heroku/database.php
Normal 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' => '',
|
||||
),
|
||||
)
|
||||
);
|
||||
@@ -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';
|
||||
});
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user