@@ -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).
|
||||
|
||||
15
app.json
Normal file
15
app.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"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",
|
||||
"APP_NAME": "My Status Page"
|
||||
},
|
||||
"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 = parse_url(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' => '',
|
||||
),
|
||||
)
|
||||
);
|
||||
@@ -17,7 +17,7 @@ class CreateIncidentsTable extends Migration {
|
||||
$table->increments('id');
|
||||
$table->tinyInteger('component')->default(1);
|
||||
$table->string('name');
|
||||
$table->tinyInteger('status', 1)->default(1);
|
||||
$table->tinyInteger('status')->default(1);
|
||||
$table->longText('message');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ Setting::get('site_name') }} | Cachet</title>
|
||||
<title>{{ getenv('APP_NAME') }} | Cachet</title>
|
||||
<!-- Set the viewport width to device width for mobile -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="author" content="http://james-brooks.uk">
|
||||
|
||||
@@ -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