Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stackato Additions (Should be on separate branch) #7

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ownCloud Demo

ownCloud is a flexible, open source file sync and share solution. This
demo shows how easily it can be pushed to Stackato.

* Project homepage: http://owncloud.org/
* The company behind ownCloud: https://owncloud.com/
* License: AGPLv3

# Configuration

You may wish to change the admin account login and password which is set
in the 'config/autoconfig.php' file, also sets the Stackato database
service credentials the specifies the data directory (linked to the
filesystem service - see 'stackato.yml').

## Deploying to Stackato

stackato push -n

**Note**: The initial admin login is the same as your Stackato user
(email address). The default password is 'changeme'.
24 changes: 24 additions & 0 deletions config/autoconfig.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
$appinfo = getenv("VCAP_APPLICATION");
$appinfo_json = json_decode($appinfo,true);
if (array_key_exists("users", $appinfo_json))
$admin = $appinfo_json["users"][0];
else
$admin = $appinfo_json["group"];

$url_parts = parse_url($_SERVER['DATABASE_URL']);
$db_name = substr( $url_parts{'path'}, 1 );

$AUTOCONFIG = array(
"installed" => false,
"adminlogin" => $admin,
"adminpass" => "changeme",
"directory" => "/app/app/data",
"dbtype" => "mysql",
"dbname" => $db_name,
"dbuser" => $url_parts{'user'},
"dbpass" => $url_parts{'pass'},
"dbhost" => $url_parts{'host'},
"dbtableprefix" => "oc_"
);
?>
13 changes: 13 additions & 0 deletions stackato.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: owncloud
framework:
type: php
runtime: php
mem: 128M
min_version:
client: 1.4.3
services:
${name}-db: mysql
${name}-fs: filesystem
hooks:
pre-running:
- ln -s $STACKATO_FILESYSTEM data