Last active
April 14, 2017 23:14
-
-
Save boina-n/52062525ba760f1175074eefabcd042b to your computer and use it in GitHub Desktop.
This is a script to install kanboard on Cloud Foundry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cf login | |
wget https://kanboard.net/kanboard-latest.zip | |
unzip kanboard-latest.zip | |
cd kanboard | |
mkdir .bp-config | |
cat <<EOF >> .bp-config/options.json | |
{ | |
"PHP_EXTENSIONS": ["gd","openssl","pdo", "pdo_mysql","pdo_sqlite","mbstring","mysql"] | |
} | |
EOF | |
cat <<'EOF' | patch -p0 | |
--- app/ServiceProvider/DatabaseProvider.php.origin 2017-03-20 00:03:06.000000000 +0100 | |
+++ app/ServiceProvider/DatabaseProvider.php 2017-04-07 16:03:30.019741413 +0200 | |
@@ -53,6 +53,9 @@ | |
case 'sqlite': | |
$db = $this->getSqliteInstance(); | |
break; | |
+ case 'mysql2': | |
+ $db = $this->getMysqlInstance(); | |
+ break; | |
case 'mysql': | |
$db = $this->getMysqlInstance(); | |
break; | |
EOF | |
cf create-service p-mysql 512mb kandb | |
cf push kanboard --no-start | |
cf bind-service kanboard kandb | |
cf set-env kanboard DATABASE_URL $(cf env kanboard | grep "uri.*mysq" | awk '{ print $2 }'| tr -d ",") | |
cf restart kanboard | |
cf create-app-manifest kanboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment