Add Heroku one-click install button

This commit is contained in:
Frederic Guillot 2015-01-12 22:25:44 -05:00
parent 6d61d0e751
commit 46fd893bd6
4 changed files with 61 additions and 0 deletions

View File

@ -16,6 +16,8 @@ Official website: <http://kanboard.net>
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/fguillot/kanboard/badges/quality-score.png?s=2b6490781608657cc8c43d02285bfafb4f489528)](https://scrutinizer-ci.com/g/fguillot/kanboard/)
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
Features
--------
@ -97,6 +99,7 @@ Documentation
- [Installation on Centos](docs/centos-installation.markdown)
- [Installation on FreeBSD](docs/freebsd-installation.markdown)
- [Installation on Windows Server with IIS](docs/windows-iis-installation.markdown)
- [Installation on Heroku](docs/heroku.markdown)
- [Example with Nginx + HTTPS + SPDY + PHP-FPM](docs/nginx-ssl-php-fpm.markdown)
#### Database

8
app.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "Kanboard",
"description": "Kanboard is a simple visual task board",
"repository": "https://github.com/fguillot/kanboard",
"logo": "http://kanboard.net/assets/img/icon.svg",
"keywords": ["kanboard", "kanban", "php", "agile"],
"addons": ["heroku-postgresql:hobby-dev"]
}

View File

@ -2,6 +2,18 @@
require 'vendor/autoload.php';
// Automatically parse environment configuration (Heroku)
if (getenv('DATABASE_URL')) {
$dbopts = parse_url(getenv('DATABASE_URL'));
define('DB_DRIVER', $dbopts['scheme']);
define('DB_USERNAME', $dbopts["user"]);
define('DB_PASSWORD', $dbopts["pass"]);
define('DB_HOSTNAME', $dbopts["host"]);
define('DB_NAME', ltrim($dbopts["path"],'/'));
}
// Include custom config file
if (file_exists('config.php')) {
require 'config.php';

38
docs/heroku.markdown Normal file
View File

@ -0,0 +1,38 @@
Deploy Kanboard on Heroku
=========================
You can try Kanboard for free on [Heroku](https://www.heroku.com/).
You can use this one click install button or follow the manual instructions below:
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/fguillot/kanboard)
Requirements
------------
- Heroku account, you can use a free account
- Heroku command line tool installed
Manual instructions
-------------------
```bash
# Get the last development version
git clone https://github.com/fguillot/kanboard.git
cd kanboard
# Push the code to Heroku (You can also use SSH if git over HTTP doesn't work)
heroku create
git push heroku master
# Start a new dyno with a Postgresql database
heroku ps:scale web=1
heroku addons:add heroku-postgresql:hobby-dev
# Open your browser
heroku open
```
Limitations
-----------
The storage on Heroku is ephemeral, that means uploaded files through Kanboard are not persistent after a reboot.