Skip to content

Commit

Permalink
Merge pull request #10399 from owncloud/web-extensions
Browse files Browse the repository at this point in the history
feat: add web extensions to the ocis_full example
  • Loading branch information
micbar authored Oct 23, 2024
2 parents a12384d + d65e68f commit 512f062
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 34 deletions.
16 changes: 16 additions & 0 deletions changelog/unreleased/web-extensions-example.md
Original file line number Diff line number Diff line change
@@ -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
44 changes: 29 additions & 15 deletions deployments/examples/ocis_full/.env
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:-}
23 changes: 23 additions & 0 deletions deployments/examples/ocis_full/config/ocis/apps.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions deployments/examples/ocis_full/config/ocis/csp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:'
Expand Down
18 changes: 0 additions & 18 deletions deployments/examples/ocis_full/config/ocis/web.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions deployments/examples/ocis_full/web_extensions/drawio.yml
Original file line number Diff line number Diff line change
@@ -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"]
7 changes: 7 additions & 0 deletions deployments/examples/ocis_full/web_extensions/extensions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
ocis:
volumes:
- ocis-apps:/var/lib/ocis/web/assets/apps

volumes:
ocis-apps:
15 changes: 15 additions & 0 deletions deployments/examples/ocis_full/web_extensions/externalsites.yml
Original file line number Diff line number Diff line change
@@ -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"]
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
15 changes: 15 additions & 0 deletions deployments/examples/ocis_full/web_extensions/jsonviewer.yml
Original file line number Diff line number Diff line change
@@ -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"]
15 changes: 15 additions & 0 deletions deployments/examples/ocis_full/web_extensions/progressbars.yml
Original file line number Diff line number Diff line change
@@ -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"]
17 changes: 17 additions & 0 deletions deployments/examples/ocis_full/web_extensions/unzip.yml
Original file line number Diff line number Diff line change
@@ -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"]


0 comments on commit 512f062

Please sign in to comment.