summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-01-12 22:25:44 -0500
committerFrederic Guillot <fred@kanboard.net>2015-01-12 22:25:44 -0500
commit46fd893bd6728031d5f4118f952bf6cce5017965 (patch)
tree0687f701cd35980395d653eb538810d6819a6883
parent6d61d0e751e30e7cdbe4ed077a347e43272eef8b (diff)
Add Heroku one-click install button
-rw-r--r--README.markdown3
-rw-r--r--app.json8
-rw-r--r--app/common.php12
-rw-r--r--docs/heroku.markdown38
4 files changed, 61 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 2ff3f4b0..2402316d 100644
--- a/README.markdown
+++ b/README.markdown
@@ -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
diff --git a/app.json b/app.json
new file mode 100644
index 00000000..0a45bb41
--- /dev/null
+++ b/app.json
@@ -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"]
+} \ No newline at end of file
diff --git a/app/common.php b/app/common.php
index bd336d92..a434a73f 100644
--- a/app/common.php
+++ b/app/common.php
@@ -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';
diff --git a/docs/heroku.markdown b/docs/heroku.markdown
new file mode 100644
index 00000000..ea3c19f9
--- /dev/null
+++ b/docs/heroku.markdown
@@ -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.