Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bring back oc10 app release #4427

Merged
merged 10 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions Makefile.release
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ app_name=phoenix
cur_dir=$(CURDIR)
dist_dir=$(CURDIR)/dist

occ=$(CURDIR)/../../occ
private_key=$(HOME)/.owncloud/certificates/$(app_name).key
certificate=$(HOME)/.owncloud/certificates/$(app_name).crt
sign=$(occ) integrity:sign-app --privateKey="$(private_key)" --certificate="$(certificate)"
sign_skip_msg="Skipping signing, either no key and certificate found in $(private_key) and $(certificate) or occ can not be found at $(occ)"
ifneq (,$(wildcard $(private_key)))
ifneq (,$(wildcard $(certificate)))
ifneq (,$(wildcard $(occ)))
CAN_SIGN=true
endif
endif
endif

.DEFAULT_GOAL := build-release

.PHONY: build-release
Expand Down Expand Up @@ -36,13 +49,36 @@ copy-htaccess:
cp .htaccess $(dist_dir)

.PHONY: package
package: create-release-folder create-package
package: create-release-folder create-packages

.PHONY: create-release-folder
create-release-folder:
rm -rf $(CURDIR)/release
mkdir $(CURDIR)/release

.PHONY: create-package
create-package:
.PHONY: create-packages
micbar marked this conversation as resolved.
Show resolved Hide resolved
create-packages: package-plain package-ocx

.PHONY: package-plain
package-plain:
cd $(dist_dir) && tar -czf $(CURDIR)/release/$(app_name).tar.gz -C $(dist_dir) * .htaccess

.PHONY: package-ocx
package-ocx: sign ocx-app-config ocx-app-bundle

.PHONY: sign
sign:
ifdef CAN_SIGN
$(sign) --path="$(dist_dir)"
else
@echo $(sign_skip_msg)
endif

.PHONY: ocx-app-config
ocx-app-config:
cp -R appinfo $(dist_dir)
cp -R img $(dist_dir)

.PHONY: ocx-app-bundle
ocx-app-bundle:
tar -czf $(CURDIR)/release/$(app_name)-app.tar.gz --transform='s,dist,phoenix,' dist
20 changes: 20 additions & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<info>
<id>oc-web</id>
<name>ownCloud Web</name>
<summary>Next generation user interface for ownCloud</summary>
<description>
Next generation user interface for ownCloud based on vue.js.
This is an early release with known limitations and missing features.

Please, report any findings in https://github.com/owncloud/phoenix/issues
</description>
<licence>AGPLv3</licence>
<author>ownCloud</author>
<version>1.0.0</version>
LukasHirt marked this conversation as resolved.
Show resolved Hide resolved
<category>tools</category>
<dependencies>
<owncloud min-version="10.6" max-version="10" />
</dependencies>
<screenshot>https://user-images.githubusercontent.com/25989331/101360859-80185a80-389e-11eb-9b96-185aee559d3f.png</screenshot>
</info>
5 changes: 5 additions & 0 deletions changelog/unreleased/app-build-artifact
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add oc10 app build artifact

We've added a build step to the release process which creates an ownCloud Web bundle which can be deployed as an app to ownCloud 10.

https://github.com/owncloud/phoenix/pull/4427
10 changes: 10 additions & 0 deletions docs/deployments/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Deployments"
date: 2018-05-02T00:00:00+00:00
weight: 55
geekdocRepo: https://github.com/owncloud/phoenix
geekdocEditPath: edit/master/docs/deployments
geekdocFilePath: _index.md
---

Showcases of different scenarios of deploying ownCloud Web.
68 changes: 68 additions & 0 deletions docs/deployments/oc10-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: "Deploy as an app in ownCloud 10"
date: 2018-05-02T00:00:00+00:00
weight: 1
geekdocRepo: https://github.com/owncloud/phoenix
geekdocEditPath: edit/master/docs/deployments
geekdocFilePath: oc10-app.md
---

{{< toc >}}

One of the build artifacts of the ownCloud Web is a ownCloud 10 app bundle.

## Prerequisites
- Running [ownCloud 10 server](https://owncloud.com/download-server/) with version 10.6
- Installed [oauth2 app](https://marketplace.owncloud.com/apps/oauth2)

## Deploying ownCloud Web
To download the ownCloud Web, go to https://github.com/owncloud/phoenix/releases and pick your desired version. In the release, you will find a file called `phoenix-app.tar.gz`.
micbar marked this conversation as resolved.
Show resolved Hide resolved
Download this file and move it into the `apps` folder in your ownCloud 10 server.

{{< hint info >}}
The app bundle is provided only from version 1.0.0
LukasHirt marked this conversation as resolved.
Show resolved Hide resolved
{{< /hint >}}

To unpack the app, run the following command:
```bash
tar -xzf phoenix.tar.gz && rm -Rf phoenix-app.tar.gz
```

Next step is to enable the app:
```bash
cd ../ && occ apps:enable phoenix
```

## Configure oauth2
In the `Admin` of ownCloud 10, head into `User Authentication` and add a new client with arbitrary name and redirection URL `https://<your-owncloud-server>/apps/phoenix/oidc-callback.html`.

## Configure ownCloud 10
To display ownCloud Web in the app switcher and to redirect all private and public links to the new WebUI, add the following config into `config/config.php`:

```php
'phoenix.baseUrl' => 'https://<your-owncloud-server>/apps/phoenix',
```

## Configure ownCloud Web
There are a few config values which need to be set in order for ownCloud Web to work correctly. Navigate into `apps/phoenix` and adjust `config.json` according to the following example:

```json
{
"server" : "https://<your-owncloud-server>", // ownCloud 10 server address
"theme": "owncloud", // Theme to be used in ownCloud Web pointing to a json file inside of `themes` folder
"auth": {
"clientId": "<client-id-from-oauth2>", // Client ID received when adding ownCloud Web in the `User Authentication` section in `Admin`
"url": "https://<your-owncloud-server>/index.php/apps/oauth2/api/v1/token",
"authUrl": "https://<your-owncloud-server>/index.php/apps/oauth2/authorize"
},
"apps" : [ // List of extensions to be loaded
"files"
],
"applications" : [] // Apps to be displayed in the application switcher
}
```

## Accessing ownCloud Web
After following all the steps, you should see a new entry in the application switcher called `New Design` which points to the ownCloud web.

{{< figure src="/phoenix/static/application-switcher-oc10.jpg" >}}
Binary file added docs/static/application-switcher-oc10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 4 additions & 63 deletions img/app.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.