Merge pull request #1041 from owncloud/rename-ocis-phoenix

This commit is contained in:
Lukas Hirt authored and GitHub committed 2020-12-13 20:04:43 +01:00
commit ee7b3213b3
82 files changed
+1760 -1767

No files matched your search

+23 -23
View File
@@ -4,7 +4,7 @@ config = {
'glauth':'', 'glauth':'',
'konnectd':'', 'konnectd':'',
'ocis': '', 'ocis': '',
'ocis-phoenix':'', 'web':'',
'ocis-pkg':'', 'ocis-pkg':'',
'ocs':'', 'ocs':'',
'proxy':'', 'proxy':'',
@@ -21,8 +21,8 @@ config = {
'numberOfParts': 10 'numberOfParts': 10
}, },
'uiTests': { 'uiTests': {
'phoenixBranch': 'master', 'webBranch': 'master',
'phoenixCommit': '262cec1536156dae3281099aca2fde0febeec6e5', 'webCommit': '1b7963eeb52999629682ccef6bff713c0df1729b',
'suites': { 'suites': {
'webUIBasic': [ 'webUIBasic': [
'webUILogin', 'webUILogin',
@@ -224,8 +224,8 @@ def testPipelines(ctx):
pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts'], 'owncloud')) pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts'], 'owncloud'))
pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts'], 'ocis')) pipelines.append(coreApiTests(ctx, config['apiTests']['coreBranch'], config['apiTests']['coreCommit'], runPart, config['apiTests']['numberOfParts'], 'ocis'))
pipelines += uiTests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit']) pipelines += uiTests(ctx, config['uiTests']['webBranch'], config['uiTests']['webCommit'])
pipelines.append(accountsUITests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit'])) pipelines.append(accountsUITests(ctx, config['uiTests']['webBranch'], config['uiTests']['webCommit']))
return pipelines return pipelines
def testOcisModule(ctx, module): def testOcisModule(ctx, module):
@@ -589,11 +589,11 @@ def benchmark(ctx):
}, },
} }
def uiTests(ctx, phoenixBranch, phoenixCommit): def uiTests(ctx, webBranch, webCommit):
suiteNames = config['uiTests']['suites'].keys() suiteNames = config['uiTests']['suites'].keys()
return [uiTestPipeline(ctx, suiteName, phoenixBranch, phoenixCommit) for suiteName in suiteNames] return [uiTestPipeline(ctx, suiteName, webBranch, webCommit) for suiteName in suiteNames]
def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '', storage = 'owncloud', accounts_hash_difficulty = 4): def uiTestPipeline(ctx, suiteName, webBranch = 'master', webCommit = '', storage = 'owncloud', accounts_hash_difficulty = 4):
suites = config['uiTests']['suites'] suites = config['uiTests']['suites']
paths = "" paths = ""
suite = suites[suiteName] suite = suites[suiteName]
@@ -624,7 +624,7 @@ def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '',
'RUN_ON_OCIS': 'true', 'RUN_ON_OCIS': 'true',
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data', 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data',
'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton', 'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton',
'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'WEB_UI_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
'TEST_TAGS': 'not @skipOnOCIS and not @skip', 'TEST_TAGS': 'not @skipOnOCIS and not @skip',
'LOCAL_UPLOAD_DIR': '/uploads', 'LOCAL_UPLOAD_DIR': '/uploads',
'NODE_TLS_REJECT_UNAUTHORIZED': 0, 'NODE_TLS_REJECT_UNAUTHORIZED': 0,
@@ -632,12 +632,12 @@ def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '',
}, },
'commands': [ 'commands': [
'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing', 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing',
'git clone -b %s --single-branch --no-tags https://github.com/owncloud/phoenix.git /srv/app/phoenix' % (phoenixBranch), 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web' % (webBranch),
'cp -r /srv/app/phoenix/tests/acceptance/filesForUpload/* /uploads', 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads',
'cd /srv/app/phoenix', 'cd /srv/app/web',
] + ([ ] + ([
'git checkout %s' % (phoenixCommit) 'git checkout %s' % (webCommit)
] if phoenixCommit != '' else []) + [ ] if webCommit != '' else []) + [
'yarn install-all', 'yarn install-all',
'yarn run acceptance-tests-drone' 'yarn run acceptance-tests-drone'
], ],
@@ -674,7 +674,7 @@ def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '',
}, },
} }
def accountsUITests(ctx, phoenixBranch, phoenixCommit, storage = 'owncloud', accounts_hash_difficulty = 4): def accountsUITests(ctx, webBranch, webCommit, storage = 'owncloud', accounts_hash_difficulty = 4):
return { return {
'kind': 'pipeline', 'kind': 'pipeline',
'type': 'docker', 'type': 'docker',
@@ -696,21 +696,21 @@ def accountsUITests(ctx, phoenixBranch, phoenixCommit, storage = 'owncloud', acc
'RUN_ON_OCIS': 'true', 'RUN_ON_OCIS': 'true',
'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data', 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data',
'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton', 'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton',
'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'WEB_UI_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
'TEST_TAGS': 'not @skipOnOCIS and not @skip', 'TEST_TAGS': 'not @skipOnOCIS and not @skip',
'LOCAL_UPLOAD_DIR': '/uploads', 'LOCAL_UPLOAD_DIR': '/uploads',
'NODE_TLS_REJECT_UNAUTHORIZED': 0, 'NODE_TLS_REJECT_UNAUTHORIZED': 0,
'PHOENIX_PATH': '/srv/app/phoenix', 'WEB_PATH': '/srv/app/web',
'FEATURE_PATH': '/drone/src/accounts/ui/tests/acceptance/features', 'FEATURE_PATH': '/drone/src/accounts/ui/tests/acceptance/features',
}, },
'commands': [ 'commands': [
'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing', 'git clone -b master --depth=1 https://github.com/owncloud/testing.git /srv/app/testing',
'git clone -b %s --single-branch --no-tags https://github.com/owncloud/phoenix.git /srv/app/phoenix' % (phoenixBranch), 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web' % (webBranch),
'cp -r /srv/app/phoenix/tests/acceptance/filesForUpload/* /uploads', 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads',
'cd /srv/app/phoenix', 'cd /srv/app/web',
] + ([ ] + ([
'git checkout %s' % (phoenixCommit) 'git checkout %s' % (webCommit)
] if phoenixCommit != '' else []) + [ ] if webCommit != '' else []) + [
'yarn install-all', 'yarn install-all',
'cd /drone/src/accounts', 'cd /drone/src/accounts',
'yarn install --all', 'yarn install --all',
@@ -1534,7 +1534,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4):
'STORAGE_FRONTEND_PUBLIC_URL': 'https://ocis-server:9200', 'STORAGE_FRONTEND_PUBLIC_URL': 'https://ocis-server:9200',
'STORAGE_SHARING_USER_JSON_FILE': '/srv/app/tmp/ocis/shares.json', 'STORAGE_SHARING_USER_JSON_FILE': '/srv/app/tmp/ocis/shares.json',
'PROXY_ENABLE_BASIC_AUTH': True, 'PROXY_ENABLE_BASIC_AUTH': True,
'PHOENIX_WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'WEB_UI_CONFIG': '/drone/src/tests/config/drone/ocis-config.json',
'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/tests/config/drone/identifier-registration.yml', 'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/tests/config/drone/identifier-registration.yml',
'KONNECTD_ISS': 'https://ocis-server:9200', 'KONNECTD_ISS': 'https://ocis-server:9200',
'KONNECTD_TLS': 'true', 'KONNECTD_TLS': 'true',
+4 -4
View File
@@ -1,10 +1,10 @@
const path = require('path') const path = require('path')
const PHOENIX_PATH = process.env.PHOENIX_PATH const WEB_PATH = process.env.WEB_PATH
const config = require(path.join(PHOENIX_PATH, 'nightwatch.conf.js')) const config = require(path.join(WEB_PATH, 'nightwatch.conf.js'))
config.page_objects_path = [PHOENIX_PATH + '/tests/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects'] config.page_objects_path = [WEB_PATH + '/tests/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects']
config.custom_commands_path = PHOENIX_PATH + '/tests/acceptance/customCommands' config.custom_commands_path = WEB_PATH + '/tests/acceptance/customCommands'
module.exports = { module.exports = {
...config ...config
+1 -1
View File
@@ -21,7 +21,7 @@ import { mapGetters } from 'vuex'
export default { export default {
/** /**
* FIXME: this component has been copied over from phoenix. It should be moved over to ODS, then we can reuse it in * FIXME: this component has been copied over from ownCloud Web. It should be moved over to ODS, then we can reuse it in
* this extension. * this extension.
*/ */
name: 'Avatar', name: 'Avatar',
+5 -5
View File
@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
if [ -z "$PHOENIX_PATH" ] if [ -z "$WEB_PATH" ]
then then
echo "PHOENIX_PATH env variable is not set, cannot find files for tests infrastructure" echo "WEB_PATH env variable is not set, cannot find files for tests infrastructure"
exit 1 exit 1
fi fi
@@ -12,9 +12,9 @@ then
exit 1 exit 1
fi fi
if [ -z "$PHOENIX_CONFIG" ] if [ -z "$WEB_UI_CONFIG" ]
then then
echo "PHOENIX_CONFIG env variable is not set, cannot find phoenix config file" echo "WEB_UI_CONFIG env variable is not set, cannot find web config file"
exit 1 exit 1
fi fi
@@ -46,7 +46,7 @@ clean_up() {
trap clean_up SIGHUP SIGINT SIGTERM EXIT trap clean_up SIGHUP SIGINT SIGTERM EXIT
cp -r "$PHOENIX_PATH"/tests ./"$testFolder" cp -r "$WEB_PATH"/tests ./"$testFolder"
export SERVER_HOST=${SERVER_HOST:-https://localhost:9200} export SERVER_HOST=${SERVER_HOST:-https://localhost:9200}
export BACKEND_HOST=${BACKEND_HOST:-https://localhost:9200} export BACKEND_HOST=${BACKEND_HOST:-https://localhost:9200}
@@ -2,7 +2,7 @@
# OpenID Connect client registry. # OpenID Connect client registry.
clients: clients:
- id: phoenix - id: web
name: OCIS name: OCIS
application_type: web application_type: web
insecure: yes insecure: yes
@@ -79,11 +79,11 @@ services:
PROXY_OIDC_INSECURE: "${INSECURE:-false}" PROXY_OIDC_INSECURE: "${INSECURE:-false}"
PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test} PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test}
PROXY_TLS: "false" PROXY_TLS: "false"
# phoenix config # web config
PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-ocis.owncloud.test} WEB_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-ocis.owncloud.test}
PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/.well-known/openid-configuration WEB_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/.well-known/openid-configuration
PHOENIX_WEB_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer WEB_UI_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer
PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test} WEB_UI_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test}
# storage config # storage config
STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data
STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/ STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/
+1 -1
View File
@@ -15,7 +15,7 @@ TRAEFIK_ACME_MAIL=
OCIS_DOCKER_TAG= OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test" # Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN= OCIS_DOMAIN=
# owncloud Web openid connect client id. Defaults to "ocis-phoenix" # owncloud Web openid connect client id. Defaults to "web"
OCIS_OIDC_CLIENT_ID= OCIS_OIDC_CLIENT_ID=
### Keycloak ### ### Keycloak ###
@@ -53,12 +53,12 @@ services:
PROXY_OIDC_INSECURE: "${INSECURE:-false}" PROXY_OIDC_INSECURE: "${INSECURE:-false}"
PROXY_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master} PROXY_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master}
PROXY_TLS: "false" PROXY_TLS: "false"
# phoenix config # ownCloud Web config
PHOENIX_OIDC_AUTHORITY: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master} WEB_OIDC_AUTHORITY: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master}
PHOENIX_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-ocis-phoenix} WEB_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-web}
PHOENIX_OIDC_METADATA_URL: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master}/.well-known/openid-configuration WEB_OIDC_METADATA_URL: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master}/.well-known/openid-configuration
PHOENIX_WEB_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer WEB_UI_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer
PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test} WEB_UI_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test}
# storage config # storage config
STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data
STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/ STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/
@@ -2,7 +2,7 @@
# OpenID Connect client registry. # OpenID Connect client registry.
clients: clients:
- id: phoenix - id: web
name: OCIS name: OCIS
application_type: web application_type: web
insecure: yes insecure: yes
@@ -58,11 +58,11 @@ services:
PROXY_OIDC_INSECURE: "${INSECURE:-false}" PROXY_OIDC_INSECURE: "${INSECURE:-false}"
PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test} PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test}
PROXY_TLS: "false" PROXY_TLS: "false"
# phoenix config # web config
PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-ocis.owncloud.test} WEB_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-ocis.owncloud.test}
PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/.well-known/openid-configuration WEB_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/.well-known/openid-configuration
PHOENIX_WEB_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer WEB_UI_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer
PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test} WEB_UI_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test}
# storage config # storage config
STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data
STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/ STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/
@@ -50,7 +50,7 @@ function getConfigFromEnv() {
'dbpassword' => getenv('OWNCLOUD_DB_PASSWORD'), 'dbpassword' => getenv('OWNCLOUD_DB_PASSWORD'),
'dbtableprefix' => getenv('OWNCLOUD_DB_PREFIX'), 'dbtableprefix' => getenv('OWNCLOUD_DB_PREFIX'),
'phoenix.baseUrl' => getenv('OCIS_DOMAIN'), 'web.baseUrl' => getenv('OCIS_DOMAIN'),
'cors.allowed-domains' => [getenv('OCIS_DOMAIN')], 'cors.allowed-domains' => [getenv('OCIS_DOMAIN')],
'log_type' => 'owncloud', 'log_type' => 'owncloud',
@@ -5,7 +5,7 @@
"openIdConnect": { "openIdConnect": {
"metadata_url": "https://ocis.owncloud.test/.well-known/openid-configuration", "metadata_url": "https://ocis.owncloud.test/.well-known/openid-configuration",
"authority": "https://ocis.owncloud.test", "authority": "https://ocis.owncloud.test",
"client_id": "phoenix", "client_id": "web",
"response_type": "code", "response_type": "code",
"scope": "openid profile email" "scope": "openid profile email"
}, },
@@ -1,7 +1,7 @@
--- ---
# OpenID Connect client registry. # OpenID Connect client registry.
clients: clients:
- id: phoenix - id: web
name: OCIS name: OCIS
application_type: web application_type: web
insecure: yes insecure: yes
@@ -97,7 +97,7 @@ services:
# graph # graph
GRAPH_OIDC_ENDPOINT: https://${OC10_DOMAIN:-oc10.owncloud.test}/apps/graphapi/v1.0 GRAPH_OIDC_ENDPOINT: https://${OC10_DOMAIN:-oc10.owncloud.test}/apps/graphapi/v1.0
# web ui # web ui
PHOENIX_WEB_CONFIG: "/config/config.json" WEB_UI_CONFIG: "/config/config.json"
# storage - although not used, yet # storage - although not used, yet
STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test} STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test}
STORAGE_OIDC_INSECURE: "${INSECURE:-false}" STORAGE_OIDC_INSECURE: "${INSECURE:-false}"
+1 -1
View File
@@ -3,7 +3,7 @@ config-docs-generate:
make -C ../glauth config-docs-generate make -C ../glauth config-docs-generate
make -C ../konnectd config-docs-generate make -C ../konnectd config-docs-generate
make -C ../ocis config-docs-generate make -C ../ocis config-docs-generate
make -C ../ocis-phoenix config-docs-generate make -C ../web config-docs-generate
make -C ../ocis-pkg config-docs-generate make -C ../ocis-pkg config-docs-generate
make -C ../ocs config-docs-generate make -C ../ocs config-docs-generate
make -C ../proxy config-docs-generate make -C ../proxy config-docs-generate
+1 -1
View File
@@ -11,7 +11,7 @@ Welcome to our developer documentation. Here you can find developer documentatio
- [oCIS](https://owncloud.github.io/ocis/) server - [oCIS](https://owncloud.github.io/ocis/) server
- oCIS extensions - oCIS extensions
- Clients, like: - Clients, like:
- [Phoenix](https://github.com/owncloud/phoenix) - the new web frontend for oCIS and ownCloud - [ownCloud Web](https://github.com/owncloud/web) - the new web frontend for oCIS and ownCloud
- [ownCloud Android app](https://github.com/owncloud/android) - [ownCloud Android app](https://github.com/owncloud/android)
- [ownCloud iOS app](https://github.com/owncloud/ios-app) - [ownCloud iOS app](https://github.com/owncloud/ios-app)
- [ownCloud Desktop Syncing Client](https://github.com/owncloud/client) - [ownCloud Desktop Syncing Client](https://github.com/owncloud/client)
-13
View File
@@ -1,13 +0,0 @@
---
title: "ownCloud Web"
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/ocis-phoenix
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
Note: Work in progress to rename Phoenix to ownCloud Web.
This service embeds [Phoenix](https://github.com/owncloud/phoenix) to provide a UI for ownCloud Infinite Scale.
+1 -1
View File
@@ -15,7 +15,7 @@ for other extensions to register new settings within oCIS. It is responsible for
settings values as well. settings values as well.
For ease of use, this extension provides an ocis-web extension which allows users to change their settings values. For ease of use, this extension provides an ocis-web extension which allows users to change their settings values.
Please refer to the [ocis-web extension docs]({{< relref "../../ocis/development/extensions/#external-phoenix-apps" >}}) Please refer to the [ocis-web extension docs]({{< relref "../../ocis/development/extensions/#external-ownCloud-Web-apps" >}})
for running ocis-web extensions. for running ocis-web extensions.
{{< mermaid class="text-center">}} {{< mermaid class="text-center">}}
File renamed without changes.
+10
View File
@@ -0,0 +1,10 @@
---
title: "ownCloud Web"
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/web
geekdocFilePath: _index.md
---
This service embeds [ownCloud Web](https://github.com/owncloud/web) to provide a UI for ownCloud Infinite Scale.
@@ -2,7 +2,7 @@
title: "Releasing" title: "Releasing"
weight: 40 weight: 40
geekdocRepo: https://github.com/owncloud/ocis geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/ocis-phoenix geekdocEditPath: edit/master/docs/extensions/web
geekdocFilePath: releasing.md geekdocFilePath: releasing.md
--- ---
@@ -10,29 +10,29 @@ geekdocFilePath: releasing.md
## Releasing ## Releasing
The next generation Web Frontend is shipped as an oCIS Extension. The `ocis-phoenix` extension is also embedded in the single binary and part of the `ocis server` command. The next generation Web Frontend is shipped as an oCIS Extension. The `ocis-web` extension is also embedded in the single binary and part of the `ocis server` command.
To update this package within all the deliveries, we need to update the package in the following chain from the bottom to the top. To update this package within all the deliveries, we need to update the package in the following chain from the bottom to the top.
### Package Hierarchy ### Package Hierarchy
- [ocis](https://githug.com/owncloud/ocis) - [ocis](https://githug.com/owncloud/ocis)
- [ocis-phoenix](https://github.com/owncloud/ocis-phoenix) - [ocis-web](https://github.com/owncloud/ocis/tree/master/web)
- [ocis-pkg](https://github.com/owncloud/ocis-pkg) - [ocis-pkg](https://github.com/owncloud/ocis/tree/master/ocis-pkg)
- [phoenix](https://github.com/owncloud/phoenix) - [ownCloud Web](https://github.com/owncloud/web)
#### Prerequisites #### Prerequisites
Before updating the assets, make sure that [Phoenix](https://github.com/owncloud/phoenix) has been released first Before updating the assets, make sure that [ownCloud Web](https://github.com/owncloud/web) has been released first
and take note of its release tag name. and take note of its release tag name.
#### Updating ocis-phoenix #### Updating ocis-web
1. Create a branch `release-$version`. in <https://github.com/owncloud/ocis-phoenix> 1. Create a branch `release-$version`. in <https://github.com/owncloud/ocis>
2. Create a Folder in `changelog` for the release version and date `mkdir $major.$minor.$patchVersion_YYYY-MM-DD`. 2. Create a Folder in `changelog` for the release version and date `mkdir $major.$minor.$patchVersion_YYYY-MM-DD`.
3. Move all changelog items from the `changelog/unreleased/` folder to the `$major.$minor.$patchVersion_YYYY-MM-DD` folder. 3. Move all changelog items from the `changelog/unreleased/` folder to the `$major.$minor.$patchVersion_YYYY-MM-DD` folder.
4. Update the go module `ocis-pkg` to the latest version <https://blog.golang.org/using-go-modules> . 4. Update the go module `ocis-pkg` to the latest version <https://blog.golang.org/using-go-modules> .
5. Update the phoenix asset by adjusting the value of `PHOENIX_ASSETS_VERSION` at the top of the Makefile and specify the tag name of the latest [Phoenix release](https://github.com/owncloud/phoenix/tags). 5. Update the ownCloud Web asset by adjusting the value of `WEB_ASSETS_VERSION` at the top of the Makefile and specify the tag name of the latest [ownCloud Web release](https://github.com/owncloud/web/tags).
6. Run `make clean generate`. 6. Run `make clean generate`.
7. Create a changelog item for the update in the `changelog/$major.$minor.$patchVersion_YYYY-MM-DD` folder. 7. Create a changelog item for the update in the `changelog/$major.$minor.$patchVersion_YYYY-MM-DD` folder.
8. Commit your changes. 8. Commit your changes.
@@ -41,7 +41,3 @@ and take note of its release tag name.
11. Use `v$major.$minor.$patch` as a tag (the `v` prefix is important) and publish it. 11. Use `v$major.$minor.$patch` as a tag (the `v` prefix is important) and publish it.
12. The tag and the Release artifacts will be created automatically. 12. The tag and the Release artifacts will be created automatically.
#### Next steps
Next steps is usually updating the ocis-phoenix version in the [ocis](https://githug.com/owncloud/ocis) repository.
+1 -1
View File
@@ -24,7 +24,7 @@ We run a huge [test suite](https://github.com/owncloud/core/tree/master/tests),
{{< mermaid class="text-center">}} {{< mermaid class="text-center">}}
graph TD graph TD
proxy --> proxy -->
konnectd & ocis-phoenix & thumbnails & ocs & webdav & storage & accounts & store & settings konnectd & web & thumbnails & ocs & webdav & storage & accounts & store & settings
konnectd --> glauth konnectd --> glauth
+4 -4
View File
@@ -29,7 +29,7 @@ Let us assume `your-host` is your remote domain name or IP adress. Add your host
```yaml {linenos=table,hl_lines=["15-17",21]} ```yaml {linenos=table,hl_lines=["15-17",21]}
# OpenID Connect client registry. # OpenID Connect client registry.
clients: clients:
- id: phoenix - id: web
name: ownCloud web app name: ownCloud web app
application_type: web application_type: web
insecure: yes insecure: yes
@@ -60,9 +60,9 @@ You need to configure `your-host` in some services to provide the needed public
PROXY_HTTP_ADDR=0.0.0.0:9200 \ PROXY_HTTP_ADDR=0.0.0.0:9200 \
KONNECTD_ISS=https://your-server:9200 \ KONNECTD_ISS=https://your-server:9200 \
REVA_OIDC_ISSUER=https://your-server:9200 \ REVA_OIDC_ISSUER=https://your-server:9200 \
PHOENIX_OIDC_AUTHORITY=https://your-server:9200 \ WEB_OIDC_AUTHORITY=https://your-server:9200 \
PHOENIX_WEB_CONFIG_SERVER=https://your-server:9200 \ WEB_UI_CONFIG_SERVER=https://your-server:9200 \
PHOENIX_OIDC_METADATA_URL=https://your-server:9200/.well-known/openid-configuration \ WEB_OIDC_METADATA_URL=https://your-server:9200/.well-known/openid-configuration \
REVA_DATAGATEWAY_URL=https://your-server:9200/data \ REVA_DATAGATEWAY_URL=https://your-server:9200/data \
REVA_FRONTEND_URL=https://your-server:9200 \ REVA_FRONTEND_URL=https://your-server:9200 \
PROXY_TRANSPORT_TLS_KEY=./certs/your-host.key \ PROXY_TRANSPORT_TLS_KEY=./certs/your-host.key \
+11 -11
View File
@@ -103,26 +103,26 @@ $ ldapsearch -x -H ldap://localhost:9125 -b dc=example,dc=com -D "cn=admin,dc=ex
> Note: This is currently a readonly implementation and minimal to the usecase of authenticating users with konnectd. > Note: This is currently a readonly implementation and minimal to the usecase of authenticating users with konnectd.
### Start ocis-phoenix ### Start ocis-web
#### Get it! #### Get it!
In an `ocis` folder In an `ocis` folder
``` ```
$ git clone git@github.com:owncloud/ocis-phoenix.git $ git clone git@github.com:owncloud/ocis.git
$ cd ocis-phoenix $ cd web
$ make $ make
``` ```
This should give you a `bin/ocis-phoenix` binary. Try listing the help with `bin/ocis-phoenix --help`. This should give you a `bin/web` binary. Try listing the help with `bin/web --help`.
#### Run it! #### Run it!
Point `ocis-phoenix` to your owncloud domain and tell it where to find the openid connect issuing authority: Point `ocis-web` to your owncloud domain and tell it where to find the openid connect issuing authority:
```console ```console
$ bin/ocis-phoenix server --web-config-server https://cloud.example.com --oidc-authority https://192.168.1.100:9130 --oidc-metadata-url https://192.168.1.100:9130/.well-known/openid-configuration --oidc-client-id ocis $ bin/web server --web-config-server https://cloud.example.com --oidc-authority https://192.168.1.100:9130 --oidc-metadata-url https://192.168.1.100:9130/.well-known/openid-configuration --oidc-client-id ocis
``` ```
`ocis-phoenix` needs to know `ocis-web` needs to know
- `--web-config-server https://cloud.example.com` is ownCloud url with webdav and ocs endpoints (oc10 or ocis) - `--web-config-server https://cloud.example.com` is ownCloud url with webdav and ocs endpoints (oc10 or ocis)
- `--oidc-authority https://192.168.1.100:9130` the openid connect issuing authority, in our case `oidc-konnectd`, running on port 9130 - `--oidc-authority https://192.168.1.100:9130` the openid connect issuing authority, in our case `oidc-konnectd`, running on port 9130
- `--oidc-metadata-url https://192.168.1.100:9130/.well-known/openid-configuration` the openid connect configuration endpoint, typically the issuer host with `.well-known/openid-configuration`, but there are cases when another endpoint is used, eg. ping identity provides multiple endpoints to separate domains - `--oidc-metadata-url https://192.168.1.100:9130/.well-known/openid-configuration` the openid connect configuration endpoint, typically the issuer host with `.well-known/openid-configuration`, but there are cases when another endpoint is used, eg. ping identity provides multiple endpoints to separate domains
@@ -179,11 +179,11 @@ clients:
You will need the `insecure: yes` if you are using self signed certificates. You will need the `insecure: yes` if you are using self signed certificates.
Replace `cloud.example.com` in the redirect URI with your ownCloud 10 host and port. Replace `cloud.example.com` in the redirect URI with your ownCloud 10 host and port.
Replace `localhost:9100` in the redirect URIs with your the `ocis-phoenix` host and port. Replace `localhost:9100` in the redirect URIs with your `ocis-web` host and port.
#### Run it! #### Run it!
You can now bring up `ocis-connectd` with: You can now bring up `ocis-konnectd` with:
```console ```console
$ bin/ocis-konnectd server --iss https://192.168.1.100:9130 --identifier-registration-conf assets/identifier-registration.yaml --signing-kid gen1-2020-02-27 $ bin/ocis-konnectd server --iss https://192.168.1.100:9130 --identifier-registration-conf assets/identifier-registration.yaml --signing-kid gen1-2020-02-27
``` ```
@@ -243,7 +243,7 @@ $CONFIG = [
In the above configuration replace In the above configuration replace
- `provider-url` with the URL to your `ocis-konnectd` issuer - `provider-url` with the URL to your `ocis-konnectd` issuer
- `https://cloud.example.com` with the URL to your ownCloud 10 instance - `https://cloud.example.com` with the URL to your ownCloud 10 instance
- `http://localhost:9100` with the URL to your phoenix instance - `http://localhost:9100` with the URL to your ownCloud Web instance
> Note: By default the openidconnect app will use the email of the user to match the user from the oidc userinfo endpoint with the ownCloud account. So make sure your users have a unique primary email. > Note: By default the openidconnect app will use the email of the user to match the user from the oidc userinfo endpoint with the ownCloud account. So make sure your users have a unique primary email.
@@ -251,4 +251,4 @@ In the above configuration replace
Aside from the above todos these are the next stepo Aside from the above todos these are the next stepo
- tie it all together behind `ocis-proxy` - tie it all together behind `ocis-proxy`
- create an `ocis bridge` command that runs all the ocis services in one step with a properly preconfigured `ocis-konnectd` `identifier-registration.yaml` file for `phoenix` and the owncloud 10 `openidconnect` app, as well as a randomized `--signing-kid`. - create an `ocis bridge` command that runs all the ocis services in one step with a properly preconfigured `ocis-konnectd` `identifier-registration.yaml` file for `ownCloud Web` and the owncloud 10 `openidconnect` app, as well as a randomized `--signing-kid`.
+3 -3
View File
@@ -66,7 +66,7 @@ See also [example server setup]({{< ref "preparing_server.md" >}})
OCIS_DOCKER_TAG= OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test" # Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN= OCIS_DOMAIN=
# ownCloud Web openid connect client id. Defaults to "ocis-phoenix" # ownCloud Web openid connect client id. Defaults to "ocis-web"
OCIS_OIDC_CLIENT_ID= OCIS_OIDC_CLIENT_ID=
### Keycloak ### ### Keycloak ###
@@ -107,7 +107,7 @@ See also [example server setup]({{< ref "preparing_server.md" >}})
`docker-compose up -d` `docker-compose up -d`
* Visit the Keycloak administration console on your configured domain. Go to clients settings and add a client. The client id is `ocis-phoenix` or the one you changed it to. The client protocol is openid-connect. The root url for the client is the url you selected for oCIS. Then save the client. * Visit the Keycloak administration console on your configured domain. Go to clients settings and add a client. The client id is `ocis-web` or the one you changed it to. The client protocol is openid-connect. The root url for the client is the url you selected for oCIS. Then save the client.
* You may also add users to Keycloak * You may also add users to Keycloak
@@ -130,7 +130,7 @@ After that you're ready to start the application stack:
`docker-compose up -d` `docker-compose up -d`
Open https://keycloak.owncloud.test in your browser and accept the invalid certificate warning. Open https://keycloak.owncloud.test in your browser and accept the invalid certificate warning.
Go to clients settings and add a client. The client id is `ocis-phoenix` or the one you changed it to. The client protocol is openid-connect. THe root url for the client is `https://ocis.owncloud.test`. Then save the client. Go to clients settings and add a client. The client id is `ocis-web` or the one you changed it to. The client protocol is openid-connect. THe root url for the client is `https://ocis.owncloud.test`. Then save the client.
* You may also add users to Keycloak * You may also add users to Keycloak
+5 -5
View File
@@ -13,7 +13,7 @@ geekdocFilePath: debugging.md
As a single binary for easy deployment running `ocis server` just forks itself to start all the services, which makes debugging those processes a little harder. As a single binary for easy deployment running `ocis server` just forks itself to start all the services, which makes debugging those processes a little harder.
Ultimately, we want to be able to stop a single service using eg. `ocis kill phoenix` so that you can start the service you want to debug in debug mode. We need to [change the way we fork processes](https://github.com/owncloud/ocis/issues/77) though, otherwise the runtime will automatically restart a service if killed. Ultimately, we want to be able to stop a single service using eg. `ocis kill web` so that you can start the service you want to debug in debug mode. We need to [change the way we fork processes](https://github.com/owncloud/ocis/issues/77) though, otherwise the runtime will automatically restart a service if killed.
### Start ocis ### Start ocis
@@ -46,7 +46,7 @@ Run the debug binary with `OCIS_LOG_LEVEL=debug bin/ocis-debug server` and then
12981 pts/1 Sl 0:00 bin/ocis-debug web 12981 pts/1 Sl 0:00 bin/ocis-debug web
12993 pts/1 Sl 0:00 bin/ocis-debug api 12993 pts/1 Sl 0:00 bin/ocis-debug api
12998 pts/1 Sl 0:00 bin/ocis-debug registry 12998 pts/1 Sl 0:00 bin/ocis-debug registry
13004 pts/1 Sl 0:00 bin/ocis-debug phoenix 13004 pts/1 Sl 0:00 bin/ocis-debug web
13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic 13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic
``` ```
@@ -83,7 +83,7 @@ bin/ocis --log-level=$LOG_LEVEL graph &
#bin/ocis --log-level=$LOG_LEVEL hello & #bin/ocis --log-level=$LOG_LEVEL hello &
bin/ocis --log-level=$LOG_LEVEL konnectd & bin/ocis --log-level=$LOG_LEVEL konnectd &
#bin/ocis --log-level=$LOG_LEVEL ocs & #bin/ocis --log-level=$LOG_LEVEL ocs &
bin/ocis --log-level=$LOG_LEVEL phoenix & bin/ocis --log-level=$LOG_LEVEL web &
bin/ocis --log-level=$LOG_LEVEL reva-auth-basic & bin/ocis --log-level=$LOG_LEVEL reva-auth-basic &
bin/ocis --log-level=$LOG_LEVEL reva-auth-bearer & bin/ocis --log-level=$LOG_LEVEL reva-auth-bearer &
bin/ocis --log-level=$LOG_LEVEL reva-frontend & bin/ocis --log-level=$LOG_LEVEL reva-frontend &
@@ -125,7 +125,7 @@ bin/ocis --log-level=$LOG_LEVEL proxy &
12981 pts/1 Sl 0:00 bin/ocis-debug web 12981 pts/1 Sl 0:00 bin/ocis-debug web
12993 pts/1 Sl 0:00 bin/ocis-debug api 12993 pts/1 Sl 0:00 bin/ocis-debug api
12998 pts/1 Sl 0:00 bin/ocis-debug registry 12998 pts/1 Sl 0:00 bin/ocis-debug registry
13004 pts/1 Sl 0:00 bin/ocis-debug phoenix 13004 pts/1 Sl 0:00 bin/ocis-debug web
13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic 13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic
``` ```
@@ -144,7 +144,7 @@ We recommend you collect all related information in a single file or in a github
> Error while sharing. > Error while sharing.
> error sending a grpc stat request > error sending a grpc stat request
This popped up when I tried to add `marie` as a collaborator in phoenix. That triggers a request to the server which I copied as curl. We can strip a lot of headers and the gist of it is: This popped up when I tried to add `marie` as a collaborator in ownCloud Web. That triggers a request to the server which I copied as curl. We can strip a lot of headers and the gist of it is:
```console ```console
# curl 'https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares' -d 'shareType=0&shareWith=marie&path=%2FNeuer+Ordner&permissions=1' -u einstein:relativity -k -v | xmllint -format - # curl 'https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares' -d 'shareType=0&shareWith=marie&path=%2FNeuer+Ordner&permissions=1' -u einstein:relativity -k -v | xmllint -format -
+19 -19
View File
@@ -26,8 +26,8 @@ cd ocis
TAGS=simple make generate build TAGS=simple make generate build
``` ```
*Q: Can you specify which version of phoenix to use?* *Q: Can you specify which version of ownCloud Web to use?*
*A: No, the phoenix that is used is compiled into the [assets of ocis-phoenix](https://github.com/owncloud/ocis-phoenix/blob/master/pkg/assets/embed.go) which is currently not automatically updated. We'll see how to use a custom phoenix later.* *A: No, the ownCloud Web that is used is compiled into the [assets of ocis-web](https://github.com/owncloud/ocis/blob/master/web/pkg/assets/embed.go) which is currently not automatically updated. We'll see how to use a custom ownCloud Web later.*
`bin/ocis server` `bin/ocis server`
@@ -84,7 +84,7 @@ In order to be able to manage the processes ourselves we need to start them inde
``` ```
bin/ocis micro & bin/ocis micro &
bin/ocis phoenix & bin/ocis web &
bin/ocis hello & bin/ocis hello &
bin/ocis reva & bin/ocis reva &
``` ```
@@ -96,13 +96,13 @@ cd ../ocis-hello
bin/ocis-hello server bin/ocis-hello server
``` ```
## Hacking phoenix (and ocis-phoenix) ## Hacking ownCloud Web (and ocis-web)
Following https://github.com/owncloud/phoenix we are going to build the current phoenix Following https://github.com/owncloud/web we are going to build the current ownCloud Web
``` ```
git clone https://github.com/owncloud/phoenix.git git clone https://github.com/owncloud/web.git
cd phoenix cd web
yarn install yarn install
yarn dist yarn dist
@@ -110,25 +110,25 @@ yarn dist
We can tell ocis to use the compiled assets: We can tell ocis to use the compiled assets:
Kill `ocis phoenix`, then use the compiled assets when starting phoenix. Kill `ocis web`, then use the compiled assets when starting ownCloud Web.
```console ```console
cd ../ocis cd ../ocis
PHOENIX_ASSET_PATH="`pwd`/../phoenix/dist" bin/ocis phoenix WEB_ASSET_PATH="`pwd`/../web/dist" bin/ocis web
``` ```
## The ownCloud design system ## The ownCloud design system
The [ownCloud design system](https://owncloud.design/) contains a set of ownCloud vue components for phoenix or your own ocis extensions. Please use it for a consistent look and feel. The [ownCloud design system](https://owncloud.design/) contains a set of ownCloud vue components for ownCloud Web or your own ocis extensions. Please use it for a consistent look and feel.
## External phoenix apps ## External ownCloud Web apps
This is what hello is: copy and extend! This is what hello is: copy and extend!
1. Phoenix is configured using the config.json which is served by the phoenix service (either `bin/ocis phoenix` or `bin/ocis-phoenix server`) 1. ownCloud Web is configured using the config.json which is served by the ocis-web service (either `bin/ocis web` or `bin/web server`)
2. point ocis phoenix to the web config which you extended with an external app: 2. point ocis-web to the web config which you extended with an external app:
`PHOENIX_WEB_CONFIG="`pwd`/../phoenix/config.json" PHOENIX_ASSET_PATH="`pwd`/../phoenix/dist" bin/ocis phoenix` `WEB_UI_CONFIG="`pwd`/../web/config.json" ASSET_PATH="`pwd`/../web/dist" bin/ocis web`
```json ```json
{ {
@@ -138,7 +138,7 @@ This is what hello is: copy and extend!
"openIdConnect": { "openIdConnect": {
"metadata_url": "http://localhost:9140/.well-known/openid-configuration", "metadata_url": "http://localhost:9140/.well-known/openid-configuration",
"authority": "http://localhost:9140", "authority": "http://localhost:9140",
"client_id": "phoenix", "client_id": "web",
"response_type": "code", "response_type": "code",
"scope": "openid profile email" "scope": "openid profile email"
}, },
@@ -163,15 +163,15 @@ This is what hello is: copy and extend!
} }
``` ```
## Phoenix extension points ## ownCloud Web extension points
{{< hint info >}} {{< hint info >}}
For an up to date list check out [the phoenix documentation](https://github.com/owncloud/phoenix/issues/2423). For an up to date list check out [the ownCloud Web documentation](https://github.com/owncloud/web/issues/2423).
{{< /hint >}} {{< /hint >}}
Several ones available: Several ones available:
### Phoenix core ### ownCloud Web
- App switcher (defined in config.json) - App switcher (defined in config.json)
- App container (loads UI of your extension) - App container (loads UI of your extension)
@@ -226,7 +226,7 @@ Long answer: micro and ocis-hello follow a protocol driven development:
- ocis uses go-micro, which provides http and grpc gateways - ocis uses go-micro, which provides http and grpc gateways
- the gateways and protocols are optional - the gateways and protocols are optional
- owncloud and kopano are looking into a [MS graph](https://developer.microsoft.com/de-de/graph) like api to handle phoenix requests. - owncloud and kopano are looking into a [MS graph](https://developer.microsoft.com/de-de/graph) like api to handle ownCloud Web requests.
- they might be about user, contacrs, calendars ... which is covered by the graph api - they might be about user, contacrs, calendars ... which is covered by the graph api
- we want to integrate with eg. kopano and provide a commen api (file sync and share is covered as well) - we want to integrate with eg. kopano and provide a commen api (file sync and share is covered as well)
+2 -2
View File
@@ -78,12 +78,12 @@ ocis list
To stop a particular extension: To stop a particular extension:
{{< highlight txt >}} {{< highlight txt >}}
ocis server kill phoenix ocis server kill web
{{< / highlight >}} {{< / highlight >}}
To start a particular extension: To start a particular extension:
{{< highlight txt >}} {{< highlight txt >}}
ocis server run phoenix ocis server run web
{{< / highlight >}} {{< / highlight >}}
The version command prints the version of your installed oCIS. The version command prints the version of your installed oCIS.
-22
View File
@@ -1,22 +0,0 @@
image: owncloud/ocis-phoenix:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: owncloud/ocis-phoenix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
- image: owncloud/ocis-phoenix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
variant: v8
os: linux
- image: owncloud/ocis-phoenix:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
variant: v6
os: linux
File diff suppressed because it is too large. Load diff
-2
View File
@@ -1,2 +0,0 @@
# backend
-r '^(cmd|pkg)/.*\.go$' -R '^node_modules/' -s -- sh -c 'make bin/ocis-phoenix-debug && bin/ocis-phoenix-debug --log-level debug server --debug-pprof --debug-zpages --asset-path assets/'
+3 -3
View File
@@ -33,9 +33,9 @@ services:
OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost} OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost}
PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200 KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200
PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200 WEB_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200
PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration WEB_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration
PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200 WEB_UI_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200
STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
STORAGE_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200
# make home and users storages use eos # make home and users storages use eos
+4 -4
View File
@@ -24,7 +24,7 @@ services:
- ../accounts:/accounts - ../accounts:/accounts
- ../glauth:/glauth - ../glauth:/glauth
- ../konnectd:/konnectd - ../konnectd:/konnectd
- ../ocis-phoenix:/ocis-phoenix - ../web:/web
- ../ocis-pkg:/ocis-pkg - ../ocis-pkg:/ocis-pkg
- ../ocs:/ocs - ../ocs:/ocs
- ../proxy:/proxy - ../proxy:/proxy
@@ -41,9 +41,9 @@ services:
OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost} OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost}
PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200 KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200
PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200 WEB_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200
PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration WEB_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration
PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200 WEB_UI_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200
STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200
STORAGE_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200
# TODO make id the default in ocis-storage # TODO make id the default in ocis-storage
+2 -2
View File
@@ -21,7 +21,7 @@ require (
github.com/owncloud/ocis/accounts v0.5.3-0.20201103104733-ff2c41028d9b github.com/owncloud/ocis/accounts v0.5.3-0.20201103104733-ff2c41028d9b
github.com/owncloud/ocis/glauth v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/glauth v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/konnectd v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/konnectd v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/ocis-phoenix v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/web v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/ocis-pkg v0.1.0 github.com/owncloud/ocis/ocis-pkg v0.1.0
github.com/owncloud/ocis/ocs v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/ocs v0.0.0-00010101000000-000000000000
github.com/owncloud/ocis/onlyoffice v0.0.0-00010101000000-000000000000 github.com/owncloud/ocis/onlyoffice v0.0.0-00010101000000-000000000000
@@ -42,7 +42,7 @@ replace (
github.com/owncloud/ocis/accounts => ../accounts github.com/owncloud/ocis/accounts => ../accounts
github.com/owncloud/ocis/glauth => ../glauth github.com/owncloud/ocis/glauth => ../glauth
github.com/owncloud/ocis/konnectd => ../konnectd github.com/owncloud/ocis/konnectd => ../konnectd
github.com/owncloud/ocis/ocis-phoenix => ../ocis-phoenix github.com/owncloud/ocis/web => ../web
github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg github.com/owncloud/ocis/ocis-pkg => ../ocis-pkg
github.com/owncloud/ocis/ocs => ../ocs github.com/owncloud/ocis/ocs => ../ocs
github.com/owncloud/ocis/onlyoffice => ../onlyoffice github.com/owncloud/ocis/onlyoffice => ../onlyoffice
-57
View File
@@ -1,57 +0,0 @@
package command
import (
"strings"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-phoenix/pkg/command"
"github.com/owncloud/ocis/ocis-phoenix/pkg/flagset"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
)
// PhoenixCommand is the entrypoint for the phoenix command.
func PhoenixCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "phoenix",
Usage: "Start phoenix server",
Category: "Extensions",
Flags: flagset.ServerWithConfig(cfg.Phoenix),
Before: func(c *cli.Context) error {
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
cfg.Phoenix.Phoenix.Config.Apps = c.StringSlice("web-config-app")
return nil
},
Action: func(c *cli.Context) error {
phoenixCommand := command.Server(configurePhoenix(cfg).Phoenix)
if err := phoenixCommand.Before(c); err != nil {
return err
}
return cli.HandleAction(phoenixCommand.Action, c)
},
}
}
func configurePhoenix(cfg *config.Config) *config.Config {
cfg.Phoenix.Log.Level = cfg.Log.Level
cfg.Phoenix.Log.Pretty = cfg.Log.Pretty
cfg.Phoenix.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Phoenix.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Phoenix.Tracing.Type = cfg.Tracing.Type
cfg.Phoenix.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Phoenix.Tracing.Collector = cfg.Tracing.Collector
}
return cfg
}
func init() {
register.AddCommand(PhoenixCommand)
}
+57
View File
@@ -0,0 +1,57 @@
package command
import (
"strings"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis/pkg/config"
"github.com/owncloud/ocis/ocis/pkg/register"
"github.com/owncloud/ocis/web/pkg/command"
"github.com/owncloud/ocis/web/pkg/flagset"
)
// WebCommand is the entrypoint for the web command.
func WebCommand(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "web",
Usage: "Start web server",
Category: "Extensions",
Flags: flagset.ServerWithConfig(cfg.Web),
Before: func(c *cli.Context) error {
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
cfg.Web.Web.Config.Apps = c.StringSlice("web-config-app")
return nil
},
Action: func(c *cli.Context) error {
webCommand := command.Server(configureWeb(cfg).Web)
if err := webCommand.Before(c); err != nil {
return err
}
return cli.HandleAction(webCommand.Action, c)
},
}
}
func configureWeb(cfg *config.Config) *config.Config {
cfg.Web.Log.Level = cfg.Log.Level
cfg.Web.Log.Pretty = cfg.Log.Pretty
cfg.Web.Log.Color = cfg.Log.Color
if cfg.Tracing.Enabled {
cfg.Web.Tracing.Enabled = cfg.Tracing.Enabled
cfg.Web.Tracing.Type = cfg.Tracing.Type
cfg.Web.Tracing.Endpoint = cfg.Tracing.Endpoint
cfg.Web.Tracing.Collector = cfg.Tracing.Collector
}
return cfg
}
func init() {
register.AddCommand(WebCommand)
}
+3 -3
View File
@@ -7,7 +7,6 @@ import (
accounts "github.com/owncloud/ocis/accounts/pkg/config" accounts "github.com/owncloud/ocis/accounts/pkg/config"
glauth "github.com/owncloud/ocis/glauth/pkg/config" glauth "github.com/owncloud/ocis/glauth/pkg/config"
konnectd "github.com/owncloud/ocis/konnectd/pkg/config" konnectd "github.com/owncloud/ocis/konnectd/pkg/config"
phoenix "github.com/owncloud/ocis/ocis-phoenix/pkg/config"
ocs "github.com/owncloud/ocis/ocs/pkg/config" ocs "github.com/owncloud/ocis/ocs/pkg/config"
onlyoffice "github.com/owncloud/ocis/onlyoffice/pkg/config" onlyoffice "github.com/owncloud/ocis/onlyoffice/pkg/config"
proxy "github.com/owncloud/ocis/proxy/pkg/config" proxy "github.com/owncloud/ocis/proxy/pkg/config"
@@ -15,6 +14,7 @@ import (
storage "github.com/owncloud/ocis/storage/pkg/config" storage "github.com/owncloud/ocis/storage/pkg/config"
store "github.com/owncloud/ocis/store/pkg/config" store "github.com/owncloud/ocis/store/pkg/config"
thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config" thumbnails "github.com/owncloud/ocis/thumbnails/pkg/config"
web "github.com/owncloud/ocis/web/pkg/config"
webdav "github.com/owncloud/ocis/webdav/pkg/config" webdav "github.com/owncloud/ocis/webdav/pkg/config"
pman "github.com/refs/pman/pkg/config" pman "github.com/refs/pman/pkg/config"
) )
@@ -78,7 +78,7 @@ type Config struct {
Konnectd *konnectd.Config Konnectd *konnectd.Config
OCS *ocs.Config OCS *ocs.Config
Onlyoffice *onlyoffice.Config Onlyoffice *onlyoffice.Config
Phoenix *phoenix.Config Web *web.Config
Proxy *proxy.Config Proxy *proxy.Config
Settings *settings.Config Settings *settings.Config
Storage *storage.Config Storage *storage.Config
@@ -99,7 +99,7 @@ func New() *Config {
Konnectd: konnectd.New(), Konnectd: konnectd.New(),
OCS: ocs.New(), OCS: ocs.New(),
Onlyoffice: onlyoffice.New(), Onlyoffice: onlyoffice.New(),
Phoenix: phoenix.New(), Web: web.New(),
Proxy: proxy.New(), Proxy: proxy.New(),
Settings: settings.New(), Settings: settings.New(),
Storage: storage.New(), Storage: storage.New(),
+1 -1
View File
@@ -37,7 +37,6 @@ var (
"konnectd", "konnectd",
"ocs", "ocs",
"onlyoffice", "onlyoffice",
"phoenix",
"proxy", "proxy",
"settings", "settings",
"store", "store",
@@ -51,6 +50,7 @@ var (
"storage-metadata", "storage-metadata",
"storage-public-link", "storage-public-link",
"thumbnails", "thumbnails",
"web",
"webdav", "webdav",
//"graph", //"graph",
//"graph-explorer", //"graph-explorer",
+2 -2
View File
@@ -1,9 +1,9 @@
const path = require('path') const path = require('path')
const PHOENIX_PATH = process.env.PHOENIX_PATH const WEB_PATH = process.env.WEB_PATH
const TEST_INFRA_DIRECTORY = process.env.TEST_INFRA_DIRECTORY const TEST_INFRA_DIRECTORY = process.env.TEST_INFRA_DIRECTORY
const OCIS_SETTINGS_STORE = process.env.OCIS_SETTINGS_STORE || './ocis-settings-store' const OCIS_SETTINGS_STORE = process.env.OCIS_SETTINGS_STORE || './ocis-settings-store'
const config = require(path.join(PHOENIX_PATH, 'nightwatch.conf.js')) const config = require(path.join(WEB_PATH, 'nightwatch.conf.js'))
config.page_objects_path = [TEST_INFRA_DIRECTORY + '/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects'] config.page_objects_path = [TEST_INFRA_DIRECTORY + '/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects']
config.custom_commands_path = TEST_INFRA_DIRECTORY + '/acceptance/customCommands' config.custom_commands_path = TEST_INFRA_DIRECTORY + '/acceptance/customCommands'
@@ -2,7 +2,7 @@
# OpenID Connect client registry. # OpenID Connect client registry.
clients: clients:
- id: phoenix - id: web
name: OCIS name: OCIS
application_type: web application_type: web
insecure: yes insecure: yes
@@ -5,7 +5,7 @@
"openIdConnect": { "openIdConnect": {
"metadata_url": "https://ocis-server:9200/.well-known/openid-configuration", "metadata_url": "https://ocis-server:9200/.well-known/openid-configuration",
"authority": "https://ocis-server:9200", "authority": "https://ocis-server:9200",
"client_id": "phoenix", "client_id": "web",
"response_type": "code", "response_type": "code",
"scope": "openid profile email" "scope": "openid profile email"
}, },
+5 -5
View File
@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
if [ -z "$PHOENIX_PATH" ] if [ -z "$WEB_PATH" ]
then then
echo "PHOENIX_PATH env variable is not set, cannot find files for tests infrastructure" echo "WEB_PATH env variable is not set, cannot find files for tests infrastructure"
exit 1 exit 1
fi fi
@@ -12,9 +12,9 @@ then
exit 1 exit 1
fi fi
if [ -z "$PHOENIX_CONFIG" ] if [ -z "$WEB_UI_CONFIG" ]
then then
echo "PHOENIX_CONFIG env variable is not set, cannot find phoenix config file" echo "WEB_UI_CONFIG env variable is not set, cannot find ownCloud Web config file"
exit 1 exit 1
fi fi
@@ -46,7 +46,7 @@ clean_up() {
trap clean_up SIGHUP SIGINT SIGTERM EXIT trap clean_up SIGHUP SIGINT SIGTERM EXIT
cp -r "$PHOENIX_PATH/tests" "./$testFolder" cp -r "$WEB_PATH/tests" "./$testFolder"
export NODE_TLS_REJECT_UNAUTHORIZED='0' export NODE_TLS_REJECT_UNAUTHORIZED='0'
export SERVER_HOST=${SERVER_HOST:-https://localhost:9200} export SERVER_HOST=${SERVER_HOST:-https://localhost:9200}
@@ -2,7 +2,7 @@
# OpenID Connect client registry. # OpenID Connect client registry.
clients: clients:
- id: phoenix - id: web
name: OCIS name: OCIS
application_type: web application_type: web
insecure: yes insecure: yes
+1 -1
View File
@@ -5,7 +5,7 @@
"openIdConnect": { "openIdConnect": {
"metadata_url": "https://ocis-server:9200/.well-known/openid-configuration", "metadata_url": "https://ocis-server:9200/.well-known/openid-configuration",
"authority": "https://ocis-server:9200", "authority": "https://ocis-server:9200",
"client_id": "phoenix", "client_id": "web",
"response_type": "code", "response_type": "code",
"scope": "openid profile email" "scope": "openid profile email"
}, },
+3 -3
View File
@@ -81,7 +81,7 @@ class OIDCProvider implements types.AuthProvider {
params: [this.account.login, this.account.password, '1'], params: [this.account.login, this.account.password, '1'],
hello: { hello: {
scope: 'openid profile email', scope: 'openid profile email',
client_id: 'phoenix', client_id: 'web',
redirect_uri: this.redirectUri, redirect_uri: this.redirectUri,
flow: 'oidc', flow: 'oidc',
}, },
@@ -106,7 +106,7 @@ class OIDCProvider implements types.AuthProvider {
private getCode(continueURI: string): string { private getCode(continueURI: string): string {
const authorizeUri = `${continueURI}?${queryString.stringify({ const authorizeUri = `${continueURI}?${queryString.stringify({
client_id: 'phoenix', client_id: 'web',
prompt: 'none', prompt: 'none',
redirect_uri: this.redirectUri, redirect_uri: this.redirectUri,
response_mode: 'query', response_mode: 'query',
@@ -128,7 +128,7 @@ class OIDCProvider implements types.AuthProvider {
private getToken(code: string): types.Token { private getToken(code: string): types.Token {
const tokenResponse = http.post(this.tokenUrl, { const tokenResponse = http.post(this.tokenUrl, {
client_id: 'phoenix', client_id: 'web',
code, code,
redirect_uri: this.redirectUri, redirect_uri: this.redirectUri,
grant_type: 'authorization_code', grant_type: 'authorization_code',
File renamed without changes.
File renamed without changes.
+3 -3
View File
@@ -1,9 +1,9 @@
SHELL := bash SHELL := bash
NAME := ocis-phoenix NAME := web
IMPORT := github.com/owncloud/ocis/$(NAME) IMPORT := github.com/owncloud/ocis/$(NAME)
BIN := bin BIN := bin
DIST := dist DIST := dist
PHOENIX_ASSETS_VERSION = v0.29.0 WEB_ASSETS_VERSION = v1.0.0-beta1
ifeq ($(OS), Windows_NT) ifeq ($(OS), Windows_NT)
EXECUTABLE := $(NAME).exe EXECUTABLE := $(NAME).exe
@@ -180,4 +180,4 @@ watch:
.PHONY: pull-assets .PHONY: pull-assets
pull-assets: pull-assets:
rm -Rf assets && mkdir assets/ && curl -slL -o- https://github.com/owncloud/phoenix/releases/download/$(PHOENIX_ASSETS_VERSION)/phoenix.tar.gz | tar xvzf - -C assets/ rm -Rf assets && mkdir assets/ && curl -slL -o- https://github.com/owncloud/web/releases/download/$(WEB_ASSETS_VERSION)/web.tar.gz | tar xvzf - -C assets/
@@ -3,7 +3,7 @@ package main
import ( import (
"os" "os"
"github.com/owncloud/ocis/ocis-phoenix/pkg/command" "github.com/owncloud/ocis/web/pkg/command"
) )
func main() { func main() {
@@ -13,7 +13,7 @@
"type": "jaeger", "type": "jaeger",
"endpoint": "localhost:6831", "endpoint": "localhost:6831",
"collector": "http://localhost:14268/api/traces", "collector": "http://localhost:14268/api/traces",
"service": "phoenix" "service": "web"
}, },
"asset": { "asset": {
"path": "" "path": ""
@@ -13,7 +13,7 @@ tracing:
type: jaeger type: jaeger
endpoint: localhost:6831 endpoint: localhost:6831
collector: http://localhost:14268/api/traces collector: http://localhost:14268/api/traces
service: phoenix service: web
asset: asset:
path: path:
@@ -7,13 +7,13 @@ RUN apk update && \
echo 'hosts: files dns' >| /etc/nsswitch.conf echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \ LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="oCIS Phoenix" \ org.label-schema.name="oCIS Web" \
org.label-schema.vendor="ownCloud GmbH" \ org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
EXPOSE 9100 9104 EXPOSE 9100 9104
ENTRYPOINT ["/usr/bin/ocis-phoenix"] ENTRYPOINT ["/usr/bin/web"]
CMD ["server"] CMD ["server"]
COPY bin/ocis-phoenix /usr/bin/ocis-phoenix COPY bin/web /usr/bin/web
@@ -7,13 +7,13 @@ RUN apk update && \
echo 'hosts: files dns' >| /etc/nsswitch.conf echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \ LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="oCIS Phoenix" \ org.label-schema.name="oCIS Web" \
org.label-schema.vendor="ownCloud GmbH" \ org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
EXPOSE 9100 9104 EXPOSE 9100 9104
ENTRYPOINT ["/usr/bin/ocis-phoenix"] ENTRYPOINT ["/usr/bin/web"]
CMD ["server"] CMD ["server"]
COPY bin/ocis-phoenix /usr/bin/ocis-phoenix COPY bin/web /usr/bin/web
@@ -7,13 +7,13 @@ RUN apk update && \
echo 'hosts: files dns' >| /etc/nsswitch.conf echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \ LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="oCIS Phoenix" \ org.label-schema.name="oCIS Web" \
org.label-schema.vendor="ownCloud GmbH" \ org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0" org.label-schema.schema-version="1.0"
EXPOSE 9100 9104 EXPOSE 9100 9104
ENTRYPOINT ["/usr/bin/ocis-phoenix"] ENTRYPOINT ["/usr/bin/web"]
CMD ["server"] CMD ["server"]
COPY bin/ocis-phoenix /usr/bin/ocis-phoenix COPY bin/web /usr/bin/web
+22
View File
@@ -0,0 +1,22 @@
image: owncloud/ocis-web:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: owncloud/ocis-web:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
- image: owncloud/ocis-web:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
variant: v8
os: linux
- image: owncloud/ocis-web:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
variant: v6
os: linux
+1 -1
View File
@@ -1,4 +1,4 @@
module github.com/owncloud/ocis/ocis-phoenix module github.com/owncloud/ocis/web
go 1.13 go 1.13
View File
File renamed without changes.
@@ -5,8 +5,8 @@ import (
"os" "os"
"path" "path"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/config"
) )
//go:generate go run github.com/UnnoTed/fileb0x embed.yml //go:generate go run github.com/UnnoTed/fileb0x embed.yml
File renamed without changes.
File diff suppressed because it is too large. Load diff
File renamed without changes.
@@ -1,8 +1,8 @@
package assets package assets
import ( import (
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/config"
) )
// Option defines a single option function. // Option defines a single option function.
@@ -5,8 +5,8 @@ import (
"net/http" "net/http"
"github.com/micro/cli/v2" "github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config" "github.com/owncloud/ocis/web/pkg/config"
"github.com/owncloud/ocis/ocis-phoenix/pkg/flagset" "github.com/owncloud/ocis/web/pkg/flagset"
) )
// Health is the entrypoint for the health command. // Health is the entrypoint for the health command.
@@ -5,21 +5,21 @@ import (
"strings" "strings"
"github.com/micro/cli/v2" "github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-phoenix/pkg/flagset"
"github.com/owncloud/ocis/ocis-phoenix/pkg/version"
"github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/config"
"github.com/owncloud/ocis/web/pkg/flagset"
"github.com/owncloud/ocis/web/pkg/version"
"github.com/spf13/viper" "github.com/spf13/viper"
) )
// Execute is the entry point for the ocis-phoenix command. // Execute is the entry point for the web command.
func Execute() error { func Execute() error {
cfg := config.New() cfg := config.New()
app := &cli.App{ app := &cli.App{
Name: "ocis-phoenix", Name: "web",
Version: version.String, Version: version.String,
Usage: "Serve Phoenix for oCIS", Usage: "Serve ownCloud Web for oCIS",
Compiled: version.Compiled(), Compiled: version.Compiled(),
Authors: []*cli.Author{ Authors: []*cli.Author{
@@ -53,7 +53,7 @@ func Execute() error {
// NewLogger initializes a service-specific logger instance. // NewLogger initializes a service-specific logger instance.
func NewLogger(cfg *config.Config) log.Logger { func NewLogger(cfg *config.Config) log.Logger {
return log.NewLogger( return log.NewLogger(
log.Name("phoenix"), log.Name("web"),
log.Level(cfg.Log.Level), log.Level(cfg.Log.Level),
log.Pretty(cfg.Log.Pretty), log.Pretty(cfg.Log.Pretty),
log.Color(cfg.Log.Color), log.Color(cfg.Log.Color),
@@ -65,13 +65,13 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error {
logger := NewLogger(cfg) logger := NewLogger(cfg)
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvPrefix("PHOENIX") viper.SetEnvPrefix("WEB")
viper.AutomaticEnv() viper.AutomaticEnv()
if c.IsSet("config-file") { if c.IsSet("config-file") {
viper.SetConfigFile(c.String("config-file")) viper.SetConfigFile(c.String("config-file"))
} else { } else {
viper.SetConfigName("phoenix") viper.SetConfigName("web")
viper.AddConfigPath("/etc/ocis") viper.AddConfigPath("/etc/ocis")
viper.AddConfigPath("$HOME/.ocis") viper.AddConfigPath("$HOME/.ocis")
@@ -16,11 +16,11 @@ import (
"github.com/oklog/run" "github.com/oklog/run"
openzipkin "github.com/openzipkin/zipkin-go" openzipkin "github.com/openzipkin/zipkin-go"
zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config" "github.com/owncloud/ocis/web/pkg/config"
"github.com/owncloud/ocis/ocis-phoenix/pkg/flagset" "github.com/owncloud/ocis/web/pkg/flagset"
"github.com/owncloud/ocis/ocis-phoenix/pkg/metrics" "github.com/owncloud/ocis/web/pkg/metrics"
"github.com/owncloud/ocis/ocis-phoenix/pkg/server/debug" "github.com/owncloud/ocis/web/pkg/server/debug"
"github.com/owncloud/ocis/ocis-phoenix/pkg/server/http" "github.com/owncloud/ocis/web/pkg/server/http"
"go.opencensus.io/stats/view" "go.opencensus.io/stats/view"
"go.opencensus.io/trace" "go.opencensus.io/trace"
) )
@@ -36,7 +36,7 @@ func Server(cfg *config.Config) *cli.Command {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/") cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
} }
cfg.Phoenix.Config.Apps = c.StringSlice("web-config-app") cfg.Web.Config.Apps = c.StringSlice("web-config-app")
return ParseConfig(c, cfg) return ParseConfig(c, cfg)
}, },
@@ -136,7 +136,7 @@ func Server(cfg *config.Config) *cli.Command {
logger.Err(err).Msg("error opening config file") logger.Err(err).Msg("error opening config file")
return err return err
} }
json.Unmarshal(contents, &cfg.Phoenix.Config) json.Unmarshal(contents, &cfg.Web.Config)
} }
var ( var (
@@ -37,8 +37,8 @@ type Asset struct {
Path string Path string
} }
// PhoenixConfig defines the available phoenix configuration for a dynamically rendered config.json. // WebConfig defines the available web configuration for a dynamically rendered config.json.
type PhoenixConfig struct { type WebConfig struct {
Server string `json:"server,omitempty"` Server string `json:"server,omitempty"`
Theme string `json:"theme,omitempty"` Theme string `json:"theme,omitempty"`
Version string `json:"version,omitempty"` // TODO what is version used for? Version string `json:"version,omitempty"` // TODO what is version used for?
@@ -57,7 +57,7 @@ type OIDC struct {
Scope string `json:"scope,omitempty"` Scope string `json:"scope,omitempty"`
} }
// ExternalApp defines an external phoenix app. // ExternalApp defines an external web app.
// { // {
// "name": "hello", // "name": "hello",
// "path": "http://localhost:9105/hello.js", // "path": "http://localhost:9105/hello.js",
@@ -72,15 +72,15 @@ type ExternalApp struct {
Config map[string]interface{} `json:"config,omitempty"` Config map[string]interface{} `json:"config,omitempty"`
} }
// ExternalAppConfig defines an external phoenix app configuration. // ExternalAppConfig defines an external web app configuration.
type ExternalAppConfig struct { type ExternalAppConfig struct {
URL string `json:"url,omitempty"` URL string `json:"url,omitempty"`
} }
// Phoenix defines the available phoenix configuration. // Web defines the available web configuration.
type Phoenix struct { type Web struct {
Path string Path string
Config PhoenixConfig Config WebConfig
} }
// Config combines all available configuration parts. // Config combines all available configuration parts.
@@ -92,7 +92,7 @@ type Config struct {
Tracing Tracing Tracing Tracing
Asset Asset Asset Asset
OIDC OIDC OIDC OIDC
Phoenix Phoenix Web Web
} }
// New initializes a new configuration with or without defaults. // New initializes a new configuration with or without defaults.
@@ -2,7 +2,7 @@ package flagset
import ( import (
"github.com/micro/cli/v2" "github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config" "github.com/owncloud/ocis/web/pkg/config"
) )
// RootWithConfig applies cfg to the root flagset // RootWithConfig applies cfg to the root flagset
@@ -12,21 +12,21 @@ func RootWithConfig(cfg *config.Config) []cli.Flag {
Name: "log-level", Name: "log-level",
Value: "info", Value: "info",
Usage: "Set logging level", Usage: "Set logging level",
EnvVars: []string{"PHOENIX_LOG_LEVEL"}, EnvVars: []string{"WEB_LOG_LEVEL"},
Destination: &cfg.Log.Level, Destination: &cfg.Log.Level,
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "log-pretty", Name: "log-pretty",
Value: true, Value: true,
Usage: "Enable pretty logging", Usage: "Enable pretty logging",
EnvVars: []string{"PHOENIX_LOG_PRETTY"}, EnvVars: []string{"WEB_LOG_PRETTY"},
Destination: &cfg.Log.Pretty, Destination: &cfg.Log.Pretty,
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "log-color", Name: "log-color",
Value: true, Value: true,
Usage: "Enable colored logging", Usage: "Enable colored logging",
EnvVars: []string{"PHOENIX_LOG_COLOR"}, EnvVars: []string{"WEB_LOG_COLOR"},
Destination: &cfg.Log.Color, Destination: &cfg.Log.Color,
}, },
} }
@@ -39,7 +39,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag {
Name: "debug-addr", Name: "debug-addr",
Value: "0.0.0.0:9104", Value: "0.0.0.0:9104",
Usage: "Address to debug endpoint", Usage: "Address to debug endpoint",
EnvVars: []string{"PHOENIX_DEBUG_ADDR"}, EnvVars: []string{"WEB_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr, Destination: &cfg.Debug.Addr,
}, },
} }
@@ -52,172 +52,172 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
Name: "config-file", Name: "config-file",
Value: "", Value: "",
Usage: "Path to config file", Usage: "Path to config file",
EnvVars: []string{"PHOENIX_CONFIG_FILE"}, EnvVars: []string{"WEB_CONFIG_FILE"},
Destination: &cfg.File, Destination: &cfg.File,
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "tracing-enabled", Name: "tracing-enabled",
Usage: "Enable sending traces", Usage: "Enable sending traces",
EnvVars: []string{"PHOENIX_TRACING_ENABLED"}, EnvVars: []string{"WEB_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled, Destination: &cfg.Tracing.Enabled,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "tracing-type", Name: "tracing-type",
Value: "jaeger", Value: "jaeger",
Usage: "Tracing backend type", Usage: "Tracing backend type",
EnvVars: []string{"PHOENIX_TRACING_TYPE"}, EnvVars: []string{"WEB_TRACING_TYPE"},
Destination: &cfg.Tracing.Type, Destination: &cfg.Tracing.Type,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "tracing-endpoint", Name: "tracing-endpoint",
Value: "", Value: "",
Usage: "Endpoint for the agent", Usage: "Endpoint for the agent",
EnvVars: []string{"PHOENIX_TRACING_ENDPOINT"}, EnvVars: []string{"WEB_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint, Destination: &cfg.Tracing.Endpoint,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "tracing-collector", Name: "tracing-collector",
Value: "", Value: "",
Usage: "Endpoint for the collector", Usage: "Endpoint for the collector",
EnvVars: []string{"PHOENIX_TRACING_COLLECTOR"}, EnvVars: []string{"WEB_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector, Destination: &cfg.Tracing.Collector,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "tracing-service", Name: "tracing-service",
Value: "phoenix", Value: "web",
Usage: "Service name for tracing", Usage: "Service name for tracing",
EnvVars: []string{"PHOENIX_TRACING_SERVICE"}, EnvVars: []string{"WEB_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service, Destination: &cfg.Tracing.Service,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "debug-addr", Name: "debug-addr",
Value: "0.0.0.0:9104", Value: "0.0.0.0:9104",
Usage: "Address to bind debug server", Usage: "Address to bind debug server",
EnvVars: []string{"PHOENIX_DEBUG_ADDR"}, EnvVars: []string{"WEB_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr, Destination: &cfg.Debug.Addr,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "debug-token", Name: "debug-token",
Value: "", Value: "",
Usage: "Token to grant metrics access", Usage: "Token to grant metrics access",
EnvVars: []string{"PHOENIX_DEBUG_TOKEN"}, EnvVars: []string{"WEB_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token, Destination: &cfg.Debug.Token,
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "debug-pprof", Name: "debug-pprof",
Usage: "Enable pprof debugging", Usage: "Enable pprof debugging",
EnvVars: []string{"PHOENIX_DEBUG_PPROF"}, EnvVars: []string{"WEB_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof, Destination: &cfg.Debug.Pprof,
}, },
&cli.BoolFlag{ &cli.BoolFlag{
Name: "debug-zpages", Name: "debug-zpages",
Usage: "Enable zpages debugging", Usage: "Enable zpages debugging",
EnvVars: []string{"PHOENIX_DEBUG_ZPAGES"}, EnvVars: []string{"WEB_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages, Destination: &cfg.Debug.Zpages,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "http-addr", Name: "http-addr",
Value: "0.0.0.0:9100", Value: "0.0.0.0:9100",
Usage: "Address to bind http server", Usage: "Address to bind http server",
EnvVars: []string{"PHOENIX_HTTP_ADDR"}, EnvVars: []string{"WEB_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr, Destination: &cfg.HTTP.Addr,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "http-root", Name: "http-root",
Value: "/", Value: "/",
Usage: "Root path of http server", Usage: "Root path of http server",
EnvVars: []string{"PHOENIX_HTTP_ROOT"}, EnvVars: []string{"WEB_HTTP_ROOT"},
Destination: &cfg.HTTP.Root, Destination: &cfg.HTTP.Root,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "http-namespace", Name: "http-namespace",
Value: "com.owncloud.web", Value: "com.owncloud.web",
Usage: "Set the base namespace for the http namespace", Usage: "Set the base namespace for the http namespace",
EnvVars: []string{"PHOENIX_NAMESPACE"}, EnvVars: []string{"WEB_NAMESPACE"},
Destination: &cfg.HTTP.Namespace, Destination: &cfg.HTTP.Namespace,
}, },
&cli.IntFlag{ &cli.IntFlag{
Name: "http-cache-ttl", Name: "http-cache-ttl",
Value: 604800, // 7 days Value: 604800, // 7 days
Usage: "Set the static assets caching duration in seconds", Usage: "Set the static assets caching duration in seconds",
EnvVars: []string{"PHOENIX_CACHE_TTL"}, EnvVars: []string{"WEB_CACHE_TTL"},
Destination: &cfg.HTTP.CacheTTL, Destination: &cfg.HTTP.CacheTTL,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "asset-path", Name: "asset-path",
Value: "", Value: "",
Usage: "Path to custom assets", Usage: "Path to custom assets",
EnvVars: []string{"PHOENIX_ASSET_PATH"}, EnvVars: []string{"WEB_ASSET_PATH"},
Destination: &cfg.Asset.Path, Destination: &cfg.Asset.Path,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "web-config", Name: "web-config",
Value: "", Value: "",
Usage: "Path to phoenix config", Usage: "Path to web config",
EnvVars: []string{"PHOENIX_WEB_CONFIG"}, EnvVars: []string{"WEB_UI_CONFIG"},
Destination: &cfg.Phoenix.Path, Destination: &cfg.Web.Path,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "web-config-server", Name: "web-config-server",
Value: "https://localhost:9200", Value: "https://localhost:9200",
Usage: "Server URL", Usage: "Server URL",
EnvVars: []string{"PHOENIX_WEB_CONFIG_SERVER"}, EnvVars: []string{"WEB_UI_CONFIG_SERVER"},
Destination: &cfg.Phoenix.Config.Server, Destination: &cfg.Web.Config.Server,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "web-config-theme", Name: "web-config-theme",
Value: "owncloud", Value: "owncloud",
Usage: "Theme", Usage: "Theme",
EnvVars: []string{"PHOENIX_WEB_CONFIG_THEME"}, EnvVars: []string{"WEB_UI_CONFIG_THEME"},
Destination: &cfg.Phoenix.Config.Theme, Destination: &cfg.Web.Config.Theme,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "web-config-version", Name: "web-config-version",
Value: "0.1.0", Value: "0.1.0",
Usage: "Version", Usage: "Version",
EnvVars: []string{"PHOENIX_WEB_CONFIG_VERSION"}, EnvVars: []string{"WEB_UI_CONFIG_VERSION"},
Destination: &cfg.Phoenix.Config.Version, Destination: &cfg.Web.Config.Version,
}, },
&cli.StringSliceFlag{ &cli.StringSliceFlag{
Name: "web-config-app", Name: "web-config-app",
Value: cli.NewStringSlice("files", "media-viewer"), Value: cli.NewStringSlice("files", "media-viewer"),
Usage: `--web-config-app files [--web-config-app draw-io]`, Usage: `--web-config-app files [--web-config-app draw-io]`,
EnvVars: []string{"PHOENIX_WEB_CONFIG_APPS"}, EnvVars: []string{"WEB_UI_CONFIG_APPS"},
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "oidc-metadata-url", Name: "oidc-metadata-url",
Value: "https://localhost:9200/.well-known/openid-configuration", Value: "https://localhost:9200/.well-known/openid-configuration",
Usage: "OpenID Connect metadata URL", Usage: "OpenID Connect metadata URL",
EnvVars: []string{"PHOENIX_OIDC_METADATA_URL"}, EnvVars: []string{"WEB_OIDC_METADATA_URL"},
Destination: &cfg.Phoenix.Config.OpenIDConnect.MetadataURL, Destination: &cfg.Web.Config.OpenIDConnect.MetadataURL,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "oidc-authority", Name: "oidc-authority",
Value: "https://localhost:9200", Value: "https://localhost:9200",
Usage: "OpenID Connect authority", // TODO rename to Issuer Usage: "OpenID Connect authority", // TODO rename to Issuer
EnvVars: []string{"PHOENIX_OIDC_AUTHORITY"}, EnvVars: []string{"WEB_OIDC_AUTHORITY"},
Destination: &cfg.Phoenix.Config.OpenIDConnect.Authority, Destination: &cfg.Web.Config.OpenIDConnect.Authority,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "oidc-client-id", Name: "oidc-client-id",
Value: "phoenix", Value: "web",
Usage: "OpenID Connect client ID", Usage: "OpenID Connect client ID",
EnvVars: []string{"PHOENIX_OIDC_CLIENT_ID"}, EnvVars: []string{"WEB_OIDC_CLIENT_ID"},
Destination: &cfg.Phoenix.Config.OpenIDConnect.ClientID, Destination: &cfg.Web.Config.OpenIDConnect.ClientID,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "oidc-response-type", Name: "oidc-response-type",
Value: "code", Value: "code",
Usage: "OpenID Connect response type", Usage: "OpenID Connect response type",
EnvVars: []string{"PHOENIX_OIDC_RESPONSE_TYPE"}, EnvVars: []string{"WEB_OIDC_RESPONSE_TYPE"},
Destination: &cfg.Phoenix.Config.OpenIDConnect.ResponseType, Destination: &cfg.Web.Config.OpenIDConnect.ResponseType,
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "oidc-scope", Name: "oidc-scope",
Value: "openid profile email", Value: "openid profile email",
Usage: "OpenID Connect scope", Usage: "OpenID Connect scope",
EnvVars: []string{"PHOENIX_OIDC_SCOPE"}, EnvVars: []string{"WEB_OIDC_SCOPE"},
Destination: &cfg.Phoenix.Config.OpenIDConnect.Scope, Destination: &cfg.Web.Config.OpenIDConnect.Scope,
}, },
} }
} }
@@ -5,7 +5,7 @@ var (
Namespace = "ocis" Namespace = "ocis"
// Subsystem defines the subsystem for the defines metrics. // Subsystem defines the subsystem for the defines metrics.
Subsystem = "phoenix" Subsystem = "web"
) )
// Metrics defines the available metrics of this service. // Metrics defines the available metrics of this service.
@@ -3,8 +3,8 @@ package debug
import ( import (
"context" "context"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/config"
) )
// Option defines a single option function. // Option defines a single option function.
@@ -4,9 +4,9 @@ import (
"io" "io"
"net/http" "net/http"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-phoenix/pkg/version"
"github.com/owncloud/ocis/ocis-pkg/service/debug" "github.com/owncloud/ocis/ocis-pkg/service/debug"
"github.com/owncloud/ocis/web/pkg/config"
"github.com/owncloud/ocis/web/pkg/version"
) )
// Server initializes the debug service and server. // Server initializes the debug service and server.
@@ -15,7 +15,7 @@ func Server(opts ...Option) (*http.Server, error) {
return debug.NewService( return debug.NewService(
debug.Logger(options.Logger), debug.Logger(options.Logger),
debug.Name("phoenix"), debug.Name("web"),
debug.Version(version.String), debug.Version(version.String),
debug.Address(options.Config.Debug.Addr), debug.Address(options.Config.Debug.Addr),
debug.Token(options.Config.Debug.Token), debug.Token(options.Config.Debug.Token),
@@ -4,9 +4,9 @@ import (
"context" "context"
"github.com/micro/cli/v2" "github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-phoenix/pkg/metrics"
"github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/config"
"github.com/owncloud/ocis/web/pkg/metrics"
) )
// Option defines a single option function. // Option defines a single option function.
@@ -1,11 +1,11 @@
package http package http
import ( import (
phoenixmid "github.com/owncloud/ocis/ocis-phoenix/pkg/middleware"
svc "github.com/owncloud/ocis/ocis-phoenix/pkg/service/v0"
"github.com/owncloud/ocis/ocis-phoenix/pkg/version"
"github.com/owncloud/ocis/ocis-pkg/middleware" "github.com/owncloud/ocis/ocis-pkg/middleware"
"github.com/owncloud/ocis/ocis-pkg/service/http" "github.com/owncloud/ocis/ocis-pkg/service/http"
webmid "github.com/owncloud/ocis/web/pkg/middleware"
svc "github.com/owncloud/ocis/web/pkg/service/v0"
"github.com/owncloud/ocis/web/pkg/version"
) )
// Server initializes the http service and server. // Server initializes the http service and server.
@@ -15,7 +15,7 @@ func Server(opts ...Option) (http.Service, error) {
service := http.NewService( service := http.NewService(
http.Logger(options.Logger), http.Logger(options.Logger),
http.Namespace(options.Namespace), http.Namespace(options.Namespace),
http.Name("phoenix"), http.Name("web"),
http.Version(version.String), http.Version(version.String),
http.Address(options.Config.HTTP.Addr), http.Address(options.Config.HTTP.Addr),
http.Context(options.Context), http.Context(options.Context),
@@ -31,9 +31,9 @@ func Server(opts ...Option) (http.Service, error) {
middleware.NoCache, middleware.NoCache,
middleware.Cors, middleware.Cors,
middleware.Secure, middleware.Secure,
phoenixmid.SilentRefresh, webmid.SilentRefresh,
middleware.Version( middleware.Version(
"phoenix", "web",
version.String, version.String,
), ),
middleware.Logger( middleware.Logger(
@@ -3,7 +3,7 @@ package svc
import ( import (
"net/http" "net/http"
"github.com/owncloud/ocis/ocis-phoenix/pkg/metrics" "github.com/owncloud/ocis/web/pkg/metrics"
) )
// NewInstrument returns a service that instruments metrics. // NewInstrument returns a service that instruments metrics.
File renamed without changes.
@@ -3,8 +3,8 @@ package svc
import ( import (
"net/http" "net/http"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/config"
) )
// Option defines a single option function. // Option defines a single option function.
@@ -11,9 +11,9 @@ import (
"time" "time"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/owncloud/ocis/ocis-phoenix/pkg/assets"
"github.com/owncloud/ocis/ocis-phoenix/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log" "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/assets"
"github.com/owncloud/ocis/web/pkg/config"
) )
var ( var (
@@ -34,7 +34,7 @@ func NewService(opts ...Option) Service {
m := chi.NewMux() m := chi.NewMux()
m.Use(options.Middleware...) m.Use(options.Middleware...)
svc := Phoenix{ svc := Web{
logger: options.Logger, logger: options.Logger,
config: options.Config, config: options.Config,
mux: m, mux: m,
@@ -48,31 +48,31 @@ func NewService(opts ...Option) Service {
return svc return svc
} }
// Phoenix defines implements the business logic for Service. // Web defines implements the business logic for Service.
type Phoenix struct { type Web struct {
logger log.Logger logger log.Logger
config *config.Config config *config.Config
mux *chi.Mux mux *chi.Mux
} }
// ServeHTTP implements the Service interface. // ServeHTTP implements the Service interface.
func (p Phoenix) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (p Web) ServeHTTP(w http.ResponseWriter, r *http.Request) {
p.mux.ServeHTTP(w, r) p.mux.ServeHTTP(w, r)
} }
func (p Phoenix) getPayload() (payload []byte, err error) { func (p Web) getPayload() (payload []byte, err error) {
if p.config.Phoenix.Path == "" { if p.config.Web.Path == "" {
// render dynamically using config // render dynamically using config
// provide default ocis-web options // provide default ocis-web options
if p.config.Phoenix.Config.Options == nil { if p.config.Web.Config.Options == nil {
p.config.Phoenix.Config.Options = make(map[string]interface{}) p.config.Web.Config.Options = make(map[string]interface{})
p.config.Phoenix.Config.Options["hideSearchBar"] = true p.config.Web.Config.Options["hideSearchBar"] = true
} }
if p.config.Phoenix.Config.ExternalApps == nil { if p.config.Web.Config.ExternalApps == nil {
p.config.Phoenix.Config.ExternalApps = []config.ExternalApp{ p.config.Web.Config.ExternalApps = []config.ExternalApp{
{ {
ID: "settings", ID: "settings",
Path: "/settings.js", Path: "/settings.js",
@@ -86,34 +86,34 @@ func (p Phoenix) getPayload() (payload []byte, err error) {
// make apps render as empty array if it is empty // make apps render as empty array if it is empty
// TODO remove once https://github.com/golang/go/issues/27589 is fixed // TODO remove once https://github.com/golang/go/issues/27589 is fixed
if len(p.config.Phoenix.Config.Apps) == 0 { if len(p.config.Web.Config.Apps) == 0 {
p.config.Phoenix.Config.Apps = make([]string, 0) p.config.Web.Config.Apps = make([]string, 0)
} }
return json.Marshal(p.config.Phoenix.Config) return json.Marshal(p.config.Web.Config)
} }
// try loading from file // try loading from file
if _, err = os.Stat(p.config.Phoenix.Path); os.IsNotExist(err) { if _, err = os.Stat(p.config.Web.Path); os.IsNotExist(err) {
p.logger.Fatal(). p.logger.Fatal().
Err(err). Err(err).
Str("config", p.config.Phoenix.Path). Str("config", p.config.Web.Path).
Msg("phoenix config doesn't exist") Msg("web config doesn't exist")
} }
payload, err = ioutil.ReadFile(p.config.Phoenix.Path) payload, err = ioutil.ReadFile(p.config.Web.Path)
if err != nil { if err != nil {
p.logger.Fatal(). p.logger.Fatal().
Err(err). Err(err).
Str("config", p.config.Phoenix.Path). Str("config", p.config.Web.Path).
Msg("failed to read custom config") Msg("failed to read custom config")
} }
return return
} }
// Config implements the Service interface. // Config implements the Service interface.
func (p Phoenix) Config(w http.ResponseWriter, r *http.Request) { func (p Web) Config(w http.ResponseWriter, r *http.Request) {
payload, err := p.getPayload() payload, err := p.getPayload()
if err != nil { if err != nil {
@@ -127,7 +127,7 @@ func (p Phoenix) Config(w http.ResponseWriter, r *http.Request) {
} }
// Static simply serves all static files. // Static simply serves all static files.
func (p Phoenix) Static(ttl int) http.HandlerFunc { func (p Web) Static(ttl int) http.HandlerFunc {
rootWithSlash := p.config.HTTP.Root rootWithSlash := p.config.HTTP.Root
if !strings.HasSuffix(rootWithSlash, "/") { if !strings.HasSuffix(rootWithSlash, "/") {
File renamed without changes.
File renamed without changes.
+2
View File
@@ -0,0 +1,2 @@
# backend
-r '^(cmd|pkg)/.*\.go$' -R '^node_modules/' -s -- sh -c 'make bin/web-debug && bin/web-debug --log-level debug server --debug-pprof --debug-zpages --asset-path assets/'
@@ -3,7 +3,7 @@ title: "Configuration"
date: "{{ date "2006-01-02T15:04:05-0700" now }}" date: "{{ date "2006-01-02T15:04:05-0700" now }}"
weight: 20 weight: 20
geekdocRepo: https://github.com/owncloud/ocis geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/phoenix/templates geekdocEditPath: edit/master/web/templates
geekdocFilePath: CONFIGURATION.tmpl geekdocFilePath: CONFIGURATION.tmpl
--- ---
{{- define "options"}} {{- define "options"}}
@@ -33,7 +33,7 @@ $HOME/.ocis
./config ./config
``` ```
For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-phoenix reads `phoenix.json | yaml | toml ...`*. For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-web reads `web.json | yaml | toml ...`*.
So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`. So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`.
@@ -48,12 +48,12 @@ If you prefer to configure the service with commandline flags you can see the av
{{ $options := .Options -}} {{ $options := .Options -}}
{{ range $com := .Commands }}{{ with (list $options $com) -}} {{ range $com := .Commands }}{{ with (list $options $com) -}}
{{ $c := last . -}} {{ $c := last . -}}
{{ if eq $c.Name "phoenix" -}} {{ if eq $c.Name "web" -}}
## Root Command ## Root Command
{{ $c.Usage }} {{ $c.Usage }}
Usage: `phoenix [global options] command [command options] [arguments...]` Usage: `web [global options] command [command options] [arguments...]`
{{ template "options" . -}} {{ template "options" . -}}
## Sub Commands ## Sub Commands
@@ -62,12 +62,12 @@ Usage: `phoenix [global options] command [command options] [arguments...]`
{{ end -}} {{ end -}}
{{- range $com := .Commands }}{{ with (list $options $com) -}} {{- range $com := .Commands }}{{ with (list $options $com) -}}
{{- $c := last . }} {{- $c := last . }}
{{- if ne $c.Name "phoenix" -}} {{- if ne $c.Name "web" -}}
### phoenix {{ $c.Name }} ### web {{ $c.Name }}
{{ $c.Usage }} {{ $c.Usage }}
Usage: `phoenix {{ $c.Name }} [command options] [arguments...]` Usage: `web {{ $c.Name }} [command options] [arguments...]`
{{ template "options" . }} {{ template "options" . }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
File renamed without changes.