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

Phoenix frontend deployment #16

Open
PVince81 opened this issue Dec 2, 2019 · 1 comment
Open

Phoenix frontend deployment #16

PVince81 opened this issue Dec 2, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@PVince81
Copy link

PVince81 commented Dec 2, 2019

We should provide a way to setup the new (Phoenix frontend)[https://github.com/owncloud/phoenix].

The way I see it this should be a different role, as this can also be run on a different machine.

There are at least three ways to deploy Phoenix:

Install as an app

  • enable Phoenix as an app
  • some config tweaks needed, see below (to be confirmed)

Install on the same host

  • have the web server serve the Phoenix files (JS bundle + config.json)
  • might require config tweaks, see below

Install Phoenix on a separate host

  • setup ownCloud with oauth2 app enabled
  • adjust config.php settings, especially CORS (see script below)
  • Phoenix needs a web server to serve the main JS bundle and config.json, there are no server side logic.
    • should we use Apache there ?
    • or use ocis-phoenix directly as go binary?

Here is my local script to automatically setup OC for Phoenix development:

#!/bin/bash

OCDIR="/srv/www/htdocs/owncloud"
DATADIR="$OCDIR/data"
OCC="sudo -uwwwrun ./occ"

HOSTNAME=phoenixhost.local
PHOENIX_HOSTNAME=$HOSTNAME:8300

PHOENIX_CLIENTID=***REMOVED***
PHOENIX_CLIENTSECRET=***REMOVED***

cd "$OCDIR"

echo Setting up ownCloud for host name "$HOSTNAME" to connect with Phoenix on "${PHOENIX_HOSTNAME}"

$OCC config:system:set overwrite.cli.url --value="['http://$HOSTNAME/owncloud']"

$OCC config:system:set trusted_domains --type=json --value="[\"${HOSTNAME}\"]"
$OCC config:system:set cors.allowed-domains --type=json --value="[\"http://${PHOENIX_HOSTNAME}\", \"http://localhost:9876\"]"
$OCC config:system:set dav.enable.tech_preview --type=boolean --value=true
$OCC config:system:set phoenix.baseUrl --type=string --value="http://${PHOENIX_HOSTNAME}"

$OCC app:enable oauth2

$OCC oauth2:add-client "Phoenix" "${PHOENIX_CLIENTID}" "${PHOENIX_CLIENTSECRET}" "http://${PHOENIX_HOSTNAME}/oidc-callback.html" 

echo Please copy the OAuth2 client id into Phoenix\'s config.json: "$PHOENIX_CLIENTID"

To get an oauth2 secret, I had to first do the oauth2 pairing manually, then I looked up the client id and secret in the database to reuse in this script.

On the Phoenix side, config.json:

{
  "server" : "http://phoenixhost.local/owncloud/",
  "theme": "owncloud",
  "version": "0.1.0",
  "auth": {
    "clientId": "***REMOVED**",
    "url": "http://phoenixhost.local/owncloud/index.php/apps/oauth2/api/v1/token",
    "authUrl": "http://phoenixhost.local/owncloud/index.php/apps/oauth2/authorize"
  },
  "apps" : ["files"]
}

Connecting to OCIS

  • ability to connect Phoenix to an ocis-backend instead of regular ownCloud

Other

  • Optionally/Later: Phoenix should also be deployable with OpenIDConnect (I have no experience there)
@enbrnz
Copy link
Contributor

enbrnz commented Oct 29, 2020

Install as an app

* enable Phoenix as an app

* some config tweaks needed, see below (to be confirmed)

Don't think this is possible. We need to create a new role for phoenix deployment.

@enbrnz enbrnz added the enhancement New feature or request label Oct 29, 2020
@enbrnz enbrnz self-assigned this Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants