remove owncloud10_with_oc_web

This commit is contained in:
Willy Kloucek
2021-07-15 10:23:22 +02:00
parent bcefff9b8d
commit 2bdb522a1d
10 changed files with 0 additions and 1085 deletions

View File

@@ -1,29 +0,0 @@
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Treafik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
### oC10 ###
# Domain of ownCloud 10, where you can find the frontend. Defaults to "oc10.owncloud.test"
#OC10_DOMAIN=
# If you want to use debugging and tracing with this stack,
# you need uncomment following line. Please see documentation at
# https://owncloud.dev/ocis/deployment/monitoring-tracing/
#COMPOSE_FILE=docker-compose.yml:monitoring_tracing/docker-compose-additions.yml

View File

@@ -1,6 +0,0 @@
---
document this deployment example in: docs/ocis/deployment/owncloud10_with_oc_web.md
---
Please refer to [our documentation](https://owncloud.dev/ocis/deployment/owncloud10_with_oc_web/)
for instructions on how to deploy this scenario.

View File

@@ -1,558 +0,0 @@
<?php
function getConfigFromEnv() {
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$domain = trim(
explode(
",",
$_SERVER['HTTP_X_FORWARDED_HOST']
)[0]
);
} else if (isset($_SERVER['SERVER_NAME'])) {
$domain = $_SERVER['SERVER_NAME'];
} else {
$domain = 'localhost';
}
$config = [
'apps_paths' => [
0 => [
"path" => OC::$SERVERROOT . "/apps",
"url" => "/apps",
"writable" => false
],
1 => [
"path" => OC::$SERVERROOT . "/custom",
"url" => "/custom",
"writable" => true
]
],
'trusted_domains' => [
0 => $domain
],
'openid-connect' => [
'provider-url' => getenv('OCIS_URL'),
'client-id' => 'oc10',
'client-secret' => 'super',
'loginButtonName' => 'OpenId Connect',
'search-attribute' => 'preferred_username',
'mode' => 'userid',
'autoRedirectOnLoginPage' => true,
'insecure' => true,
'post_logout_redirect_uri' => getenv('OWNCLOUD_DOMAIN') . '/',
],
'datadirectory' => getenv('OWNCLOUD_VOLUME_FILES'),
'dbtype' => getenv('OWNCLOUD_DB_TYPE'),
'dbhost' => getenv('OWNCLOUD_DB_HOST'),
'dbname' => getenv('OWNCLOUD_DB_NAME'),
'dbuser' => getenv('OWNCLOUD_DB_USERNAME'),
'dbpassword' => getenv('OWNCLOUD_DB_PASSWORD'),
'dbtableprefix' => getenv('OWNCLOUD_DB_PREFIX'),
'web.baseUrl' => getenv('OCIS_URL'),
'cors.allowed-domains' => [getenv('OCIS_URL')],
'log_type' => 'owncloud',
'supportedDatabases' => [
'sqlite',
'mysql',
'pgsql',
],
'upgrade.disable-web' => true,
];
if (getenv('OWNCLOUD_CORS_ALLOWED_DOMAINS') != '') {
$config['cors.allowed-domains'] = explode(',', getenv('OWNCLOUD_CORS_ALLOWED_DOMAINS'));
}
if (getenv('OWNCLOUD_VERSION_HIDE') != '') {
$config['version.hide'] = getenv('OWNCLOUD_VERSION_HIDE') == 'true';
}
if (getenv('OWNCLOUD_SHOW_SERVER_HOSTNAME') != '') {
$config['show_server_hostname'] = getenv('OWNCLOUD_SHOW_SERVER_HOSTNAME') == 'true';
}
if (getenv('OWNCLOUD_DEFAULT_LANGUAGE') != '') {
$config['default_language'] = getenv('OWNCLOUD_DEFAULT_LANGUAGE');
}
if (getenv('OWNCLOUD_DEFAULT_APP') != '') {
$config['defaultapp'] = getenv('OWNCLOUD_DEFAULT_APP');
}
if (getenv('OWNCLOUD_KNOWLEDGEBASE_ENABLED') != '') {
$config['knowledgebaseenabled'] = getenv('OWNCLOUD_KNOWLEDGEBASE_ENABLED') == 'true';
}
if (getenv('OWNCLOUD_ENABLE_AVATARS') != '') {
$config['enable_avatars'] = getenv('OWNCLOUD_ENABLE_AVATARS') == 'true';
}
if (getenv('OWNCLOUD_ALLOW_USER_TO_CHANGE_DISPLAY_NAME') != '') {
$config['allow_user_to_change_display_name'] = getenv('OWNCLOUD_ALLOW_USER_TO_CHANGE_DISPLAY_NAME') == 'true';
}
if (getenv('OWNCLOUD_REMEMBER_LOGIN_COOKIE_LIFETIME') != '') {
$config['remember_login_cookie_lifetime'] = (int) getenv('OWNCLOUD_REMEMBER_LOGIN_COOKIE_LIFETIME');
}
if (getenv('OWNCLOUD_SESSION_LIFETIME') != '') {
$config['session_lifetime'] = (int) getenv('OWNCLOUD_SESSION_LIFETIME');
}
if (getenv('OWNCLOUD_SESSION_KEEPALIVE') != '') {
$config['session_keepalive'] = getenv('OWNCLOUD_SESSION_KEEPALIVE') == 'true';
}
if (getenv('OWNCLOUD_TOKEN_AUTH_ENFORCED') != '') {
$config['token_auth_enforced'] = getenv('OWNCLOUD_TOKEN_AUTH_ENFORCED') == 'true';
}
if (getenv('OWNCLOUD_CSRF_DISABLED') != '') {
$config['csrf.disabled'] = getenv('OWNCLOUD_CSRF_DISABLED') == 'true';
}
if (getenv('OWNCLOUD_SKELETON_DIRECTORY') != '') {
$config['skeletondirectory'] = getenv('OWNCLOUD_SKELETON_DIRECTORY');
}
if (getenv('OWNCLOUD_LOST_PASSWORD_LINK') != '') {
$config['lost_password_link'] = getenv('OWNCLOUD_LOST_PASSWORD_LINK');
}
if (getenv('OWNCLOUD_ACCOUNTS_ENABLE_MEDIAL_SEARCH') != '') {
$config['accounts.enable_medial_search'] = getenv('OWNCLOUD_ACCOUNTS_ENABLE_MEDIAL_SEARCH') == 'true';
}
if (getenv('OWNCLOUD_USER_SEARCH_MIN_LENGTH') != '') {
$config['user.search_min_length'] = (int) getenv('OWNCLOUD_USER_SEARCH_MIN_LENGTH');
}
if (getenv('OWNCLOUD_MAIL_DOMAIN') != '') {
$config['mail_domain'] = getenv('OWNCLOUD_MAIL_DOMAIN');
}
if (getenv('OWNCLOUD_MAIL_FROM_ADDRESS') != '') {
$config['mail_from_address'] = getenv('OWNCLOUD_MAIL_FROM_ADDRESS');
}
if (getenv('OWNCLOUD_MAIL_SMTP_DEBUG') != '') {
$config['mail_smtpdebug'] = getenv('OWNCLOUD_MAIL_SMTP_DEBUG') == 'true';
}
if (getenv('OWNCLOUD_MAIL_SMTP_MODE') != '') {
$config['mail_smtpmode'] = getenv('OWNCLOUD_MAIL_SMTP_MODE');
}
if (getenv('OWNCLOUD_MAIL_SMTP_HOST') != '') {
$config['mail_smtphost'] = getenv('OWNCLOUD_MAIL_SMTP_HOST');
}
if (getenv('OWNCLOUD_MAIL_SMTP_PORT') != '') {
$config['mail_smtpport'] = (int) getenv('OWNCLOUD_MAIL_SMTP_PORT');
}
if (getenv('OWNCLOUD_MAIL_SMTP_TIMEOUT') != '') {
$config['mail_smtptimeout'] = (int) getenv('OWNCLOUD_MAIL_SMTP_TIMEOUT');
}
if (getenv('OWNCLOUD_MAIL_SMTP_SECURE') != '') {
$config['mail_smtpsecure'] = getenv('OWNCLOUD_MAIL_SMTP_SECURE');
}
if (getenv('OWNCLOUD_MAIL_SMTP_AUTH') != '') {
$config['mail_smtpauth'] = getenv('OWNCLOUD_MAIL_SMTP_AUTH') == 'true';
}
if (getenv('OWNCLOUD_MAIL_SMTP_AUTH_TYPE') != '') {
$config['mail_smtpauthtype'] = getenv('OWNCLOUD_MAIL_SMTP_AUTH_TYPE');
}
if (getenv('OWNCLOUD_MAIL_SMTP_NAME') != '') {
$config['mail_smtpname'] = getenv('OWNCLOUD_MAIL_SMTP_NAME');
}
if (getenv('OWNCLOUD_MAIL_SMTP_PASSWORD') != '') {
$config['mail_smtppassword'] = getenv('OWNCLOUD_MAIL_SMTP_PASSWORD');
}
if (getenv('OWNCLOUD_OVERWRITE_HOST') != '') {
$config['overwritehost'] = getenv('OWNCLOUD_OVERWRITE_HOST');
}
if (getenv('OWNCLOUD_OVERWRITE_PROTOCOL') != '') {
$config['overwriteprotocol'] = getenv('OWNCLOUD_OVERWRITE_PROTOCOL');
}
if (getenv('OWNCLOUD_OVERWRITE_WEBROOT') != '') {
$config['overwritewebroot'] = getenv('OWNCLOUD_OVERWRITE_WEBROOT');
}
if (getenv('OWNCLOUD_OVERWRITE_COND_ADDR') != '') {
$config['overwritecondaddr'] = getenv('OWNCLOUD_OVERWRITE_COND_ADDR');
}
if (getenv('OWNCLOUD_OVERWRITE_CLI_URL') != '') {
$config['overwrite.cli.url'] = getenv('OWNCLOUD_OVERWRITE_CLI_URL');
}
if (getenv('OWNCLOUD_HTACCESS_REWRITE_BASE') != '') {
$config['htaccess.RewriteBase'] = getenv('OWNCLOUD_HTACCESS_REWRITE_BASE');
}
if (getenv('OWNCLOUD_PROXY') != '') {
$config['proxy'] = getenv('OWNCLOUD_PROXY');
}
if (getenv('OWNCLOUD_PROXY_USERPWD') != '') {
$config['proxyuserpwd'] = getenv('OWNCLOUD_PROXY_USERPWD');
}
if (getenv('OWNCLOUD_TRASHBIN_RETENTION_OBLIGATION') != '') {
$config['trashbin_retention_obligation'] = getenv('OWNCLOUD_TRASHBIN_RETENTION_OBLIGATION');
}
if (getenv('OWNCLOUD_TRASHBIN_PURGE_LIMIT') != '') {
$config['trashbin_purge_limit'] = (int) getenv('OWNCLOUD_TRASHBIN_PURGE_LIMIT');
}
if (getenv('OWNCLOUD_VERSIONS_RETENTION_OBLIGATION') != '') {
$config['versions_retention_obligation'] = getenv('OWNCLOUD_VERSIONS_RETENTION_OBLIGATION');
}
if (getenv('OWNCLOUD_UPDATE_CHECKER') != '') {
$config['updatechecker'] = getenv('OWNCLOUD_UPDATE_CHECKER') == 'true';
}
if (getenv('OWNCLOUD_UPDATER_SERVER_URL') != '') {
$config['updater.server.url'] = getenv('OWNCLOUD_UPDATER_SERVER_URL');
}
if (getenv('OWNCLOUD_HAS_INTERNET_CONNECTION') != '') {
$config['has_internet_connection'] = getenv('OWNCLOUD_HAS_INTERNET_CONNECTION') == 'true';
}
if (getenv('OWNCLOUD_CHECK_FOR_WORKING_WELLKNOWN_SETUP') != '') {
$config['check_for_working_wellknown_setup'] = getenv('OWNCLOUD_CHECK_FOR_WORKING_WELLKNOWN_SETUP') == 'true';
}
if (getenv('OWNCLOUD_OPERATION_MODE') != '') {
$config['operation.mode'] = getenv('OWNCLOUD_OPERATION_MODE');
}
if (getenv('OWNCLOUD_LOG_FILE') != '') {
$config['logfile'] = getenv('OWNCLOUD_LOG_FILE');
}
if (getenv('OWNCLOUD_LOG_LEVEL') != '') {
$config['loglevel'] = (int) getenv('OWNCLOUD_LOG_LEVEL');
}
if (getenv('OWNCLOUD_LOG_DATE_FORMAT') != '') {
$config['logdateformat'] = getenv('OWNCLOUD_LOG_DATE_FORMAT');
}
if (getenv('OWNCLOUD_LOG_TIMEZONE') != '') {
$config['logtimezone'] = getenv('OWNCLOUD_LOG_TIMEZONE');
}
if (getenv('OWNCLOUD_CRON_LOG') != '') {
$config['cron_log'] = getenv('OWNCLOUD_CRON_LOG') == 'true';
}
if (getenv('OWNCLOUD_LOG_ROTATE_SIZE') != '') {
$config['log_rotate_size'] = (int) getenv('OWNCLOUD_LOG_ROTATE_SIZE');
}
if (getenv('OWNCLOUD_ENABLE_PREVIEWS') != '') {
$config['enable_previews'] = getenv('OWNCLOUD_ENABLE_PREVIEWS') == 'true';
}
if (getenv('OWNCLOUD_PREVIEW_MAX_X') != '') {
$config['preview_max_x'] = (int) getenv('OWNCLOUD_PREVIEW_MAX_X');
}
if (getenv('OWNCLOUD_PREVIEW_MAX_Y') != '') {
$config['preview_max_y'] = (int) getenv('OWNCLOUD_PREVIEW_MAX_Y');
}
if (getenv('OWNCLOUD_PREVIEW_MAX_SCALE_FACTOR') != '') {
$config['preview_max_scale_factor'] = (int) getenv('OWNCLOUD_PREVIEW_MAX_SCALE_FACTOR');
}
if (getenv('OWNCLOUD_PREVIEW_MAX_FILESIZE_IMAGE') != '') {
$config['preview_max_filesize_image'] = getenv('OWNCLOUD_PREVIEW_MAX_FILESIZE_IMAGE');
}
if (getenv('OWNCLOUD_PREVIEW_LIBREOFFICE_PATH') != '') {
$config['preview_libreoffice_path'] = getenv('OWNCLOUD_PREVIEW_LIBREOFFICE_PATH');
}
if (getenv('OWNCLOUD_PREVIEW_OFFICE_CL_PARAMETERS') != '') {
$config['preview_office_cl_parameters'] = getenv('OWNCLOUD_PREVIEW_OFFICE_CL_PARAMETERS');
}
if (getenv('OWNCLOUD_ENABLED_PREVIEW_PROVIDERS') != '') {
$config['enabledPreviewProviders'] = explode(',', getenv('OWNCLOUD_ENABLED_PREVIEW_PROVIDERS'));
}
if (getenv('OWNCLOUD_COMMENTS_MANAGER_FACTORY') != '') {
$config['comments.managerFactory'] = getenv('OWNCLOUD_COMMENTS_MANAGER_FACTORY');
}
if (getenv('OWNCLOUD_SYSTEMTAGS_MANAGER_FACTORY') != '') {
$config['systemtags.managerFactory'] = getenv('OWNCLOUD_SYSTEMTAGS_MANAGER_FACTORY');
}
if (getenv('OWNCLOUD_MAINTENANCE') != '') {
$config['maintenance'] = getenv('OWNCLOUD_MAINTENANCE') == 'true';
}
if (getenv('OWNCLOUD_SINGLEUSER') != '') {
$config['singleuser'] = getenv('OWNCLOUD_SINGLEUSER');
}
if (getenv('OWNCLOUD_ENABLE_CERTIFICATE_MANAGEMENT') != '') {
$config['enable_certificate_management'] = getenv('OWNCLOUD_ENABLE_CERTIFICATE_MANAGEMENT');
}
if (getenv('OWNCLOUD_MEMCACHE_LOCAL') != '') {
$config['memcache.local'] = getenv('OWNCLOUD_MEMCACHE_LOCAL');
}
if (getenv('OWNCLOUD_CACHE_PATH') != '') {
$config['cache_path'] = getenv('OWNCLOUD_CACHE_PATH');
}
if (getenv('OWNCLOUD_CACHE_CHUNK_GC_TTL') != '') {
$config['cache_chunk_gc_ttl'] = (int) getenv('OWNCLOUD_CACHE_CHUNK_GC_TTL');
}
if (getenv('OWNCLOUD_DAV_CHUNK_BASE_DIR') != '') {
$config['dav.chunk_base_dir'] = getenv('OWNCLOUD_DAV_CHUNK_BASE_DIR');
}
if (getenv('OWNCLOUD_SHARING_MANAGER_FACTORY') != '') {
$config['sharing.managerFactory'] = getenv('OWNCLOUD_SHARING_MANAGER_FACTORY');
}
if (getenv('OWNCLOUD_SHARING_FEDERATION_ALLOW_HTTP_FALLBACK') != '') {
$config['sharing.federation.allowHttpFallback'] = getenv('OWNCLOUD_SHARING_FEDERATION_ALLOW_HTTP_FALLBACK') == 'true';
}
if (getenv('OWNCLOUD_SQLITE_JOURNAL_MODE') != '') {
$config['sqlite.journal_mode'] = getenv('OWNCLOUD_SQLITE_JOURNAL_MODE');
}
if (getenv('OWNCLOUD_MYSQL_UTF8MB4') != '') {
$config['mysql.utf8mb4'] = getenv('OWNCLOUD_MYSQL_UTF8MB4') == 'true';
}
if (getenv('OWNCLOUD_TEMP_DIRECTORY') != '') {
$config['tempdirectory'] = getenv('OWNCLOUD_TEMP_DIRECTORY');
}
if (getenv('OWNCLOUD_HASHING_COST') != '') {
$config['hashingCost'] = (int) getenv('OWNCLOUD_HASHING_COST');
}
if (getenv('OWNCLOUD_BLACKLISTED_FILES') != '') {
$config['blacklisted_files'] = explode(',', getenv('OWNCLOUD_BLACKLISTED_FILES'));
}
if (getenv('OWNCLOUD_EXCLUDED_DIRECTORIES') != '') {
$config['excluded_directories'] = explode(',', getenv('OWNCLOUD_EXCLUDED_DIRECTORIES'));
}
if (getenv('OWNCLOUD_INTEGRITY_EXCLUDED_FILES') != '') {
$config['integrity.excluded.files'] = explode(',', getenv('OWNCLOUD_INTEGRITY_EXCLUDED_FILES'));
}
if (getenv('OWNCLOUD_INTEGRITY_IGNORE_MISSING_APP_SIGNATURE') != '') {
$config['integrity.ignore.missing.app.signature'] = explode(',', getenv('OWNCLOUD_INTEGRITY_IGNORE_MISSING_APP_SIGNATURE'));
}
if (getenv('OWNCLOUD_SHARE_FOLDER') != '') {
$config['share_folder'] = getenv('OWNCLOUD_SHARE_FOLDER');
}
if (getenv('OWNCLOUD_CIPHER') != '') {
$config['cipher'] = getenv('OWNCLOUD_CIPHER');
}
if (getenv('OWNCLOUD_MINIMUM_SUPPORTED_DESKTOP_VERSION') != '') {
$config['minimum.supported.desktop.version'] = getenv('OWNCLOUD_MINIMUM_SUPPORTED_DESKTOP_VERSION');
}
if (getenv('OWNCLOUD_QUOTA_INCLUDE_EXTERNAL_STORAGE') != '') {
$config['quota_include_external_storage'] = getenv('OWNCLOUD_QUOTA_INCLUDE_EXTERNAL_STORAGE') == 'true';
}
if (getenv('OWNCLOUD_FILESYSTEM_CHECK_CHANGES') != '') {
$config['filesystem_check_changes'] = (int) getenv('OWNCLOUD_FILESYSTEM_CHECK_CHANGES');
}
if (getenv('OWNCLOUD_PART_FILE_IN_STORAGE') != '') {
$config['part_file_in_storage'] = getenv('OWNCLOUD_PART_FILE_IN_STORAGE') == 'true';
}
if (getenv('OWNCLOUD_MOUNT_FILE') != '') {
$config['mount_file'] = getenv('OWNCLOUD_MOUNT_FILE');
}
if (getenv('OWNCLOUD_FILESYSTEM_CACHE_READONLY') != '') {
$config['filesystem_cache_readonly'] = getenv('OWNCLOUD_FILESYSTEM_CACHE_READONLY') == 'true';
}
if (getenv('OWNCLOUD_SECRET') != '') {
$config['secret'] = getenv('OWNCLOUD_SECRET');
}
if (getenv('OWNCLOUD_TRUSTED_PROXIES') != '') {
$config['trusted_proxies'] = explode(',', getenv('OWNCLOUD_TRUSTED_PROXIES'));
}
if (getenv('OWNCLOUD_FORWARDED_FOR_HEADERS') != '') {
$config['forwarded_for_headers'] = explode(',', getenv('OWNCLOUD_FORWARDED_FOR_HEADERS'));
}
if (getenv('OWNCLOUD_MAX_FILESIZE_ANIMATED_GIFS_PUBLIC_SHARING') != '') {
$config['max_filesize_animated_gifs_public_sharing'] = (int) getenv('OWNCLOUD_MAX_FILESIZE_ANIMATED_GIFS_PUBLIC_SHARING');
}
if (getenv('OWNCLOUD_FILELOCKING_ENABLED') != '') {
$config['filelocking.enabled'] = getenv('OWNCLOUD_FILELOCKING_ENABLED') == 'true';
}
if (getenv('OWNCLOUD_FILELOCKING_TTL') != '') {
$config['filelocking.ttl'] = getenv('OWNCLOUD_FILELOCKING_TTL');
}
if (getenv('OWNCLOUD_MEMCACHE_LOCKING') != '') {
$config['memcache.locking'] = getenv('OWNCLOUD_MEMCACHE_LOCKING');
}
if (getenv('OWNCLOUD_UPGRADE_AUTOMATIC_APP_UPDATES') != '') {
$config['upgrade.automatic-app-update'] = getenv('OWNCLOUD_UPGRADE_AUTOMATIC_APP_UPDATES') == 'true';
}
if (getenv('OWNCLOUD_DEBUG') != '') {
$config['debug'] = getenv('OWNCLOUD_DEBUG') == 'true';
}
if (getenv('OWNCLOUD_FILES_EXTERNAL_ALLOW_NEW_LOCAL') != '') {
$config['files_external_allow_create_new_local'] = getenv('OWNCLOUD_FILES_EXTERNAL_ALLOW_NEW_LOCAL') == 'true';
}
if (getenv('OWNCLOUD_SMB_LOGGING_ENABLE') != '') {
$config['smb.logging.enable'] = getenv('OWNCLOUD_SMB_LOGGING_ENABLE');
}
if (getenv('OWNCLOUD_DAV_ENABLE_ASYNC') != '') {
$config['dav.enable.async'] = getenv('OWNCLOUD_DAV_ENABLE_ASYNC');
}
if (getenv('OWNCLOUD_LICENSE_KEY') != '') {
$config['license-key'] = getenv('OWNCLOUD_LICENSE_KEY');
}
if (getenv('OWNCLOUD_MARKETPLACE_KEY') != '') {
$config['marketplace.key'] = getenv('OWNCLOUD_MARKETPLACE_KEY');
}
if (getenv('OWNCLOUD_MARKETPLACE_CA') != '') {
$config['marketplace.ca'] = getenv('OWNCLOUD_MARKETPLACE_CA');
}
if (getenv('OWNCLOUD_APPSTORE_URL') != '') {
$config['appstoreurl'] = getenv('OWNCLOUD_APPSTORE_URL');
}
if (getenv('OWNCLOUD_LOGIN_ALTERNATIVES') != '') {
$rows = explode(',', getenv('OWNCLOUD_LOGIN_ALTERNATIVES'));
foreach ($rows as $key => $value) {
parse_str($value, $opts);
$config['login.alternatives'][$key] = $opts;
}
}
switch (true) {
case getenv('OWNCLOUD_REDIS_ENABLED') && getenv('OWNCLOUD_REDIS_ENABLED') == 'true':
$config = array_merge_recursive($config, [
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
]);
switch (true) {
case getenv('OWNCLOUD_REDIS_SEEDS') != '':
$config['redis.cluster']['seeds'] = explode(',', getenv('OWNCLOUD_REDIS_SEEDS'));
if (getenv('OWNCLOUD_REDIS_TIMEOUT') != '') {
$config['redis.cluster']['timeout'] = (float) getenv('OWNCLOUD_REDIS_TIMEOUT');
}
if (getenv('OWNCLOUD_REDIS_READ_TIMEOUT') != '') {
$config['redis.cluster']['read_timeout'] = (float) getenv('OWNCLOUD_REDIS_READ_TIMEOUT');
}
if (getenv('OWNCLOUD_REDIS_FAILOVER_MODE') != '') {
switch (getenv('OWNCLOUD_REDIS_FAILOVER_MODE')) {
case 'FAILOVER_NONE':
$config['redis.cluster']['failover_mode'] = \RedisCluster::FAILOVER_NONE;
case 'FAILOVER_ERROR':
$config['redis.cluster']['failover_mode'] = \RedisCluster::FAILOVER_ERROR;
case 'FAILOVER_DISTRIBUTE':
$config['redis.cluster']['failover_mode'] = \RedisCluster::FAILOVER_DISTRIBUTE;
}
}
case getenv('OWNCLOUD_REDIS_HOST') != '':
$config['redis']['host'] = getenv('OWNCLOUD_REDIS_HOST');
$config['redis']['port'] = getenv('OWNCLOUD_REDIS_PORT');
if (getenv('OWNCLOUD_REDIS_DB') != '') {
$config['redis']['dbindex'] = getenv('OWNCLOUD_REDIS_DB');
}
if (getenv('OWNCLOUD_REDIS_PASSWORD') != '') {
$config['redis']['password'] = getenv('OWNCLOUD_REDIS_PASSWORD');
}
if (getenv('OWNCLOUD_REDIS_TIMEOUT') != '') {
$config['redis']['timeout'] = (float) getenv('OWNCLOUD_REDIS_TIMEOUT');
}
}
break;
case getenv('OWNCLOUD_MEMCACHED_ENABLED') && getenv('OWNCLOUD_MEMCACHED_ENABLED') == 'true':
$config = array_merge_recursive($config, [
'memcache.distributed' => '\OC\Memcache\Memcached',
'memcache.locking' => '\OC\Memcache\Memcached',
'memcached_servers' => [
[
getenv('OWNCLOUD_MEMCACHED_HOST'),
getenv('OWNCLOUD_MEMCACHED_PORT'),
],
],
]);
if (getenv('OWNCLOUD_MEMCACHED_OPTIONS') != '') {
parse_str(getenv('OWNCLOUD_MEMCACHED_OPTIONS'), $opts);
foreach($opts as $key => $value) {
$config['memcached_options'][constant($key)] = $value;
}
}
break;
}
return $config;
}
$CONFIG = getConfigFromEnv();

View File

@@ -1,3 +0,0 @@
config.json
identifier-registration.yaml
proxy-config.json

View File

@@ -1,34 +0,0 @@
{
"server": "https://ocis.owncloud.test",
"theme": "owncloud",
"version": "0.1.0",
"openIdConnect": {
"metadata_url": "https://ocis.owncloud.test/.well-known/openid-configuration",
"authority": "https://ocis.owncloud.test",
"client_id": "web",
"response_type": "code",
"scope": "openid profile email"
},
"applications": [
{
"title": {
"en": "Classic Design",
"de": "Klassisches ownCloud"
},
"icon": "switch_ui",
"url": "https://oc10.owncloud.test",
"target": "_self"
},
{
"title": {
"en": "Settings",
"de": "Einstellungen"
},
"icon": "application",
"url": "https://oc10.owncloud.test/index.php/settings/personal",
"target": "_self",
"menu": "user"
}
],
"apps": ["files", "draw-io", "markdown-editor", "media-viewer"]
}

View File

@@ -1,52 +0,0 @@
---
# OpenID Connect client registry.
clients:
- id: web
name: OCIS
application_type: web
trusted: yes
redirect_uris:
- https://ocis.owncloud.test/
- https://ocis.owncloud.test/oidc-callback.html
- https://ocis.owncloud.test/oidc-silent-redirect.html
origins:
- https://ocis.owncloud.test
- id: oc10
name: OC10
application_type: web
secret: super
trusted: yes
redirect_uris:
- https://oc10.owncloud.test/
- https://oc10.owncloud.test/apps/openidconnect/redirect
origins:
- https://oc10.owncloud.test
- id: ocis-explorer.js
name: OCIS Graph Explorer
trusted: yes
application_type: web
- id: xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69
secret: UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh
name: ownCloud desktop app
application_type: native
redirect_uris:
- http://127.0.0.1
- http://localhost
- id: e4rAsNUSIUs0lF4nbv9FmCeUkTlV9GdgTLDH1b5uie7syb90SzEVrbN7HIpmWJeD
secret: dInFYGV33xKzhbRmpqQltYNdfLdJIfJ9L5ISoKhNoT9qZftpdWSP71VrpGR9pmoD
name: ownCloud Android app
application_type: native
redirect_uris:
- oc://android.owncloud.com
- id: mxd5OQDk6es5LzOzRvidJNfXLUZS2oN3oUFeXPP8LpPrhx3UroJFduGEYIBOxkY1
secret: KFeFWWEZO9TkisIQzR3fo7hfiMXlOpaqP8CFuTbSHzV1TUuGECglPxpiVKJfOXIx
name: ownCloud iOS app
application_type: native
redirect_uris:
- oc://ios.owncloud.com
- oc.ios://ios.owncloud.com

View File

@@ -1,63 +0,0 @@
{
"HTTP": {
"Namespace": "ocis_oc10_backend"
},
"policy_selector": {
"static": {
"policy": "ocis_oc10_backend"
}
},
"policies": [
{
"name": "ocis_oc10_backend",
"routes": [
{
"endpoint": "/",
"backend": "http://localhost:9100"
},
{
"endpoint": "/.well-known/",
"backend": "http://localhost:9130"
},
{
"endpoint": "/konnect/",
"backend": "http://localhost:9130"
},
{
"endpoint": "/signin/",
"backend": "http://localhost:9130"
},
{
"endpoint": "/ocs/",
"backend": "https://oc10.owncloud.test",
"apache-vhost": true
},
{
"endpoint": "/remote.php/",
"backend": "https://oc10.owncloud.test",
"apache-vhost": true
},
{
"endpoint": "/dav/",
"backend": "https://oc10.owncloud.test",
"apache-vhost": true
},
{
"endpoint": "/webdav/",
"backend": "https://oc10.owncloud.test",
"apache-vhost": true
},
{
"endpoint": "/status.php",
"backend": "https://oc10.owncloud.test",
"apache-vhost": true
},
{
"endpoint": "/index.php/",
"backend": "https://oc10.owncloud.test",
"apache-vhost": true
}
]
}
]
}

View File

@@ -1,212 +0,0 @@
---
version: "3.7"
services:
traefik:
image: traefik:v2.4
networks:
default:
aliases:
- ${OCIS_DOMAIN:-ocis.owncloud.test}
- ${OC10_DOMAIN:-oc10.owncloud.test}
command:
#- "--log.level=DEBUG"
- "--certificatesResolvers.http.acme.email=${TRAEFIK_ACME_MAIL:-example@example.org}"
- "--certificatesResolvers.http.acme.storage=/certs/acme.json"
- "--certificatesResolvers.http.acme.httpChallenge.entryPoint=http"
- "--api.dashboard=true"
- "--entryPoints.http.address=:80"
- "--entryPoints.https.address=:443"
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--providers.docker.exposedByDefault=false"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "certs:/certs"
labels:
- "traefik.enable=${TRAEFIK_DASHBOARD:-false}"
- "traefik.http.routers.traefik.entrypoints=http"
- "traefik.http.routers.traefik.rule=Host(`${TRAEFIK_DOMAIN:-traefik.owncloud.test}`)"
- "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_BASIC_AUTH_USERS:-admin:$apr1$4vqie50r$YQAmQdtmz5n9rEALhxJ4l.}" # defaults to admin:admin
- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=Host(`${TRAEFIK_DOMAIN:-traefik.owncloud.test}`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=http"
- "traefik.http.routers.traefik-secure.service=api@internal"
logging:
driver: "local"
restart: always
ocis:
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
entrypoint:
- /bin/sh
- -c
- |
cp /config/identifier-registration.dist.yaml /config/identifier-registration.yaml
sed -i 's/ocis.owncloud.test/${OCIS_DOMAIN:-ocis.owncloud.test}/g' /config/identifier-registration.yaml
sed -i 's/oc10.owncloud.test/${OC10_DOMAIN:-oc10.owncloud.test}/g' /config/identifier-registration.yaml
cp /config/config.dist.json /config/config.json
sed -i 's/ocis.owncloud.test/${OCIS_DOMAIN:-ocis.owncloud.test}/g' /config/config.json
sed -i 's/oc10.owncloud.test/${OC10_DOMAIN:-oc10.owncloud.test}/g' /config/config.json
cp /config/proxy-config.dist.json /config/proxy-config.json
sed -i 's/ocis.owncloud.test/${OCIS_DOMAIN:-ocis.owncloud.test}/g' /config/proxy-config.json
sed -i 's/oc10.owncloud.test/${OC10_DOMAIN:-oc10.owncloud.test}/g' /config/proxy-config.json
ocis server
networks:
default:
environment:
# general config
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error}
# proxy
PROXY_AUTOPROVISION_ACCOUNTS: "true"
PROXY_INSECURE_BACKENDS: "${INSECURE:-false}"
PROXY_OIDC_INSECURE: "${INSECURE:-false}"
PROXY_CONFIG_FILE: "/config/proxy-config.json"
PROXY_ENABLE_PRESIGNEDURLS: "false"
PROXY_TLS: "false"
# idp - binddn must exist as oc10 admin user
IDP_IDENTIFIER_REGISTRATION_CONF: "/config/identifier-registration.yaml"
IDP_INSECURE: "${INSECURE:-false}"
IDP_SIGNING_KID: super
IDP_TLS: 0
LDAP_BASEDN: "dc=example,dc=org"
LDAP_BINDDN: "cn=admin,dc=example,dc=org"
LDAP_BINDPW: "admin"
LDAP_EMAIL_ATTRIBUTE: mail
LDAP_FILTER: "(objectClass=posixaccount)"
LDAP_LOGIN_ATTRIBUTE: uid
LDAP_NAME_ATTRIBUTE: givenName
LDAP_SCOPE: sub
LDAP_URI: ldap://localhost:9125
LDAP_UUID_ATTRIBUTE_TYPE: text
LDAP_UUID_ATTRIBUTE: uid
# glauth
GLAUTH_BACKEND_DATASTORE: owncloud
GLAUTH_BACKEND_SERVERS: https://${OC10_DOMAIN:-oc10.owncloud.test}/apps/graphapi/v1.0
GLAUTH_BACKEND_INSECURE: "${INSECURE:-false}"
# graph
GRAPH_OIDC_ENDPOINT: https://${OC10_DOMAIN:-oc10.owncloud.test}/apps/graphapi/v1.0
# web ui
WEB_UI_CONFIG: "/config/config.json"
# storage - although not used, yet
STORAGE_OIDC_INSECURE: "${INSECURE:-false}"
STORAGE_TRANSFER_EXPIRES: 86400
volumes:
- ./config/ocis:/config
- ocis-data:/var/tmp/ocis
labels:
- "traefik.enable=true"
- "traefik.http.routers.ocis.entrypoints=http"
- "traefik.http.routers.ocis.rule=Host(`${OCIS_DOMAIN:-ocis.owncloud.test}`)"
- "traefik.http.middlewares.ocis-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.ocis.middlewares=ocis-https-redirect"
- "traefik.http.routers.ocis-secure.entrypoints=https"
- "traefik.http.routers.ocis-secure.rule=Host(`${OCIS_DOMAIN:-ocis.owncloud.test}`)"
- "traefik.http.routers.ocis-secure.tls=true"
- "traefik.http.routers.ocis-secure.tls.certresolver=http"
- "traefik.http.routers.ocis-secure.service=ocis"
- "traefik.http.services.ocis.loadbalancer.server.port=9200"
logging:
driver: "local"
restart: always
oc10:
image: owncloud/server:10.6.0-rc1
depends_on:
- db
- redis
environment:
PROXY_LOG_LEVEL: debug
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
OWNCLOUD_DOMAIN: ${OC10_DOMAIN:-oc10.owncloud.test}
OWNCLOUD_DB_TYPE: mysql
OWNCLOUD_DB_NAME: owncloud
OWNCLOUD_DB_USERNAME: owncloud
OWNCLOUD_DB_PASSWORD: owncloud
OWNCLOUD_DB_HOST: db
OWNCLOUD_ADMIN_USERNAME: admin
OWNCLOUD_ADMIN_PASSWORD: admin
OWNCLOUD_MYSQL_UTF8MB4: "true"
OWNCLOUD_REDIS_ENABLED: "true"
OWNCLOUD_REDIS_HOST: redis
OWNCLOUD_TRUSTED_PROXIES: ${OC10_DOMAIN:-oc10.owncloud.test}
OWNCLOUD_OVERWRITE_PROTOCOL: https
OWNCLOUD_OVERWRITE_HOST: ${OC10_DOMAIN:-oc10.owncloud.test}
OWNCLOUD_APPS_ENABLE: "openidconnect,oauth2,user_ldap,graphapi"
OWNCLOUD_LOG_LEVEL: 0
volumes:
- ./config/oc10/config.php:/etc/templates/config.php
- files:/mnt/data
- tmp:/tmp/shared
labels:
- "traefik.enable=true"
- "traefik.http.routers.oc10.entrypoints=http"
- "traefik.http.routers.oc10.rule=Host(`${OC10_DOMAIN:-oc10.owncloud.test}`)"
- "traefik.http.middlewares.oc10-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.oc10.middlewares=oc10-https-redirect"
- "traefik.http.routers.oc10-secure.entrypoints=https"
- "traefik.http.routers.oc10-secure.rule=Host(`${OC10_DOMAIN:-oc10.owncloud.test}`)"
- "traefik.http.routers.oc10-secure.tls=true"
- "traefik.http.routers.oc10-secure.tls.certresolver=http"
- "traefik.http.routers.oc10-secure.service=oc10"
- "traefik.http.services.oc10.loadbalancer.server.port=8080"
logging:
driver: "local"
restart: always
db:
image: mariadb:10.5
environment:
- MYSQL_ROOT_PASSWORD=owncloud
- MYSQL_USER=owncloud
- MYSQL_PASSWORD=owncloud
- MYSQL_DATABASE=owncloud
command: ["--max-allowed-packet=128M", "--innodb-log-file-size=64M"]
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-u", "root", "--password=owncloud"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- mysql:/var/lib/mysql
logging:
driver: "local"
restart: always
redis:
image: redis:6
command: ["--databases", "1"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- redis:/data
logging:
driver: "local"
restart: always
volumes:
certs:
ocis-data:
files:
driver: local
mysql:
driver: local
backup:
driver: local
redis:
driver: local
tmp:
driver: local

View File

@@ -21,13 +21,6 @@ oCIS deployments are super simple, yet there are many configurations possible fo
- [oCIS setup with Keycloak as identity provider]({{< ref "ocis_keycloak" >}})
- [oCIS setup with WOPI server to open office documents in your browser]({{< ref "ocis_wopi" >}})
### Migrate an existing ownCloud 10
You can run ownCloud 10 and oCIS together. This allows you to use new parts of oCIS already with ownCloud 10 and also to have a smooth transition for users from ownCloud 10 to oCIS.
- [ownCloud 10 setup with oCIS serving ownCloud Web and acting as OIDC provider]({{< ref "owncloud10_with_oc_web" >}}) - This allows you to switch between the traditional ownCloud 10 frontend and the new ownCloud Web frontend
- Run ownCloud 10 and oCIS in parallel - together
- Migrate users from ownCloud 10 to oCIS
## Secure an oCIS instance

View File

@@ -1,121 +0,0 @@
---
title: "ownCloud 10 with ownCloud Web"
date: 2020-10-12T14:04:00+01:00
weight: 25
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: owncloud10_with_oc_web.md
---
{{< toc >}}
This deployment scenario shows how to use ownCloud Web as frontend for an existing ownCloud 10 production installation. It enables ownCloud 10 users to log in and work with their files using the new ownCloud Web. While the scenario includes an ownCloud 10 instance, it only exists to show the necessary configuration for your already existing ownCloud 10 installation.
## Overview
* oCIS setup serving ownCloud Web
* oCIS acting as OIDC IDP on the ownCloud 10 user database
* ownCloud 10 setup connected to oCIS
* DNS is resolving one domain for ocis and one for oc10
* Valid ssl certificates for the domains for ssl termination
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/owncloud10_with_oc_web)
{{< hint info >}}
In this setup it's mandatory that the users in ownCloud 10 are assigned to at least one group.
{{< /hint >}}
{{< hint info >}}
In this setup relies on graph-api app to be installed in ownCloud 10. This app is included by default beginning with ownCloud 10.6. If you are on a lower version, please install it manually.
{{< /hint >}}
## Server Deployment
### Requirements
* Linux server with docker and docker-compose installed
* Three domains set up and pointing to your server
- ocis.* for serving oCIS
- oc10.* for serving
- traefik.* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install oCIS and Traefik
* Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
* Go to the deployment example
`cd ocis/deployment/examples/ocis_oc10_backend`
* Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Treafik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
### oC10 ###
# Domain of ownCloud 10, where you can find the frontend. Defaults to "oc10.owncloud.test"
#OC10_DOMAIN=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` eg. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (eg. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default ocis will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, eg. `OCIS_DOMAIN=ocis.owncloud.test`.
Set your domain for the ownCloud 10 frontend in `OC10_DOMAIN=` eg. `OC10_DOMAIN=oc10.owncloud.test`.
Now you have configured everything and can save the file.
* Start the docker stack
`docker-compose up -d`
* You now can visit oCIS and Traefik dashboard on your configured domains
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` files like this:
```
127.0.0.1 ocis.owncloud.test
127.0.0.1 oc10.owncloud.test
127.0.0.1 traefik.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://oc10.owncloud.test in your browser and accept the invalid certificate warning. You now can login with the ownCloud 10 default user "admin" and password "admin". As you might have noticed, you did not see the login prompt of ownCloud 10. This was the login prompt of oCIS. When you go to application you can both in ownCloud Web and ownCloud 10 see a switch to switch vice versa.