Skip to content

Conversation

@pc-fan
Copy link
Contributor

@pc-fan pc-fan commented Jan 14, 2016

This is work in progress and tries to address #4.

I added the OWNCLOUD_APPS_DIR var, which defaults to /var/lib/owncloud/apps and gets symlinked to /var/www/owncloud/apps2.
In addition owncloud_configure_apps_paths in assets/runtime/functions should change the owncloud config (config based on https://doc.owncloud.org/server/8.2/admin_manual/installation/apps_management_installation.html#using-custom-app-directories). However despite the container starting up correctly and displaying the following log the app_paths var is not added to the config.php.
@sameersbn Can you imagine why owncloud_set_param echoes the correct values but they dont appear in the config file?

Container log, fetched with docker logs owncloud-fpm:

Initializing datadir...
Installing configuration templates...
Configuring ownCloud...
Configuring ownCloud::database
Setting up ownCloud for firstrun...
Configuring ownCloud::trusted_domain...
‣ Setting config.php parameter: overwrite.cli.url = 'http://DOMAIN'
Configuring ownCloud::apps_paths...
‣ Setting config.php parameter: apps_paths = 'array ( 0 => array ( 'path' => OC::$SERVERROOT.'/apps', 'url' => '/apps', 'writable' => false, ), 1 => array ( 'path' => OC::$SERVERROOT.'/apps2', 'url' => '/apps2', 'writable' => true, ),)'
Configuring ownCloud::max_upload_size...
Configuring ownCloud::max_file_uploads...
Starting ownCloud php5-fpm...

config/config.php (masked some information with capital letters):

root@4ab3ead6ce1f:/var/www/owncloud# cat config/config.php
<?php
$CONFIG = array (
  'passwordsalt' => 'SALT',
  'secret' => 'SECRET',
  'trusted_domains' =>
  array (
    0 => 'DOMAIN',
  ),
  'datadirectory' => '/var/lib/owncloud/ocdata',
  'overwrite.cli.url' => 'DOMAIN',
  'dbtype' => 'pgsql',
  'version' => '8.2.2.2',
  'dbname' => 'owncloud_db',
  'dbhost' => 'postgresql:5432',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => 'PASSWORD',
  'logtimezone' => 'UTC',
  'installed' => true,
  'instanceid' => 'INSTANCEID',
  'maintenance' => false,
);

Also code to backup installed apps was added, but could not be tested till now.
@sameersbn Are the changes in backup_create() and backup_restore() really all it needs to add installed apps to the backup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like at the moment we can only use this spaghetti like line, otherwise the sed command in owncloud_set_param throws an error.
(This was my attempt: https://github.com/pc-fan/docker-owncloud/blob/764c15cb26752d088e0b2337771f706457d31d07/assets/runtime/functions#L315)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant