diff --git a/.drone.star b/.drone.star index 460b317896..db68e9d8a2 100644 --- a/.drone.star +++ b/.drone.star @@ -4,7 +4,7 @@ config = { 'glauth':'', 'konnectd':'', 'ocis': '', - 'ocis-phoenix':'', + 'web':'', 'ocis-pkg':'', 'ocs':'', 'proxy':'', @@ -21,8 +21,8 @@ config = { 'numberOfParts': 10 }, 'uiTests': { - 'phoenixBranch': 'master', - 'phoenixCommit': '262cec1536156dae3281099aca2fde0febeec6e5', + 'webBranch': 'master', + 'webCommit': '262cec1536156dae3281099aca2fde0febeec6e5', 'suites': { 'webUIBasic': [ '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'], 'ocis')) - pipelines += uiTests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit']) - pipelines.append(accountsUITests(ctx, config['uiTests']['phoenixBranch'], config['uiTests']['phoenixCommit'])) + pipelines += uiTests(ctx, config['uiTests']['webBranch'], config['uiTests']['webCommit']) + pipelines.append(accountsUITests(ctx, config['uiTests']['webBranch'], config['uiTests']['webCommit'])) return pipelines 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() - 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'] paths = "" suite = suites[suiteName] @@ -624,7 +624,7 @@ def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '', 'RUN_ON_OCIS': 'true', 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data', 'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton', - 'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', + 'WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'TEST_TAGS': 'not @skipOnOCIS and not @skip', 'LOCAL_UPLOAD_DIR': '/uploads', 'NODE_TLS_REJECT_UNAUTHORIZED': 0, @@ -632,12 +632,12 @@ def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '', }, 'commands': [ '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), - 'cp -r /srv/app/phoenix/tests/acceptance/filesForUpload/* /uploads', - 'cd /srv/app/phoenix', + 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web' % (webBranch), + 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads', + 'cd /srv/app/web', ] + ([ - 'git checkout %s' % (phoenixCommit) - ] if phoenixCommit != '' else []) + [ + 'git checkout %s' % (webCommit) + ] if webCommit != '' else []) + [ 'yarn install-all', '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 { 'kind': 'pipeline', 'type': 'docker', @@ -696,21 +696,21 @@ def accountsUITests(ctx, phoenixBranch, phoenixCommit, storage = 'owncloud', acc 'RUN_ON_OCIS': 'true', 'OCIS_REVA_DATA_ROOT': '/srv/app/tmp/ocis/owncloud/data', 'OCIS_SKELETON_DIR': '/srv/app/testing/data/webUISkeleton', - 'PHOENIX_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', + 'WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'TEST_TAGS': 'not @skipOnOCIS and not @skip', 'LOCAL_UPLOAD_DIR': '/uploads', 'NODE_TLS_REJECT_UNAUTHORIZED': 0, - 'PHOENIX_PATH': '/srv/app/phoenix', + 'WEB_PATH': '/srv/app/web', 'FEATURE_PATH': '/drone/src/accounts/ui/tests/acceptance/features', }, 'commands': [ '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), - 'cp -r /srv/app/phoenix/tests/acceptance/filesForUpload/* /uploads', - 'cd /srv/app/phoenix', + 'git clone -b %s --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web' % (webBranch), + 'cp -r /srv/app/web/tests/acceptance/filesForUpload/* /uploads', + 'cd /srv/app/web', ] + ([ - 'git checkout %s' % (phoenixCommit) - ] if phoenixCommit != '' else []) + [ + 'git checkout %s' % (webCommit) + ] if webCommit != '' else []) + [ 'yarn install-all', 'cd /drone/src/accounts', 'yarn install --all', @@ -1534,7 +1534,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4): 'STORAGE_FRONTEND_PUBLIC_URL': 'https://ocis-server:9200', 'STORAGE_SHARING_USER_JSON_FILE': '/srv/app/tmp/ocis/shares.json', 'PROXY_ENABLE_BASIC_AUTH': True, - 'PHOENIX_WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', + 'WEB_CONFIG': '/drone/src/tests/config/drone/ocis-config.json', 'KONNECTD_IDENTIFIER_REGISTRATION_CONF': '/drone/src/tests/config/drone/identifier-registration.yml', 'KONNECTD_ISS': 'https://ocis-server:9200', 'KONNECTD_TLS': 'true', diff --git a/accounts/nightwatch.conf.js b/accounts/nightwatch.conf.js index 39988add62..c1ddc47d59 100644 --- a/accounts/nightwatch.conf.js +++ b/accounts/nightwatch.conf.js @@ -1,10 +1,10 @@ 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.custom_commands_path = PHOENIX_PATH + '/tests/acceptance/customCommands' +config.page_objects_path = [WEB_PATH + '/tests/acceptance/pageObjects', 'ui/tests/acceptance/pageobjects'] +config.custom_commands_path = WEB_PATH + '/tests/acceptance/customCommands' module.exports = { ...config diff --git a/accounts/ui/components/accounts/Avatar.vue b/accounts/ui/components/accounts/Avatar.vue index e0b13558b7..be9e01680b 100644 --- a/accounts/ui/components/accounts/Avatar.vue +++ b/accounts/ui/components/accounts/Avatar.vue @@ -21,7 +21,7 @@ import { mapGetters } from 'vuex' 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. */ name: 'Avatar', diff --git a/accounts/ui/tests/run-acceptance-test.sh b/accounts/ui/tests/run-acceptance-test.sh index be6c544e76..3e7606259b 100755 --- a/accounts/ui/tests/run-acceptance-test.sh +++ b/accounts/ui/tests/run-acceptance-test.sh @@ -1,8 +1,8 @@ #!/bin/bash -if [ -z "$PHOENIX_PATH" ] +if [ -z "$WEB_PATH" ] 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 fi @@ -12,9 +12,9 @@ then exit 1 fi -if [ -z "$PHOENIX_CONFIG" ] +if [ -z "$WEB_CONFIG" ] then - echo "PHOENIX_CONFIG env variable is not set, cannot find phoenix config file" + echo "WEB_CONFIG env variable is not set, cannot find web config file" exit 1 fi @@ -46,7 +46,7 @@ clean_up() { 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 BACKEND_HOST=${BACKEND_HOST:-https://localhost:9200} diff --git a/deployments/examples/ocis_keycloak/.env b/deployments/examples/ocis_keycloak/.env index 8218dd8d83..7506aa585c 100644 --- a/deployments/examples/ocis_keycloak/.env +++ b/deployments/examples/ocis_keycloak/.env @@ -15,7 +15,7 @@ TRAEFIK_ACME_MAIL= OCIS_DOCKER_TAG= # Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test" 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= ### Keycloak ### diff --git a/deployments/examples/ocis_keycloak/docker-compose.yml b/deployments/examples/ocis_keycloak/docker-compose.yml index ce54c2fc60..2c947d0dc7 100644 --- a/deployments/examples/ocis_keycloak/docker-compose.yml +++ b/deployments/examples/ocis_keycloak/docker-compose.yml @@ -53,12 +53,12 @@ services: PROXY_OIDC_INSECURE: "${INSECURE:-false}" PROXY_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master} PROXY_TLS: "false" - # phoenix config - PHOENIX_OIDC_AUTHORITY: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master} - PHOENIX_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-ocis-phoenix} - PHOENIX_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 - PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test} + # ownCloud Web config + WEB_OIDC_AUTHORITY: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master} + WEB_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-web} + WEB_OIDC_METADATA_URL: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-master}/.well-known/openid-configuration + WEB_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer + WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test} # storage config STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/ diff --git a/deployments/examples/ocis_traefik/config/identifier-registration.dist.yaml b/deployments/examples/ocis_traefik/config/identifier-registration.dist.yaml index dbcead8c2d..2c425242f7 100644 --- a/deployments/examples/ocis_traefik/config/identifier-registration.dist.yaml +++ b/deployments/examples/ocis_traefik/config/identifier-registration.dist.yaml @@ -2,7 +2,7 @@ # OpenID Connect client registry. clients: - - id: phoenix + - id: web name: OCIS application_type: web insecure: yes diff --git a/deployments/examples/ocis_traefik/docker-compose.yml b/deployments/examples/ocis_traefik/docker-compose.yml index 7070db74f7..1d4d9941a1 100644 --- a/deployments/examples/ocis_traefik/docker-compose.yml +++ b/deployments/examples/ocis_traefik/docker-compose.yml @@ -58,11 +58,11 @@ services: PROXY_OIDC_INSECURE: "${INSECURE:-false}" PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test} PROXY_TLS: "false" - # phoenix config - PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-ocis.owncloud.test} - PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/.well-known/openid-configuration - PHOENIX_WEB_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer - PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test} + # web config + WEB_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-ocis.owncloud.test} + WEB_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/.well-known/openid-configuration + WEB_CONFIG_APPS: files,draw-io,markdown-editor,media-viewer + WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-ocis.owncloud.test} # storage config STORAGE_DATAGATEWAY_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/data STORAGE_FRONTEND_PUBLIC_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}/ diff --git a/deployments/examples/owncloud10_with_oc_web/config/oc10/config.php b/deployments/examples/owncloud10_with_oc_web/config/oc10/config.php index 593afb1065..4b9afdcfdc 100644 --- a/deployments/examples/owncloud10_with_oc_web/config/oc10/config.php +++ b/deployments/examples/owncloud10_with_oc_web/config/oc10/config.php @@ -50,7 +50,7 @@ function getConfigFromEnv() { 'dbpassword' => getenv('OWNCLOUD_DB_PASSWORD'), 'dbtableprefix' => getenv('OWNCLOUD_DB_PREFIX'), - 'phoenix.baseUrl' => getenv('OCIS_DOMAIN'), + 'web.baseUrl' => getenv('OCIS_DOMAIN'), 'cors.allowed-domains' => [getenv('OCIS_DOMAIN')], 'log_type' => 'owncloud', diff --git a/deployments/examples/owncloud10_with_oc_web/config/ocis/config.dist.json b/deployments/examples/owncloud10_with_oc_web/config/ocis/config.dist.json index 4d2c661e22..cea136ddb6 100644 --- a/deployments/examples/owncloud10_with_oc_web/config/ocis/config.dist.json +++ b/deployments/examples/owncloud10_with_oc_web/config/ocis/config.dist.json @@ -5,7 +5,7 @@ "openIdConnect": { "metadata_url": "https://ocis.owncloud.test/.well-known/openid-configuration", "authority": "https://ocis.owncloud.test", - "client_id": "phoenix", + "client_id": "web", "response_type": "code", "scope": "openid profile email" }, diff --git a/deployments/examples/owncloud10_with_oc_web/config/ocis/identifier-registration.dist.yaml b/deployments/examples/owncloud10_with_oc_web/config/ocis/identifier-registration.dist.yaml index 61b9ccd08c..2d82f34079 100644 --- a/deployments/examples/owncloud10_with_oc_web/config/ocis/identifier-registration.dist.yaml +++ b/deployments/examples/owncloud10_with_oc_web/config/ocis/identifier-registration.dist.yaml @@ -1,7 +1,7 @@ --- # OpenID Connect client registry. clients: - - id: phoenix + - id: web name: OCIS application_type: web insecure: yes diff --git a/deployments/examples/owncloud10_with_oc_web/docker-compose.yml b/deployments/examples/owncloud10_with_oc_web/docker-compose.yml index 3b6faf2c13..c7fcb7bd74 100644 --- a/deployments/examples/owncloud10_with_oc_web/docker-compose.yml +++ b/deployments/examples/owncloud10_with_oc_web/docker-compose.yml @@ -97,7 +97,7 @@ services: # graph GRAPH_OIDC_ENDPOINT: https://${OC10_DOMAIN:-oc10.owncloud.test}/apps/graphapi/v1.0 # web ui - PHOENIX_WEB_CONFIG: "/config/config.json" + WEB_CONFIG: "/config/config.json" # storage - although not used, yet STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-ocis.owncloud.test} STORAGE_OIDC_INSECURE: "${INSECURE:-false}" diff --git a/docs/Makefile b/docs/Makefile index 6760943a8d..6ab41f4c64 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,7 @@ config-docs-generate: make -C ../glauth config-docs-generate make -C ../konnectd 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 ../ocs config-docs-generate make -C ../proxy config-docs-generate diff --git a/docs/_index.md b/docs/_index.md index 4819168e05..e900969ba0 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -11,7 +11,7 @@ Welcome to our developer documentation. Here you can find developer documentatio - [oCIS](https://owncloud.github.io/ocis/) server - oCIS extensions - 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 iOS app](https://github.com/owncloud/ios-app) - [ownCloud Desktop Syncing Client](https://github.com/owncloud/client) diff --git a/docs/extensions/ocis-phoenix/_index.md b/docs/extensions/ocis-phoenix/_index.md deleted file mode 100644 index e03539f234..0000000000 --- a/docs/extensions/ocis-phoenix/_index.md +++ /dev/null @@ -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. diff --git a/docs/extensions/settings/_index.md b/docs/extensions/settings/_index.md index 245cbd4d4c..287fe6efd8 100644 --- a/docs/extensions/settings/_index.md +++ b/docs/extensions/settings/_index.md @@ -15,7 +15,7 @@ for other extensions to register new settings within oCIS. It is responsible for settings values as well. 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. {{< mermaid class="text-center">}} diff --git a/docs/extensions/ocis-phoenix/.gitignore b/docs/extensions/web/.gitignore similarity index 100% rename from docs/extensions/ocis-phoenix/.gitignore rename to docs/extensions/web/.gitignore diff --git a/docs/extensions/web/_index.md b/docs/extensions/web/_index.md new file mode 100644 index 0000000000..b4a66d45db --- /dev/null +++ b/docs/extensions/web/_index.md @@ -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. diff --git a/docs/extensions/ocis-phoenix/releasing.md b/docs/extensions/web/releasing.md similarity index 60% rename from docs/extensions/ocis-phoenix/releasing.md rename to docs/extensions/web/releasing.md index a0edfe8533..18ea31e02f 100644 --- a/docs/extensions/ocis-phoenix/releasing.md +++ b/docs/extensions/web/releasing.md @@ -2,7 +2,7 @@ title: "Releasing" weight: 40 geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/docs/extensions/ocis-phoenix +geekdocEditPath: edit/master/docs/extensions/web geekdocFilePath: releasing.md --- @@ -10,29 +10,29 @@ geekdocFilePath: releasing.md ## 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. ### Package Hierarchy - [ocis](https://githug.com/owncloud/ocis) - - [ocis-phoenix](https://github.com/owncloud/ocis-phoenix) - - [ocis-pkg](https://github.com/owncloud/ocis-pkg) - - [phoenix](https://github.com/owncloud/phoenix) + - [ocis-web](https://github.com/owncloud/ocis/tree/master/web) + - [ocis-pkg](https://github.com/owncloud/ocis/tree/master/ocis-pkg) + - [ownCloud Web](https://github.com/owncloud/web) #### 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. -#### Updating ocis-phoenix +#### Updating ocis-web -1. Create a branch `release-$version`. in +1. Create a branch `release-$version`. in 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. 4. Update the go module `ocis-pkg` to the latest version . -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`. 7. Create a changelog item for the update in the `changelog/$major.$minor.$patchVersion_YYYY-MM-DD` folder. 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. 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. - diff --git a/docs/ocis/_index.md b/docs/ocis/_index.md index 57727f9961..0163c9b338 100644 --- a/docs/ocis/_index.md +++ b/docs/ocis/_index.md @@ -24,7 +24,7 @@ We run a huge [test suite](https://github.com/owncloud/core/tree/master/tests), {{< mermaid class="text-center">}} graph TD proxy --> - konnectd & ocis-phoenix & thumbnails & ocs & webdav & storage & accounts & store & settings + konnectd & web & thumbnails & ocs & webdav & storage & accounts & store & settings konnectd --> glauth diff --git a/docs/ocis/deployment/basic-remote-setup.md b/docs/ocis/deployment/basic-remote-setup.md index f66cb84a02..17577ea865 100644 --- a/docs/ocis/deployment/basic-remote-setup.md +++ b/docs/ocis/deployment/basic-remote-setup.md @@ -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]} # OpenID Connect client registry. clients: - - id: phoenix + - id: web name: ownCloud web app application_type: web 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 \ KONNECTD_ISS=https://your-server:9200 \ REVA_OIDC_ISSUER=https://your-server:9200 \ -PHOENIX_OIDC_AUTHORITY=https://your-server:9200 \ -PHOENIX_WEB_CONFIG_SERVER=https://your-server:9200 \ -PHOENIX_OIDC_METADATA_URL=https://your-server:9200/.well-known/openid-configuration \ +WEB_OIDC_AUTHORITY=https://your-server:9200 \ +WEB_CONFIG_SERVER=https://your-server:9200 \ +WEB_OIDC_METADATA_URL=https://your-server:9200/.well-known/openid-configuration \ REVA_DATAGATEWAY_URL=https://your-server:9200/data \ REVA_FRONTEND_URL=https://your-server:9200 \ PROXY_TRANSPORT_TLS_KEY=./certs/your-host.key \ diff --git a/docs/ocis/deployment/bridge.md b/docs/ocis/deployment/bridge.md index 9f276170a5..0b6da2cc65 100644 --- a/docs/ocis/deployment/bridge.md +++ b/docs/ocis/deployment/bridge.md @@ -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. -### Start ocis-phoenix +### Start ocis-web #### Get it! In an `ocis` folder ``` -$ git clone git@github.com:owncloud/ocis-phoenix.git -$ cd ocis-phoenix +$ git clone git@github.com:owncloud/ocis.git +$ cd web $ 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/ocis-web` binary. Try listing the help with `bin/ocis-web --help`. #### 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 -$ 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/ocis-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) - `--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 @@ -179,11 +179,11 @@ clients: 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 `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! -You can now bring up `ocis-connectd` with: +You can now bring up `ocis-konnectd` with: ```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 ``` @@ -243,7 +243,7 @@ $CONFIG = [ In the above configuration replace - `provider-url` with the URL to your `ocis-konnectd` issuer - `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. @@ -251,4 +251,4 @@ In the above configuration replace Aside from the above todos these are the next stepo - 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`. diff --git a/docs/ocis/deployment/ocis_keycloak.md b/docs/ocis/deployment/ocis_keycloak.md index e7ea609a73..4ecfd7383e 100644 --- a/docs/ocis/deployment/ocis_keycloak.md +++ b/docs/ocis/deployment/ocis_keycloak.md @@ -66,7 +66,7 @@ See also [example server setup]({{< ref "preparing_server.md" >}}) OCIS_DOCKER_TAG= # Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test" 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= ### Keycloak ### @@ -107,7 +107,7 @@ See also [example server setup]({{< ref "preparing_server.md" >}}) `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 @@ -130,7 +130,7 @@ After that you're ready to start the application stack: `docker-compose up -d` 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 diff --git a/docs/ocis/development/debugging.md b/docs/ocis/development/debugging.md index 67c67986ac..44163e2c2b 100644 --- a/docs/ocis/development/debugging.md +++ b/docs/ocis/development/debugging.md @@ -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. -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 @@ -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 12993 pts/1 Sl 0:00 bin/ocis-debug api 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 ``` @@ -83,7 +83,7 @@ bin/ocis --log-level=$LOG_LEVEL graph & #bin/ocis --log-level=$LOG_LEVEL hello & bin/ocis --log-level=$LOG_LEVEL konnectd & #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-bearer & 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 12993 pts/1 Sl 0:00 bin/ocis-debug api 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 ``` @@ -144,7 +144,7 @@ We recommend you collect all related information in a single file or in a github > Error while sharing. > 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 # 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 - diff --git a/docs/ocis/development/extensions.md b/docs/ocis/development/extensions.md index ad93e37efe..d82403be15 100644 --- a/docs/ocis/development/extensions.md +++ b/docs/ocis/development/extensions.md @@ -26,8 +26,8 @@ cd ocis TAGS=simple make generate build ``` -*Q: Can you specify which version of phoenix 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.* +*Q: Can you specify which version of ownCloud Web to use?* +*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` @@ -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 phoenix & +bin/ocis web & bin/ocis hello & bin/ocis reva & ``` @@ -96,13 +96,13 @@ cd ../ocis-hello 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 -cd phoenix +git clone https://github.com/owncloud/web.git +cd web yarn install yarn dist @@ -110,25 +110,25 @@ yarn dist 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 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](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! -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/ocis-web server`) -2. point ocis phoenix 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` +2. point ocis-web to the web config which you extended with an external app: +`WEB_CONFIG="`pwd`/../web/config.json" ASSET_PATH="`pwd`/../web/dist" bin/ocis web` ```json { @@ -138,7 +138,7 @@ This is what hello is: copy and extend! "openIdConnect": { "metadata_url": "http://localhost:9140/.well-known/openid-configuration", "authority": "http://localhost:9140", - "client_id": "phoenix", + "client_id": "web", "response_type": "code", "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 >}} -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 >}} Several ones available: -### Phoenix core +### ownCloud Web - App switcher (defined in config.json) - 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 - 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 - we want to integrate with eg. kopano and provide a commen api (file sync and share is covered as well) diff --git a/docs/ocis/getting-started.md b/docs/ocis/getting-started.md index 88fa399aae..a61c1d8f11 100644 --- a/docs/ocis/getting-started.md +++ b/docs/ocis/getting-started.md @@ -78,12 +78,12 @@ ocis list To stop a particular extension: {{< highlight txt >}} -ocis server kill phoenix +ocis server kill web {{< / highlight >}} To start a particular extension: {{< highlight txt >}} -ocis server run phoenix +ocis server run web {{< / highlight >}} The version command prints the version of your installed oCIS. diff --git a/ocis-phoenix/docker/manifest.tmpl b/ocis-phoenix/docker/manifest.tmpl deleted file mode 100644 index 0a8bf365d7..0000000000 --- a/ocis-phoenix/docker/manifest.tmpl +++ /dev/null @@ -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 diff --git a/ocis-phoenix/reflex.conf b/ocis-phoenix/reflex.conf deleted file mode 100644 index e9436c6533..0000000000 --- a/ocis-phoenix/reflex.conf +++ /dev/null @@ -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/' diff --git a/ocis/docker-compose-eos-test.yml b/ocis/docker-compose-eos-test.yml index 06a7d080cb..5406505674 100644 --- a/ocis/docker-compose-eos-test.yml +++ b/ocis/docker-compose-eos-test.yml @@ -33,9 +33,9 @@ services: OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost} PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200 - PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200 - PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration - PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200 + WEB_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200 + WEB_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration + WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200 # make home and users storages use eos diff --git a/ocis/docker-compose.yml b/ocis/docker-compose.yml index 15309adeaf..ae9ceacb22 100644 --- a/ocis/docker-compose.yml +++ b/ocis/docker-compose.yml @@ -24,7 +24,7 @@ services: - ../accounts:/accounts - ../glauth:/glauth - ../konnectd:/konnectd - - ../ocis-phoenix:/ocis-phoenix + - ../web:/web - ../ocis-pkg:/ocis-pkg - ../ocs:/ocs - ../proxy:/proxy @@ -41,9 +41,9 @@ services: OCIS_DOMAIN: ${OCIS_DOMAIN:-localhost} PROXY_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 KONNECTD_ISS: https://${OCIS_DOMAIN:-localhost}:9200 - PHOENIX_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200 - PHOENIX_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration - PHOENIX_WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200 + WEB_OIDC_AUTHORITY: https://${OCIS_DOMAIN:-localhost}:9200 + WEB_OIDC_METADATA_URL: https://${OCIS_DOMAIN:-localhost}:9200/.well-known/openid-configuration + WEB_CONFIG_SERVER: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_OIDC_ISSUER: https://${OCIS_DOMAIN:-localhost}:9200 STORAGE_LDAP_IDP: https://${OCIS_DOMAIN:-localhost}:9200 # TODO make id the default in ocis-storage diff --git a/ocis/go.mod b/ocis/go.mod index 01ca7ada1a..859daddca5 100644 --- a/ocis/go.mod +++ b/ocis/go.mod @@ -21,7 +21,7 @@ require ( 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/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/ocs 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/glauth => ../glauth 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/ocs => ../ocs github.com/owncloud/ocis/onlyoffice => ../onlyoffice diff --git a/ocis/pkg/command/phoenix.go b/ocis/pkg/command/phoenix.go index faac073ff8..64ae0b4b10 100644 --- a/ocis/pkg/command/phoenix.go +++ b/ocis/pkg/command/phoenix.go @@ -4,54 +4,54 @@ 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" + "github.com/owncloud/ocis/web/pkg/command" + "github.com/owncloud/ocis/web/pkg/flagset" ) -// PhoenixCommand is the entrypoint for the phoenix command. -func PhoenixCommand(cfg *config.Config) *cli.Command { +// WebCommand is the entrypoint for the web command. +func WebCommand(cfg *config.Config) *cli.Command { return &cli.Command{ - Name: "phoenix", - Usage: "Start phoenix server", + Name: "web", + Usage: "Start web server", Category: "Extensions", - Flags: flagset.ServerWithConfig(cfg.Phoenix), + Flags: flagset.ServerWithConfig(cfg.Web), 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") + cfg.Web.Web.Config.Apps = c.StringSlice("web-config-app") return nil }, Action: func(c *cli.Context) error { - phoenixCommand := command.Server(configurePhoenix(cfg).Phoenix) + webCommand := command.Server(configureWeb(cfg).Web) - if err := phoenixCommand.Before(c); err != nil { + if err := webCommand.Before(c); err != nil { return err } - return cli.HandleAction(phoenixCommand.Action, c) + return cli.HandleAction(webCommand.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 +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.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 + 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(PhoenixCommand) + register.AddCommand(WebCommand) } diff --git a/ocis/pkg/config/config.go b/ocis/pkg/config/config.go index da09bf73fe..f37fe87c32 100644 --- a/ocis/pkg/config/config.go +++ b/ocis/pkg/config/config.go @@ -7,7 +7,6 @@ import ( accounts "github.com/owncloud/ocis/accounts/pkg/config" glauth "github.com/owncloud/ocis/glauth/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" onlyoffice "github.com/owncloud/ocis/onlyoffice/pkg/config" proxy "github.com/owncloud/ocis/proxy/pkg/config" @@ -15,6 +14,7 @@ import ( storage "github.com/owncloud/ocis/storage/pkg/config" store "github.com/owncloud/ocis/store/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" pman "github.com/refs/pman/pkg/config" ) @@ -78,7 +78,7 @@ type Config struct { Konnectd *konnectd.Config OCS *ocs.Config Onlyoffice *onlyoffice.Config - Phoenix *phoenix.Config + Web *web.Config Proxy *proxy.Config Settings *settings.Config Storage *storage.Config @@ -99,7 +99,7 @@ func New() *Config { Konnectd: konnectd.New(), OCS: ocs.New(), Onlyoffice: onlyoffice.New(), - Phoenix: phoenix.New(), + Web: web.New(), Proxy: proxy.New(), Settings: settings.New(), Storage: storage.New(), diff --git a/ocis/pkg/runtime/runtime.go b/ocis/pkg/runtime/runtime.go index 24eb752b45..77ecb58d37 100644 --- a/ocis/pkg/runtime/runtime.go +++ b/ocis/pkg/runtime/runtime.go @@ -37,7 +37,6 @@ var ( "konnectd", "ocs", "onlyoffice", - "phoenix", "proxy", "settings", "store", @@ -51,6 +50,7 @@ var ( "storage-metadata", "storage-public-link", "thumbnails", + "web", "webdav", //"graph", //"graph-explorer", diff --git a/settings/nightwatch.conf.js b/settings/nightwatch.conf.js index 3ae9be92fe..da9ff657a5 100644 --- a/settings/nightwatch.conf.js +++ b/settings/nightwatch.conf.js @@ -1,9 +1,9 @@ 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 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.custom_commands_path = TEST_INFRA_DIRECTORY + '/acceptance/customCommands' diff --git a/settings/ui/tests/config/drone/identifier-registration.yml b/settings/ui/tests/config/drone/identifier-registration.yml index a45a83f78d..7d4b98bc04 100644 --- a/settings/ui/tests/config/drone/identifier-registration.yml +++ b/settings/ui/tests/config/drone/identifier-registration.yml @@ -2,7 +2,7 @@ # OpenID Connect client registry. clients: - - id: phoenix + - id: web name: OCIS application_type: web insecure: yes diff --git a/settings/ui/tests/config/drone/ocis-config.json b/settings/ui/tests/config/drone/ocis-config.json index ab2848cdb3..13328462a2 100644 --- a/settings/ui/tests/config/drone/ocis-config.json +++ b/settings/ui/tests/config/drone/ocis-config.json @@ -5,7 +5,7 @@ "openIdConnect": { "metadata_url": "https://ocis-server:9200/.well-known/openid-configuration", "authority": "https://ocis-server:9200", - "client_id": "phoenix", + "client_id": "web", "response_type": "code", "scope": "openid profile email" }, diff --git a/settings/ui/tests/run-acceptance-test.sh b/settings/ui/tests/run-acceptance-test.sh index fbf83ccaa2..0ae07b9065 100755 --- a/settings/ui/tests/run-acceptance-test.sh +++ b/settings/ui/tests/run-acceptance-test.sh @@ -1,8 +1,8 @@ #!/bin/bash -if [ -z "$PHOENIX_PATH" ] +if [ -z "$WEB_PATH" ] 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 fi @@ -12,9 +12,9 @@ then exit 1 fi -if [ -z "$PHOENIX_CONFIG" ] +if [ -z "$WEB_CONFIG" ] then - echo "PHOENIX_CONFIG env variable is not set, cannot find phoenix config file" + echo "WEB_CONFIG env variable is not set, cannot find ownCloud Web config file" exit 1 fi @@ -46,7 +46,7 @@ clean_up() { 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 SERVER_HOST=${SERVER_HOST:-https://localhost:9200} diff --git a/tests/config/drone/identifier-registration.yml b/tests/config/drone/identifier-registration.yml index a270e9cac4..82a0c747d9 100644 --- a/tests/config/drone/identifier-registration.yml +++ b/tests/config/drone/identifier-registration.yml @@ -2,7 +2,7 @@ # OpenID Connect client registry. clients: - - id: phoenix + - id: web name: OCIS application_type: web insecure: yes diff --git a/tests/config/drone/ocis-config.json b/tests/config/drone/ocis-config.json index b8c5b416cf..90e570d87f 100644 --- a/tests/config/drone/ocis-config.json +++ b/tests/config/drone/ocis-config.json @@ -5,7 +5,7 @@ "openIdConnect": { "metadata_url": "https://ocis-server:9200/.well-known/openid-configuration", "authority": "https://ocis-server:9200", - "client_id": "phoenix", + "client_id": "web", "response_type": "code", "scope": "openid profile email" }, diff --git a/tests/k6/src/lib/auth.ts b/tests/k6/src/lib/auth.ts index da50bffcd9..9c4112b031 100644 --- a/tests/k6/src/lib/auth.ts +++ b/tests/k6/src/lib/auth.ts @@ -81,7 +81,7 @@ class OIDCProvider implements types.AuthProvider { params: [this.account.login, this.account.password, '1'], hello: { scope: 'openid profile email', - client_id: 'phoenix', + client_id: 'web', redirect_uri: this.redirectUri, flow: 'oidc', }, @@ -106,7 +106,7 @@ class OIDCProvider implements types.AuthProvider { private getCode(continueURI: string): string { const authorizeUri = `${continueURI}?${queryString.stringify({ - client_id: 'phoenix', + client_id: 'web', prompt: 'none', redirect_uri: this.redirectUri, response_mode: 'query', @@ -128,7 +128,7 @@ class OIDCProvider implements types.AuthProvider { private getToken(code: string): types.Token { const tokenResponse = http.post(this.tokenUrl, { - client_id: 'phoenix', + client_id: 'web', code, redirect_uri: this.redirectUri, grant_type: 'authorization_code', diff --git a/ocis-phoenix/.dockerignore b/web/.dockerignore similarity index 100% rename from ocis-phoenix/.dockerignore rename to web/.dockerignore diff --git a/ocis-phoenix/LICENSE b/web/LICENSE similarity index 100% rename from ocis-phoenix/LICENSE rename to web/LICENSE diff --git a/ocis-phoenix/Makefile b/web/Makefile similarity index 96% rename from ocis-phoenix/Makefile rename to web/Makefile index 7da8e958bb..a0d1ebc224 100644 --- a/ocis-phoenix/Makefile +++ b/web/Makefile @@ -1,9 +1,9 @@ SHELL := bash -NAME := ocis-phoenix +NAME := web IMPORT := github.com/owncloud/ocis/$(NAME) BIN := bin DIST := dist -PHOENIX_ASSETS_VERSION = v0.29.0 +WEB_ASSETS_VERSION = v0.29.0 ifeq ($(OS), Windows_NT) EXECUTABLE := $(NAME).exe @@ -180,4 +180,4 @@ watch: .PHONY: 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/ diff --git a/ocis-phoenix/cmd/ocis-phoenix/main.go b/web/cmd/ocis-phoenix/main.go similarity index 67% rename from ocis-phoenix/cmd/ocis-phoenix/main.go rename to web/cmd/ocis-phoenix/main.go index 7d0e3d52b4..6fd97a7655 100644 --- a/ocis-phoenix/cmd/ocis-phoenix/main.go +++ b/web/cmd/ocis-phoenix/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/owncloud/ocis/ocis-phoenix/pkg/command" + "github.com/owncloud/ocis/web/pkg/command" ) func main() { diff --git a/ocis-phoenix/config/example.json b/web/config/example.json similarity index 93% rename from ocis-phoenix/config/example.json rename to web/config/example.json index bef12bb1b1..90bdc6fb01 100644 --- a/ocis-phoenix/config/example.json +++ b/web/config/example.json @@ -13,7 +13,7 @@ "type": "jaeger", "endpoint": "localhost:6831", "collector": "http://localhost:14268/api/traces", - "service": "phoenix" + "service": "web" }, "asset": { "path": "" diff --git a/ocis-phoenix/config/example.yml b/web/config/example.yml similarity index 93% rename from ocis-phoenix/config/example.yml rename to web/config/example.yml index 15c2cde50a..986d9e9d73 100644 --- a/ocis-phoenix/config/example.yml +++ b/web/config/example.yml @@ -13,7 +13,7 @@ tracing: type: jaeger endpoint: localhost:6831 collector: http://localhost:14268/api/traces - service: phoenix + service: web asset: path: diff --git a/ocis-phoenix/docker/Dockerfile.linux.amd64 b/web/docker/Dockerfile.linux.amd64 similarity index 74% rename from ocis-phoenix/docker/Dockerfile.linux.amd64 rename to web/docker/Dockerfile.linux.amd64 index 303c0a3f96..24363fd052 100644 --- a/ocis-phoenix/docker/Dockerfile.linux.amd64 +++ b/web/docker/Dockerfile.linux.amd64 @@ -7,13 +7,13 @@ RUN apk update && \ echo 'hosts: files dns' >| /etc/nsswitch.conf LABEL maintainer="ownCloud GmbH " \ - org.label-schema.name="oCIS Phoenix" \ + org.label-schema.name="oCIS Web" \ org.label-schema.vendor="ownCloud GmbH" \ org.label-schema.schema-version="1.0" EXPOSE 9100 9104 -ENTRYPOINT ["/usr/bin/ocis-phoenix"] +ENTRYPOINT ["/usr/bin/web"] CMD ["server"] -COPY bin/ocis-phoenix /usr/bin/ocis-phoenix +COPY bin/ocis-web /usr/bin/ocis-web diff --git a/ocis-phoenix/docker/Dockerfile.linux.arm b/web/docker/Dockerfile.linux.arm similarity index 74% rename from ocis-phoenix/docker/Dockerfile.linux.arm rename to web/docker/Dockerfile.linux.arm index de4dc62fc0..af9d497141 100644 --- a/ocis-phoenix/docker/Dockerfile.linux.arm +++ b/web/docker/Dockerfile.linux.arm @@ -7,13 +7,13 @@ RUN apk update && \ echo 'hosts: files dns' >| /etc/nsswitch.conf LABEL maintainer="ownCloud GmbH " \ - org.label-schema.name="oCIS Phoenix" \ + org.label-schema.name="oCIS Web" \ org.label-schema.vendor="ownCloud GmbH" \ org.label-schema.schema-version="1.0" EXPOSE 9100 9104 -ENTRYPOINT ["/usr/bin/ocis-phoenix"] +ENTRYPOINT ["/usr/bin/ocis-web"] CMD ["server"] -COPY bin/ocis-phoenix /usr/bin/ocis-phoenix +COPY bin/ocis-web /usr/bin/ocis-web diff --git a/ocis-phoenix/docker/Dockerfile.linux.arm64 b/web/docker/Dockerfile.linux.arm64 similarity index 74% rename from ocis-phoenix/docker/Dockerfile.linux.arm64 rename to web/docker/Dockerfile.linux.arm64 index 39601d6990..ca2f2c3a3c 100644 --- a/ocis-phoenix/docker/Dockerfile.linux.arm64 +++ b/web/docker/Dockerfile.linux.arm64 @@ -7,13 +7,13 @@ RUN apk update && \ echo 'hosts: files dns' >| /etc/nsswitch.conf LABEL maintainer="ownCloud GmbH " \ - org.label-schema.name="oCIS Phoenix" \ + org.label-schema.name="oCIS Web" \ org.label-schema.vendor="ownCloud GmbH" \ org.label-schema.schema-version="1.0" EXPOSE 9100 9104 -ENTRYPOINT ["/usr/bin/ocis-phoenix"] +ENTRYPOINT ["/usr/bin/ocis-web"] CMD ["server"] -COPY bin/ocis-phoenix /usr/bin/ocis-phoenix +COPY bin/ocis-web /usr/bin/ocis-web diff --git a/web/docker/manifest.tmpl b/web/docker/manifest.tmpl new file mode 100644 index 0000000000..631d6c21c0 --- /dev/null +++ b/web/docker/manifest.tmpl @@ -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 diff --git a/ocis-phoenix/go.mod b/web/go.mod similarity index 94% rename from ocis-phoenix/go.mod rename to web/go.mod index 2687ddaed9..4284a87e7d 100644 --- a/ocis-phoenix/go.mod +++ b/web/go.mod @@ -1,4 +1,4 @@ -module github.com/owncloud/ocis/ocis-phoenix +module github.com/owncloud/ocis/web go 1.13 diff --git a/ocis-phoenix/go.sum b/web/go.sum similarity index 100% rename from ocis-phoenix/go.sum rename to web/go.sum diff --git a/ocis-phoenix/pkg/assets/assets.go b/web/pkg/assets/assets.go similarity index 95% rename from ocis-phoenix/pkg/assets/assets.go rename to web/pkg/assets/assets.go index b7dc8cdab2..b675e2ead2 100644 --- a/ocis-phoenix/pkg/assets/assets.go +++ b/web/pkg/assets/assets.go @@ -5,8 +5,8 @@ import ( "os" "path" - "github.com/owncloud/ocis/ocis-phoenix/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" + "github.com/owncloud/ocis/web/pkg/config" ) //go:generate go run github.com/UnnoTed/fileb0x embed.yml diff --git a/ocis-phoenix/pkg/assets/dummy.go b/web/pkg/assets/dummy.go similarity index 100% rename from ocis-phoenix/pkg/assets/dummy.go rename to web/pkg/assets/dummy.go diff --git a/ocis-phoenix/pkg/assets/embed.go b/web/pkg/assets/embed.go similarity index 100% rename from ocis-phoenix/pkg/assets/embed.go rename to web/pkg/assets/embed.go diff --git a/ocis-phoenix/pkg/assets/embed.yml b/web/pkg/assets/embed.yml similarity index 100% rename from ocis-phoenix/pkg/assets/embed.yml rename to web/pkg/assets/embed.yml diff --git a/ocis-phoenix/pkg/assets/option.go b/web/pkg/assets/option.go similarity index 93% rename from ocis-phoenix/pkg/assets/option.go rename to web/pkg/assets/option.go index 2bb00aa7ce..b87aae6e55 100644 --- a/ocis-phoenix/pkg/assets/option.go +++ b/web/pkg/assets/option.go @@ -1,8 +1,8 @@ package assets import ( - "github.com/owncloud/ocis/ocis-phoenix/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" + "github.com/owncloud/ocis/web/pkg/config" ) // Option defines a single option function. diff --git a/ocis-phoenix/pkg/command/health.go b/web/pkg/command/health.go similarity index 88% rename from ocis-phoenix/pkg/command/health.go rename to web/pkg/command/health.go index 0f25ffc489..a7cc87d331 100644 --- a/ocis-phoenix/pkg/command/health.go +++ b/web/pkg/command/health.go @@ -5,8 +5,8 @@ import ( "net/http" "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/web/pkg/config" + "github.com/owncloud/ocis/web/pkg/flagset" ) // Health is the entrypoint for the health command. diff --git a/ocis-phoenix/pkg/command/root.go b/web/pkg/command/root.go similarity index 83% rename from ocis-phoenix/pkg/command/root.go rename to web/pkg/command/root.go index 35e7ea2e08..0fca70bb92 100644 --- a/ocis-phoenix/pkg/command/root.go +++ b/web/pkg/command/root.go @@ -5,21 +5,21 @@ import ( "strings" "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/web/pkg/config" + "github.com/owncloud/ocis/web/pkg/flagset" + "github.com/owncloud/ocis/web/pkg/version" "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 { cfg := config.New() app := &cli.App{ - Name: "ocis-phoenix", + Name: "web", Version: version.String, - Usage: "Serve Phoenix for oCIS", + Usage: "Serve ownCloud Web for oCIS", Compiled: version.Compiled(), Authors: []*cli.Author{ @@ -53,7 +53,7 @@ func Execute() error { // NewLogger initializes a service-specific logger instance. func NewLogger(cfg *config.Config) log.Logger { return log.NewLogger( - log.Name("phoenix"), + log.Name("web"), log.Level(cfg.Log.Level), log.Pretty(cfg.Log.Pretty), log.Color(cfg.Log.Color), @@ -65,13 +65,13 @@ func ParseConfig(c *cli.Context, cfg *config.Config) error { logger := NewLogger(cfg) viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) - viper.SetEnvPrefix("PHOENIX") + viper.SetEnvPrefix("WEB") viper.AutomaticEnv() if c.IsSet("config-file") { viper.SetConfigFile(c.String("config-file")) } else { - viper.SetConfigName("phoenix") + viper.SetConfigName("web") viper.AddConfigPath("/etc/ocis") viper.AddConfigPath("$HOME/.ocis") diff --git a/ocis-phoenix/pkg/command/server.go b/web/pkg/command/server.go similarity index 92% rename from ocis-phoenix/pkg/command/server.go rename to web/pkg/command/server.go index e08896d6ce..1ad5b7452e 100644 --- a/ocis-phoenix/pkg/command/server.go +++ b/web/pkg/command/server.go @@ -16,11 +16,11 @@ import ( "github.com/oklog/run" openzipkin "github.com/openzipkin/zipkin-go" zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" - "github.com/owncloud/ocis/ocis-phoenix/pkg/config" - "github.com/owncloud/ocis/ocis-phoenix/pkg/flagset" - "github.com/owncloud/ocis/ocis-phoenix/pkg/metrics" - "github.com/owncloud/ocis/ocis-phoenix/pkg/server/debug" - "github.com/owncloud/ocis/ocis-phoenix/pkg/server/http" + "github.com/owncloud/ocis/web/pkg/config" + "github.com/owncloud/ocis/web/pkg/flagset" + "github.com/owncloud/ocis/web/pkg/metrics" + "github.com/owncloud/ocis/web/pkg/server/debug" + "github.com/owncloud/ocis/web/pkg/server/http" "go.opencensus.io/stats/view" "go.opencensus.io/trace" ) @@ -36,7 +36,7 @@ func Server(cfg *config.Config) *cli.Command { 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) }, @@ -136,7 +136,7 @@ func Server(cfg *config.Config) *cli.Command { logger.Err(err).Msg("error opening config file") return err } - json.Unmarshal(contents, &cfg.Phoenix.Config) + json.Unmarshal(contents, &cfg.Web.Config) } var ( diff --git a/ocis-phoenix/pkg/config/config.go b/web/pkg/config/config.go similarity index 86% rename from ocis-phoenix/pkg/config/config.go rename to web/pkg/config/config.go index fcd898ffe7..70476a849d 100644 --- a/ocis-phoenix/pkg/config/config.go +++ b/web/pkg/config/config.go @@ -37,8 +37,8 @@ type Asset struct { Path string } -// PhoenixConfig defines the available phoenix configuration for a dynamically rendered config.json. -type PhoenixConfig struct { +// WebConfig defines the available web configuration for a dynamically rendered config.json. +type WebConfig struct { Server string `json:"server,omitempty"` Theme string `json:"theme,omitempty"` Version string `json:"version,omitempty"` // TODO what is version used for? @@ -57,7 +57,7 @@ type OIDC struct { Scope string `json:"scope,omitempty"` } -// ExternalApp defines an external phoenix app. +// ExternalApp defines an external web app. // { // "name": "hello", // "path": "http://localhost:9105/hello.js", @@ -72,15 +72,15 @@ type ExternalApp struct { Config map[string]interface{} `json:"config,omitempty"` } -// ExternalAppConfig defines an external phoenix app configuration. +// ExternalAppConfig defines an external web app configuration. type ExternalAppConfig struct { URL string `json:"url,omitempty"` } -// Phoenix defines the available phoenix configuration. -type Phoenix struct { +// Web defines the available web configuration. +type Web struct { Path string - Config PhoenixConfig + Config WebConfig } // Config combines all available configuration parts. @@ -92,7 +92,7 @@ type Config struct { Tracing Tracing Asset Asset OIDC OIDC - Phoenix Phoenix + Web Web } // New initializes a new configuration with or without defaults. diff --git a/ocis-phoenix/pkg/flagset/flagset.go b/web/pkg/flagset/flagset.go similarity index 69% rename from ocis-phoenix/pkg/flagset/flagset.go rename to web/pkg/flagset/flagset.go index a832b4d2af..2d28807494 100644 --- a/ocis-phoenix/pkg/flagset/flagset.go +++ b/web/pkg/flagset/flagset.go @@ -2,7 +2,7 @@ package flagset import ( "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 @@ -12,21 +12,21 @@ func RootWithConfig(cfg *config.Config) []cli.Flag { Name: "log-level", Value: "info", Usage: "Set logging level", - EnvVars: []string{"PHOENIX_LOG_LEVEL"}, + EnvVars: []string{"WEB_LOG_LEVEL"}, Destination: &cfg.Log.Level, }, &cli.BoolFlag{ Name: "log-pretty", Value: true, Usage: "Enable pretty logging", - EnvVars: []string{"PHOENIX_LOG_PRETTY"}, + EnvVars: []string{"WEB_LOG_PRETTY"}, Destination: &cfg.Log.Pretty, }, &cli.BoolFlag{ Name: "log-color", Value: true, Usage: "Enable colored logging", - EnvVars: []string{"PHOENIX_LOG_COLOR"}, + EnvVars: []string{"WEB_LOG_COLOR"}, Destination: &cfg.Log.Color, }, } @@ -39,7 +39,7 @@ func HealthWithConfig(cfg *config.Config) []cli.Flag { Name: "debug-addr", Value: "0.0.0.0:9104", Usage: "Address to debug endpoint", - EnvVars: []string{"PHOENIX_DEBUG_ADDR"}, + EnvVars: []string{"WEB_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, }, } @@ -52,172 +52,172 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag { Name: "config-file", Value: "", Usage: "Path to config file", - EnvVars: []string{"PHOENIX_CONFIG_FILE"}, + EnvVars: []string{"WEB_CONFIG_FILE"}, Destination: &cfg.File, }, &cli.BoolFlag{ Name: "tracing-enabled", Usage: "Enable sending traces", - EnvVars: []string{"PHOENIX_TRACING_ENABLED"}, + EnvVars: []string{"WEB_TRACING_ENABLED"}, Destination: &cfg.Tracing.Enabled, }, &cli.StringFlag{ Name: "tracing-type", Value: "jaeger", Usage: "Tracing backend type", - EnvVars: []string{"PHOENIX_TRACING_TYPE"}, + EnvVars: []string{"WEB_TRACING_TYPE"}, Destination: &cfg.Tracing.Type, }, &cli.StringFlag{ Name: "tracing-endpoint", Value: "", Usage: "Endpoint for the agent", - EnvVars: []string{"PHOENIX_TRACING_ENDPOINT"}, + EnvVars: []string{"WEB_TRACING_ENDPOINT"}, Destination: &cfg.Tracing.Endpoint, }, &cli.StringFlag{ Name: "tracing-collector", Value: "", Usage: "Endpoint for the collector", - EnvVars: []string{"PHOENIX_TRACING_COLLECTOR"}, + EnvVars: []string{"WEB_TRACING_COLLECTOR"}, Destination: &cfg.Tracing.Collector, }, &cli.StringFlag{ Name: "tracing-service", - Value: "phoenix", + Value: "web", Usage: "Service name for tracing", - EnvVars: []string{"PHOENIX_TRACING_SERVICE"}, + EnvVars: []string{"WEB_TRACING_SERVICE"}, Destination: &cfg.Tracing.Service, }, &cli.StringFlag{ Name: "debug-addr", Value: "0.0.0.0:9104", Usage: "Address to bind debug server", - EnvVars: []string{"PHOENIX_DEBUG_ADDR"}, + EnvVars: []string{"WEB_DEBUG_ADDR"}, Destination: &cfg.Debug.Addr, }, &cli.StringFlag{ Name: "debug-token", Value: "", Usage: "Token to grant metrics access", - EnvVars: []string{"PHOENIX_DEBUG_TOKEN"}, + EnvVars: []string{"WEB_DEBUG_TOKEN"}, Destination: &cfg.Debug.Token, }, &cli.BoolFlag{ Name: "debug-pprof", Usage: "Enable pprof debugging", - EnvVars: []string{"PHOENIX_DEBUG_PPROF"}, + EnvVars: []string{"WEB_DEBUG_PPROF"}, Destination: &cfg.Debug.Pprof, }, &cli.BoolFlag{ Name: "debug-zpages", Usage: "Enable zpages debugging", - EnvVars: []string{"PHOENIX_DEBUG_ZPAGES"}, + EnvVars: []string{"WEB_DEBUG_ZPAGES"}, Destination: &cfg.Debug.Zpages, }, &cli.StringFlag{ Name: "http-addr", Value: "0.0.0.0:9100", Usage: "Address to bind http server", - EnvVars: []string{"PHOENIX_HTTP_ADDR"}, + EnvVars: []string{"WEB_HTTP_ADDR"}, Destination: &cfg.HTTP.Addr, }, &cli.StringFlag{ Name: "http-root", Value: "/", Usage: "Root path of http server", - EnvVars: []string{"PHOENIX_HTTP_ROOT"}, + EnvVars: []string{"WEB_HTTP_ROOT"}, Destination: &cfg.HTTP.Root, }, &cli.StringFlag{ Name: "http-namespace", Value: "com.owncloud.web", Usage: "Set the base namespace for the http namespace", - EnvVars: []string{"PHOENIX_NAMESPACE"}, + EnvVars: []string{"WEB_NAMESPACE"}, Destination: &cfg.HTTP.Namespace, }, &cli.IntFlag{ Name: "http-cache-ttl", Value: 604800, // 7 days Usage: "Set the static assets caching duration in seconds", - EnvVars: []string{"PHOENIX_CACHE_TTL"}, + EnvVars: []string{"WEB_CACHE_TTL"}, Destination: &cfg.HTTP.CacheTTL, }, &cli.StringFlag{ Name: "asset-path", Value: "", Usage: "Path to custom assets", - EnvVars: []string{"PHOENIX_ASSET_PATH"}, + EnvVars: []string{"WEB_ASSET_PATH"}, Destination: &cfg.Asset.Path, }, &cli.StringFlag{ Name: "web-config", Value: "", - Usage: "Path to phoenix config", - EnvVars: []string{"PHOENIX_WEB_CONFIG"}, - Destination: &cfg.Phoenix.Path, + Usage: "Path to web config", + EnvVars: []string{"WEB_CONFIG"}, + Destination: &cfg.Web.Path, }, &cli.StringFlag{ Name: "web-config-server", Value: "https://localhost:9200", Usage: "Server URL", - EnvVars: []string{"PHOENIX_WEB_CONFIG_SERVER"}, - Destination: &cfg.Phoenix.Config.Server, + EnvVars: []string{"WEB_CONFIG_SERVER"}, + Destination: &cfg.Web.Config.Server, }, &cli.StringFlag{ Name: "web-config-theme", Value: "owncloud", Usage: "Theme", - EnvVars: []string{"PHOENIX_WEB_CONFIG_THEME"}, - Destination: &cfg.Phoenix.Config.Theme, + EnvVars: []string{"WEB_CONFIG_THEME"}, + Destination: &cfg.Web.Config.Theme, }, &cli.StringFlag{ Name: "web-config-version", Value: "0.1.0", Usage: "Version", - EnvVars: []string{"PHOENIX_WEB_CONFIG_VERSION"}, - Destination: &cfg.Phoenix.Config.Version, + EnvVars: []string{"WEB_CONFIG_VERSION"}, + Destination: &cfg.Web.Config.Version, }, &cli.StringSliceFlag{ Name: "web-config-app", Value: cli.NewStringSlice("files", "media-viewer"), Usage: `--web-config-app files [--web-config-app draw-io]`, - EnvVars: []string{"PHOENIX_WEB_CONFIG_APPS"}, + EnvVars: []string{"WEB_CONFIG_APPS"}, }, &cli.StringFlag{ Name: "oidc-metadata-url", Value: "https://localhost:9200/.well-known/openid-configuration", Usage: "OpenID Connect metadata URL", - EnvVars: []string{"PHOENIX_OIDC_METADATA_URL"}, - Destination: &cfg.Phoenix.Config.OpenIDConnect.MetadataURL, + EnvVars: []string{"WEB_OIDC_METADATA_URL"}, + Destination: &cfg.Web.Config.OpenIDConnect.MetadataURL, }, &cli.StringFlag{ Name: "oidc-authority", Value: "https://localhost:9200", Usage: "OpenID Connect authority", // TODO rename to Issuer - EnvVars: []string{"PHOENIX_OIDC_AUTHORITY"}, - Destination: &cfg.Phoenix.Config.OpenIDConnect.Authority, + EnvVars: []string{"WEB_OIDC_AUTHORITY"}, + Destination: &cfg.Web.Config.OpenIDConnect.Authority, }, &cli.StringFlag{ Name: "oidc-client-id", - Value: "phoenix", + Value: "web", Usage: "OpenID Connect client ID", - EnvVars: []string{"PHOENIX_OIDC_CLIENT_ID"}, - Destination: &cfg.Phoenix.Config.OpenIDConnect.ClientID, + EnvVars: []string{"WEB_OIDC_CLIENT_ID"}, + Destination: &cfg.Web.Config.OpenIDConnect.ClientID, }, &cli.StringFlag{ Name: "oidc-response-type", Value: "code", Usage: "OpenID Connect response type", - EnvVars: []string{"PHOENIX_OIDC_RESPONSE_TYPE"}, - Destination: &cfg.Phoenix.Config.OpenIDConnect.ResponseType, + EnvVars: []string{"WEB_OIDC_RESPONSE_TYPE"}, + Destination: &cfg.Web.Config.OpenIDConnect.ResponseType, }, &cli.StringFlag{ Name: "oidc-scope", Value: "openid profile email", Usage: "OpenID Connect scope", - EnvVars: []string{"PHOENIX_OIDC_SCOPE"}, - Destination: &cfg.Phoenix.Config.OpenIDConnect.Scope, + EnvVars: []string{"WEB_OIDC_SCOPE"}, + Destination: &cfg.Web.Config.OpenIDConnect.Scope, }, } } diff --git a/ocis-phoenix/pkg/metrics/metrics.go b/web/pkg/metrics/metrics.go similarity index 96% rename from ocis-phoenix/pkg/metrics/metrics.go rename to web/pkg/metrics/metrics.go index 5f44e3a845..72a3eb202c 100644 --- a/ocis-phoenix/pkg/metrics/metrics.go +++ b/web/pkg/metrics/metrics.go @@ -5,7 +5,7 @@ var ( Namespace = "ocis" // Subsystem defines the subsystem for the defines metrics. - Subsystem = "phoenix" + Subsystem = "web" ) // Metrics defines the available metrics of this service. diff --git a/ocis-phoenix/pkg/middleware/silentrefresh.go b/web/pkg/middleware/silentrefresh.go similarity index 100% rename from ocis-phoenix/pkg/middleware/silentrefresh.go rename to web/pkg/middleware/silentrefresh.go diff --git a/ocis-phoenix/pkg/server/debug/option.go b/web/pkg/server/debug/option.go similarity index 94% rename from ocis-phoenix/pkg/server/debug/option.go rename to web/pkg/server/debug/option.go index 55b3f68367..e16759e767 100644 --- a/ocis-phoenix/pkg/server/debug/option.go +++ b/web/pkg/server/debug/option.go @@ -3,8 +3,8 @@ package debug import ( "context" - "github.com/owncloud/ocis/ocis-phoenix/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" + "github.com/owncloud/ocis/web/pkg/config" ) // Option defines a single option function. diff --git a/ocis-phoenix/pkg/server/debug/server.go b/web/pkg/server/debug/server.go similarity index 91% rename from ocis-phoenix/pkg/server/debug/server.go rename to web/pkg/server/debug/server.go index a6d41de2a9..0169cd831d 100644 --- a/ocis-phoenix/pkg/server/debug/server.go +++ b/web/pkg/server/debug/server.go @@ -4,9 +4,9 @@ import ( "io" "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/web/pkg/config" + "github.com/owncloud/ocis/web/pkg/version" ) // Server initializes the debug service and server. @@ -15,7 +15,7 @@ func Server(opts ...Option) (*http.Server, error) { return debug.NewService( debug.Logger(options.Logger), - debug.Name("phoenix"), + debug.Name("web"), debug.Version(version.String), debug.Address(options.Config.Debug.Addr), debug.Token(options.Config.Debug.Token), diff --git a/ocis-phoenix/pkg/server/http/option.go b/web/pkg/server/http/option.go similarity index 93% rename from ocis-phoenix/pkg/server/http/option.go rename to web/pkg/server/http/option.go index 360cf67500..30a824ff93 100644 --- a/ocis-phoenix/pkg/server/http/option.go +++ b/web/pkg/server/http/option.go @@ -4,9 +4,9 @@ import ( "context" "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/web/pkg/config" + "github.com/owncloud/ocis/web/pkg/metrics" ) // Option defines a single option function. diff --git a/ocis-phoenix/pkg/server/http/server.go b/web/pkg/server/http/server.go similarity index 80% rename from ocis-phoenix/pkg/server/http/server.go rename to web/pkg/server/http/server.go index 1d35592c0e..f69f22ed02 100644 --- a/ocis-phoenix/pkg/server/http/server.go +++ b/web/pkg/server/http/server.go @@ -1,11 +1,11 @@ package http 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/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. @@ -15,7 +15,7 @@ func Server(opts ...Option) (http.Service, error) { service := http.NewService( http.Logger(options.Logger), http.Namespace(options.Namespace), - http.Name("phoenix"), + http.Name("web"), http.Version(version.String), http.Address(options.Config.HTTP.Addr), http.Context(options.Context), @@ -31,9 +31,9 @@ func Server(opts ...Option) (http.Service, error) { middleware.NoCache, middleware.Cors, middleware.Secure, - phoenixmid.SilentRefresh, + webmid.SilentRefresh, middleware.Version( - "phoenix", + "web", version.String, ), middleware.Logger( diff --git a/ocis-phoenix/pkg/service/v0/instrument.go b/web/pkg/service/v0/instrument.go similarity index 91% rename from ocis-phoenix/pkg/service/v0/instrument.go rename to web/pkg/service/v0/instrument.go index a0316cbfec..45934e03a6 100644 --- a/ocis-phoenix/pkg/service/v0/instrument.go +++ b/web/pkg/service/v0/instrument.go @@ -3,7 +3,7 @@ package svc import ( "net/http" - "github.com/owncloud/ocis/ocis-phoenix/pkg/metrics" + "github.com/owncloud/ocis/web/pkg/metrics" ) // NewInstrument returns a service that instruments metrics. diff --git a/ocis-phoenix/pkg/service/v0/logging.go b/web/pkg/service/v0/logging.go similarity index 100% rename from ocis-phoenix/pkg/service/v0/logging.go rename to web/pkg/service/v0/logging.go diff --git a/ocis-phoenix/pkg/service/v0/option.go b/web/pkg/service/v0/option.go similarity index 94% rename from ocis-phoenix/pkg/service/v0/option.go rename to web/pkg/service/v0/option.go index 983c25af84..534ed9bd5e 100644 --- a/ocis-phoenix/pkg/service/v0/option.go +++ b/web/pkg/service/v0/option.go @@ -3,8 +3,8 @@ package svc import ( "net/http" - "github.com/owncloud/ocis/ocis-phoenix/pkg/config" "github.com/owncloud/ocis/ocis-pkg/log" + "github.com/owncloud/ocis/web/pkg/config" ) // Option defines a single option function. diff --git a/ocis-phoenix/pkg/service/v0/service.go b/web/pkg/service/v0/service.go similarity index 71% rename from ocis-phoenix/pkg/service/v0/service.go rename to web/pkg/service/v0/service.go index eea57c84a2..e2f58449ed 100644 --- a/ocis-phoenix/pkg/service/v0/service.go +++ b/web/pkg/service/v0/service.go @@ -11,9 +11,9 @@ import ( "time" "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/web/pkg/assets" + "github.com/owncloud/ocis/web/pkg/config" ) var ( @@ -34,7 +34,7 @@ func NewService(opts ...Option) Service { m := chi.NewMux() m.Use(options.Middleware...) - svc := Phoenix{ + svc := Web{ logger: options.Logger, config: options.Config, mux: m, @@ -48,31 +48,31 @@ func NewService(opts ...Option) Service { return svc } -// Phoenix defines implements the business logic for Service. -type Phoenix struct { +// Web defines implements the business logic for Service. +type Web struct { logger log.Logger config *config.Config mux *chi.Mux } // 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) } -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 // provide default ocis-web options - if p.config.Phoenix.Config.Options == nil { - p.config.Phoenix.Config.Options = make(map[string]interface{}) - p.config.Phoenix.Config.Options["hideSearchBar"] = true + if p.config.Web.Config.Options == nil { + p.config.Web.Config.Options = make(map[string]interface{}) + p.config.Web.Config.Options["hideSearchBar"] = true } - if p.config.Phoenix.Config.ExternalApps == nil { - p.config.Phoenix.Config.ExternalApps = []config.ExternalApp{ + if p.config.Web.Config.ExternalApps == nil { + p.config.Web.Config.ExternalApps = []config.ExternalApp{ { ID: "settings", 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 // TODO remove once https://github.com/golang/go/issues/27589 is fixed - if len(p.config.Phoenix.Config.Apps) == 0 { - p.config.Phoenix.Config.Apps = make([]string, 0) + if len(p.config.Web.Config.Apps) == 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 - 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(). Err(err). - Str("config", p.config.Phoenix.Path). - Msg("phoenix config doesn't exist") + Str("config", p.config.Web.Path). + 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 { p.logger.Fatal(). Err(err). - Str("config", p.config.Phoenix.Path). + Str("config", p.config.Web.Path). Msg("failed to read custom config") } return } // 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() if err != nil { @@ -127,7 +127,7 @@ func (p Phoenix) Config(w http.ResponseWriter, r *http.Request) { } // 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 if !strings.HasSuffix(rootWithSlash, "/") { diff --git a/ocis-phoenix/pkg/service/v0/tracing.go b/web/pkg/service/v0/tracing.go similarity index 100% rename from ocis-phoenix/pkg/service/v0/tracing.go rename to web/pkg/service/v0/tracing.go diff --git a/ocis-phoenix/pkg/version/version.go b/web/pkg/version/version.go similarity index 100% rename from ocis-phoenix/pkg/version/version.go rename to web/pkg/version/version.go diff --git a/web/reflex.conf b/web/reflex.conf new file mode 100644 index 0000000000..9869d95caf --- /dev/null +++ b/web/reflex.conf @@ -0,0 +1,2 @@ +# backend +-r '^(cmd|pkg)/.*\.go$' -R '^node_modules/' -s -- sh -c 'make bin/ocis-web-debug && bin/ocis-web-debug --log-level debug server --debug-pprof --debug-zpages --asset-path assets/' diff --git a/ocis-phoenix/templates/CONFIGURATION.tmpl b/web/templates/CONFIGURATION.tmpl similarity index 85% rename from ocis-phoenix/templates/CONFIGURATION.tmpl rename to web/templates/CONFIGURATION.tmpl index 566dfce13e..2876ca8e60 100644 --- a/ocis-phoenix/templates/CONFIGURATION.tmpl +++ b/web/templates/CONFIGURATION.tmpl @@ -3,7 +3,7 @@ title: "Configuration" date: "{{ date "2006-01-02T15:04:05-0700" now }}" weight: 20 geekdocRepo: https://github.com/owncloud/ocis -geekdocEditPath: edit/master/phoenix/templates +geekdocEditPath: edit/master/web/templates geekdocFilePath: CONFIGURATION.tmpl --- {{- define "options"}} @@ -33,7 +33,7 @@ $HOME/.ocis ./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`. @@ -48,12 +48,12 @@ If you prefer to configure the service with commandline flags you can see the av {{ $options := .Options -}} {{ range $com := .Commands }}{{ with (list $options $com) -}} {{ $c := last . -}} -{{ if eq $c.Name "phoenix" -}} +{{ if eq $c.Name "web" -}} ## Root Command {{ $c.Usage }} -Usage: `phoenix [global options] command [command options] [arguments...]` +Usage: `web [global options] command [command options] [arguments...]` {{ template "options" . -}} ## Sub Commands @@ -62,12 +62,12 @@ Usage: `phoenix [global options] command [command options] [arguments...]` {{ end -}} {{- range $com := .Commands }}{{ with (list $options $com) -}} {{- $c := last . }} -{{- if ne $c.Name "phoenix" -}} -### phoenix {{ $c.Name }} +{{- if ne $c.Name "web" -}} +### web {{ $c.Name }} {{ $c.Usage }} -Usage: `phoenix {{ $c.Name }} [command options] [arguments...]` +Usage: `web {{ $c.Name }} [command options] [arguments...]` {{ template "options" . }} {{- end -}} {{- end -}} diff --git a/ocis-phoenix/tools.go b/web/tools.go similarity index 100% rename from ocis-phoenix/tools.go rename to web/tools.go