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

Add Uppy Companion to wopi example #6702

Merged
merged 2 commits into from
Feb 6, 2024
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
3 changes: 3 additions & 0 deletions deployments/continuous-deployment-config/ocis_wopi/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
TRAEFIK_ACME_MAIL: [email protected]
OCIS_DOCKER_TAG: latest
OCIS_DOMAIN: ocis.ocis-wopi.daily.owncloud.works
COMPANION_DOMAIN: companion.ocis-wopi.daily.owncloud.works
COMPANION_WEB_CONFIG_FILE_NAME: web-daily.yaml
COMPANION_IMAGE: owncloud/uppy-companion:3.12.13-owncloud
WOPISERVER_DOMAIN: wopiserver.ocis-wopi.daily.owncloud.works
COLLABORA_DOMAIN: collabora.ocis-wopi.daily.owncloud.works
ONLYOFFICE_DOMAIN: onlyoffice.ocis-wopi.daily.owncloud.works
Expand Down
3 changes: 3 additions & 0 deletions deployments/continuous-deployment-config/ocis_wopi/latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
TRAEFIK_ACME_MAIL: [email protected]
OCIS_DOCKER_TAG: latest
OCIS_DOMAIN: ocis.ocis-wopi.latest.owncloud.works
COMPANION_DOMAIN: companion.ocis-wopi.latest.owncloud.works
COMPANION_WEB_CONFIG_FILE_NAME: web-latest.yaml
COMPANION_IMAGE: owncloud/uppy-companion:3.12.13-owncloud
WOPISERVER_DOMAIN: wopiserver.ocis-wopi.latest.owncloud.works
COLLABORA_DOMAIN: collabora.ocis-wopi.latest.owncloud.works
ONLYOFFICE_DOMAIN: onlyoffice.ocis-wopi.latest.owncloud.works
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
TRAEFIK_ACME_MAIL: [email protected]
OCIS_DOCKER_TAG: 4.0.0
OCIS_DOMAIN: ocis.ocis-wopi.released.owncloud.works
COMPANION_DOMAIN: companion.ocis-wopi.released.owncloud.works
COMPANION_IMAGE: owncloud/uppy-companion:3.12.13-owncloud
COMPANION_WEB_CONFIG_FILE_NAME: web-released.yaml
WOPISERVER_DOMAIN: wopiserver.ocis-wopi.released.owncloud.works
COLLABORA_DOMAIN: collabora.ocis-wopi.released.owncloud.works
ONLYOFFICE_DOMAIN: onlyoffice.ocis-wopi.released.owncloud.works
Expand Down
11 changes: 10 additions & 1 deletion deployments/examples/ocis_wopi/.env
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@ ONLYOFFICE_DOMAIN=
# Inbucket / Mail domain. Defaults to "mail.owncloud.test"
INBUCKET_DOMAIN=

### Apache Tika Content analysis toolkit
### Apache Tika Content analysis toolkit ###
# Set the desired docker image tag or digest, defaults to "latest"
TIKA_IMAGE=

# If you want to use debugging and tracing with this stack,
# you need uncomment following line. Please see documentation at
# https://owncloud.dev/ocis/deployment/monitoring-tracing/
#COMPOSE_FILE=docker-compose.yml:monitoring_tracing/docker-compose-additions.yml

### Uppy Companion settings ###
# Domain of Uppy Companion. Defaults to "companion.owncloud.test"
COMPANION_IMAGE=
COMPANION_DOMAIN=
COMPANION_WEB_CONFIG_FILE_NAME=
# Provider settings, see https://uppy.io/docs/companion/#provideroptions for reference. Empty by default, which disables providers.
COMPANION_ONEDRIVE_KEY=
COMPANION_ONEDRIVE_SECRET=
18 changes: 18 additions & 0 deletions deployments/examples/ocis_wopi/config/ocis/web-daily.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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.ocis-wopi.daily.owncloud.works
supportedClouds:
- WebdavPublicLink
#- OneDrive # needs a client id and secret
#- GoogleDrive # needs a client id and secret and an addition to the DNS zone
18 changes: 18 additions & 0 deletions deployments/examples/ocis_wopi/config/ocis/web-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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.ocis-wopi.latest.owncloud.works
supportedClouds:
- WebdavPublicLink
#- OneDrive # needs a client id and secret
#- GoogleDrive # needs a client id and secret and an addition to the DNS zone
18 changes: 18 additions & 0 deletions deployments/examples/ocis_wopi/config/ocis/web-released.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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.ocis-wopi.released.owncloud.works
supportedClouds:
- WebdavPublicLink
#- OneDrive # needs a client id and secret
#- GoogleDrive # needs a client id and secret and an addition to the DNS zone
29 changes: 29 additions & 0 deletions deployments/examples/ocis_wopi/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ services:
- ${WOPISERVER_DOMAIN:-wopiserver.owncloud.test}
- ${COLLABORA_DOMAIN:-collabora.owncloud.test}
- ${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}
- ${COMPANION_DOMAIN:-companion.owncloud.test}
command:
- "--log.level=${TRAEFIK_LOG_LEVEL:-ERROR}"
# letsencrypt configuration
Expand Down Expand Up @@ -89,6 +90,7 @@ services:
NATS_NATS_PORT: 9233
volumes:
- ./config/ocis/app-registry.yaml:/etc/ocis/app-registry.yaml
- ./config/ocis/${COMPANION_WEB_CONFIG_FILE_NAME:-web.yaml}:/etc/ocis/web.yaml
- ocis-config:/etc/ocis
- ocis-data:/var/lib/ocis
labels:
Expand Down Expand Up @@ -245,6 +247,32 @@ services:
ocis-net:
restart: always

companion:
image: ${COMPANION_IMAGE:-transloadit/companion:4.5.1}
networks:
ocis-net:
environment:
NODE_ENV: production
NODE_TLS_REJECT_UNAUTHORIZED: 0
COMPANION_DATADIR: /tmp/companion/
COMPANION_DOMAIN: ${COMPANION_DOMAIN:-companion.owncloud.test}
COMPANION_PROTOCOL: https
COMPANION_UPLOAD_URLS: "^https://${OCIS_DOMAIN:-ocis.owncloud.test}/"
COMPANION_ONEDRIVE_KEY: "${COMPANION_ONEDRIVE_KEY}"
COMPANION_ONEDRIVE_SECRET: "${COMPANION_ONEDRIVE_SECRET}"
volumes:
- companion-data:/tmp/companion/
labels:
- "traefik.enable=true"
- "traefik.http.routers.companion.entrypoints=https"
- "traefik.http.routers.companion.rule=Host(`${COMPANION_DOMAIN:-companion.owncloud.test}`)"
- "traefik.http.routers.companion.tls.certresolver=http"
- "traefik.http.routers.companion.service=companion"
- "traefik.http.services.companion.loadbalancer.server.port=3020"
logging:
driver: "local"
restart: always

inbucket:
image: inbucket/inbucket
networks:
Expand Down Expand Up @@ -273,6 +301,7 @@ volumes:
ocis-config:
ocis-data:
wopi-recovery:
companion-data:

networks:
ocis-net: