Merge pull request #10399 from owncloud/web-extensions

feat: add web extensions to the ocis_full example
This commit is contained in:
Michael Barz
2024-10-23 16:58:35 +02:00
committed by GitHub
12 changed files with 167 additions and 34 deletions

View File

@@ -0,0 +1,16 @@
Enhancement: Add web extensions to the ocis_full example
We added some of the web extensions from ownCloud to the ocis_full docker compose example.
- importer
- draw-io
- external-sites
- json-viewer
- unzip
- progressbars
These can be enabled in the .env file one by one.
Read more about ocis extensions in https://github.com/owncloud/web-extensions/blob/main/README.md
https://github.com/owncloud/ocis/pull/10399

View File

@@ -114,6 +114,34 @@ SMTP_AUTHENTICATION=
# Allow insecure connections to the SMTP server. Defaults to false.
SMTP_INSECURE=
## oCIS Web Extensions ##
# It is possible to use the oCIS Web Extensions to add custom functionality to the oCIS frontend.
# For more details see https://github.com/owncloud/web-extensions/blob/main/README.md
# Enable this to create a new named volume
#EXTENSIONS=:web_extensions/extensions.yml
# Enable the desired extensions by uncommenting the following lines.
# Note: the leading colon is required to enable the service.
# Note: if you want to remove a web extension, you must delete the ocis-apps volume. It will be properly recreated on docker compose startup.
#UNZIP=:web_extensions/unzip.yml
#DRAWIO=:web_extensions/drawio.yml
#JSONVIEWER=:web_extensions/jsonviewer.yml
#PROGRESSBARS=:web_extensions/progressbars.yml
#EXTERNALSITES=:web_extensions/externalsites.yml
# External Sites needs additional config, see the following files for more details.
# - config/ocis/apps.yaml
# - config/ocis/csp.yaml
#IMPORTER=:web_extensions/importer.yml
# The importer needs additional config, see the following lines for more details.
## The docker image to be used for uppy companion.
# owncloud has built a container with public link import support.
COMPANION_IMAGE=
# Domain of Uppy Companion. Defaults to "companion.owncloud.test".
COMPANION_DOMAIN=
# Provider settings, see https://uppy.io/docs/companion/#provideroptions for reference.
# Empty by default, which disables providers.
COMPANION_ONEDRIVE_KEY=
COMPANION_ONEDRIVE_SECRET=
## Default Enabled Services ##
@@ -163,20 +191,6 @@ COLLABORA_SSL_VERIFICATION=false
#MONITORING=:monitoring_tracing/monitoring.yml
### Uppy Companion Settings ###
# Note: the leading colon is required to enable the service.
#CLOUD_IMPORTER=:cloudimporter.yml
## The docker image to be used for uppy companion.
# owncloud has built a container with public link import support.
COMPANION_IMAGE=
# Domain of Uppy Companion. Defaults to "companion.owncloud.test".
COMPANION_DOMAIN=
# Provider settings, see https://uppy.io/docs/companion/#provideroptions for reference.
# Empty by default, which disables providers.
COMPANION_ONEDRIVE_KEY=
COMPANION_ONEDRIVE_SECRET=
### Virusscanner Settings ###
# Note: the leading colon is required to enable the service.
#CLAMAV=:clamav.yml
@@ -208,4 +222,4 @@ INBUCKET_DOMAIN=
# This MUST be the last line as it assembles the supplemental compose files to be used.
# ALL supplemental configs must be added here, whether commented or not.
# Each var must either be empty or contain :path/file.yml
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${MONITORING:-}${CLOUD_IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${INBUCKET:-}
COMPOSE_FILE=docker-compose.yml${OCIS:-}${TIKA:-}${S3NG:-}${S3NG_MINIO:-}${COLLABORA:-}${MONITORING:-}${IMPORTER:-}${CLAMAV:-}${ONLYOFFICE:-}${INBUCKET:-}${EXTENSIONS:-}${UNZIP:-}${DRAWIO:-}${JSONVIEWER:-}${PROGRESSBARS:-}${EXTERNALSITES:-}

View File

@@ -0,0 +1,23 @@
importer:
config:
companionUrl: https://${COMPANION_DOMAIN|companion.owncloud.test}
supportedClouds:
- WebdavPublicLink
#- OneDrive # needs a client id and secret
#- GoogleDrive # needs a client id and secret and an addition to the DNS zone
external-sites:
config:
sites:
# For settings see: https://github.com/owncloud/web-extensions/tree/main/packages/web-app-external-sites
- name: ownCloud
url: "https://owncloud.dev"
target: embedded
color: "#0D856F"
icon: cloud
priority: 50
- name: Wikipedia
url: "https://www.wikipedia.org"
target: external
color: "#0D856F"
icon: book
priority: 51

View File

@@ -20,6 +20,8 @@ directives:
# In contrary to bash and docker the default is given after the | character
- 'https://${ONLYOFFICE_DOMAIN|onlyoffice.owncloud.test}/'
- 'https://${COLLABORA_DOMAIN|collabora.owncloud.test}/'
# This is needed for the external-sites web extension when embedding sites
- 'https://owncloud.dev'
img-src:
- '''self'''
- 'data:'

View File

@@ -1,18 +0,0 @@
web:
config:
external_apps:
- id: preview
path: web-app-preview
config:
mimeTypes:
- image/tiff
- image/bmp
- image/x-ms-bmp
- id: importer
path: web-app-importer
config:
companionUrl: https://${COMPANION_DOMAIN|companion.owncloud.test}
supportedClouds:
- WebdavPublicLink
#- OneDrive # needs a client id and secret
#- GoogleDrive # needs a client id and secret and an addition to the DNS zone

View File

@@ -0,0 +1,15 @@
---
services:
ocis:
depends_on:
drawio-init:
condition: service_completed_successfully
drawio-init:
image: owncloud/web-extensions:draw-io-0.2.0
user: root
volumes:
- ocis-apps:/apps
entrypoint:
- /bin/sh
command: ["-c", "cp -R /var/lib/nginx/html/draw-io/ /apps"]

View File

@@ -0,0 +1,7 @@
services:
ocis:
volumes:
- ocis-apps:/var/lib/ocis/web/assets/apps
volumes:
ocis-apps:

View File

@@ -0,0 +1,15 @@
---
services:
ocis:
depends_on:
externalsites-init:
condition: service_completed_successfully
externalsites-init:
image: owncloud/web-extensions:external-sites-0.2.0
user: root
volumes:
- ocis-apps:/apps
entrypoint:
- /bin/sh
command: ["-c", "cp -R /var/lib/nginx/html/external-sites/ /apps"]

View File

@@ -8,7 +8,19 @@ services:
ocis:
volumes:
# the cloud importer needs to be enabled in the web.yaml
- ./config/ocis/web.yaml:/etc/ocis/web.yaml
- ./config/ocis/apps.yaml:/etc/ocis/apps.yaml
depends_on:
importer-init:
condition: service_completed_successfully
importer-init:
image: owncloud/web-extensions:importer-0.1.0
user: root
volumes:
- ocis-apps:/apps
entrypoint:
- /bin/sh
command: [ "-c", "cp -R /var/lib/nginx/html/importer/ /apps" ]
companion:
image: ${COMPANION_IMAGE:-owncloud/uppy-companion:3.12.13-owncloud}

View File

@@ -0,0 +1,15 @@
---
services:
ocis:
depends_on:
jsonviewer-init:
condition: service_completed_successfully
jsonviewer-init:
image: owncloud/web-extensions:json-viewer-0.2.0
user: root
volumes:
- ocis-apps:/apps
entrypoint:
- /bin/sh
command: ["-c", "cp -R /var/lib/nginx/html/json-viewer/ /apps"]

View File

@@ -0,0 +1,15 @@
---
services:
ocis:
depends_on:
progressbars-init:
condition: service_completed_successfully
progressbars-init:
image: owncloud/web-extensions:progress-bars-0.2.0
user: root
volumes:
- ocis-apps:/apps
entrypoint:
- /bin/sh
command: ["-c", "cp -R /var/lib/nginx/html/progress-bars/ /apps"]

View File

@@ -0,0 +1,17 @@
---
services:
ocis:
depends_on:
unzip-init:
condition: service_completed_successfully
unzip-init:
image: owncloud/web-extensions:unzip-0.3.0
user: root
volumes:
- ocis-apps:/apps
entrypoint:
- /bin/sh
command: ["-c", "cp -R /var/lib/nginx/html/unzip/ /apps"]