Merge pull request #9131 from owncloud/backport-wopi-example

Backport wopi example
This commit is contained in:
Michael Barz authored and GitHub committed 2024-05-10 15:19:44 +02:00
commit bc5ab41402
7 files changed
+62 -75

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
Bugfix: Service startup of WOPI example
We fixed a bug in the service startup of the appprovider-onlyoffice in the ocis_wopi deployment example.
https://github.com/owncloud/ocis/pull/9127
@@ -1,19 +0,0 @@
#!/bin/sh
set -e
apk add curl
#TODO: app driver itself should try again until OnlyOffice is up...
retries=10
while [[ $retries -gt 0 ]]; do
if curl --silent --show-error --fail http://onlyoffice/hosting/discovery > /dev/null; then
ocis app-provider server
else
echo "OnlyOffice is not yet available, trying again in 10 seconds"
sleep 10
retries=$((retries - 1))
fi
done
echo 'OnlyOffice was not available after 100 seconds'
exit 1
@@ -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.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
@@ -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.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
@@ -11,7 +11,7 @@ web:
- id: importer
path: web-app-importer
config:
companionUrl: https://companion.ocis-wopi.daily.owncloud.works
companionUrl: https://${COMPANION_DOMAIN|companion.owncloud.test}
supportedClouds:
- WebdavPublicLink
#- OneDrive # needs a client id and secret
@@ -36,7 +36,7 @@ services:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock:ro"
- "certs:/certs"
labels:
- "traefik.enable=${TRAEFIK_DASHBOARD:-false}"
@@ -47,7 +47,7 @@ services:
- "traefik.http.routers.traefik.tls.certresolver=http"
- "traefik.http.routers.traefik.service=api@internal"
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
ocis:
@@ -90,7 +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
- ./config/ocis/web.yaml:/etc/ocis/web.yaml
- ocis-config:/etc/ocis
- ocis-data:/var/lib/ocis
labels:
@@ -101,7 +101,7 @@ services:
- "traefik.http.routers.ocis.service=ocis"
- "traefik.http.services.ocis.loadbalancer.server.port=9200"
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
ocis-appprovider-collabora:
@@ -110,6 +110,7 @@ services:
ocis-net:
command: app-provider server
environment:
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
# use the internal service name of the gateway
REVA_GATEWAY: ${REVA_GATEWAY:-com.owncloud.api.gateway}
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
@@ -129,19 +130,21 @@ services:
volumes:
- ocis-config:/etc/ocis
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
depends_on:
ocis:
condition: service_started
collabora:
condition: service_healthy
ocis-appprovider-onlyoffice:
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
networks:
ocis-net:
user: "0" # needed for apk add in entrypoint script
entrypoint:
- /bin/sh
- /entrypoint-override.sh
#command: app-provider server
command: app-provider server
environment:
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
# use the internal service name of the gateway
REVA_GATEWAY: ${REVA_GATEWAY:-com.owncloud.api.gateway}
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
@@ -159,11 +162,15 @@ services:
# share the registry with the ocis container
MICRO_REGISTRY_ADDRESS: ocis:9233
volumes:
- ./config/ocis-appprovider-onlyoffice/entrypoint-override.sh:/entrypoint-override.sh
- ocis-config:/etc/ocis
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
depends_on:
ocis:
condition: service_started
onlyoffice:
condition: service_healthy
wopiserver:
image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-v10.3.0}
@@ -188,7 +195,7 @@ services:
- "traefik.http.routers.wopiserver.service=wopiserver"
- "traefik.http.services.wopiserver.loadbalancer.server.port=8880"
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
collabora:
@@ -211,8 +218,10 @@ services:
- "traefik.http.routers.collabora.service=collabora"
- "traefik.http.services.collabora.loadbalancer.server.port=9980"
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9980/hosting/discovery"]
onlyoffice:
image: onlyoffice/documentserver:7.5.0
@@ -238,8 +247,10 @@ services:
- "traefik.http.middlewares.onlyoffice.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.onlyoffice.middlewares=onlyoffice"
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/hosting/discovery"]
tika:
image: ${TIKA_IMAGE:-apache/tika:latest-full}
@@ -270,7 +281,7 @@ services:
- "traefik.http.routers.companion.service=companion"
- "traefik.http.services.companion.loadbalancer.server.port=3020"
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
inbucket:
@@ -293,7 +304,7 @@ services:
- "traefik.http.routers.inbucket.service=inbucket"
- "traefik.http.services.inbucket.loadbalancer.server.port=9000"
logging:
driver: "local"
driver: ${LOG_DRIVER:-local}
restart: always
volumes:
+28 -2
View File
@@ -41,6 +41,7 @@ The last four containers are the WOPI server, Collabora and OnlyOffice.
* onlyoffice.* for serving OnlyOffice
* wopiserver.* for serving the WOPI server
* traefik.* for serving the Traefik dashboard
* companion.* for serving the uppy companion app
See also [example server setup]({{< ref "preparing_server" >}})
@@ -68,7 +69,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin" (written as: "admin:admin").
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
@@ -83,6 +84,8 @@ See also [example server setup]({{< ref "preparing_server" >}})
# The demo users should not be created on a production instance
# because their passwords are public. Defaults to "false".
DEMO_USERS=
# Log level for oCIS. Defaults to "info".
OCIS_LOG_LEVEL=
### Wopi server settings ###
# cs3org wopi server version. Defaults to "v8.3.3"
@@ -95,7 +98,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
### Collabora settings ###
# Domain of Collabora, where you can find the frontend. Defaults to "collabora.owncloud.test"
COLLABORA_DOMAIN=
# Admin user for Collabora. Defaults to blank, provide one to enable access
# Admin user for Collabora. Defaults to blank, provide one to enable access. Collabora Admin Panel URL: https://{COLLABORA_DOMAIN}/browser/dist/admin/admin.html
COLLABORA_ADMIN_USER=
# Admin password for Collabora. Defaults to blank, provide one to enable access
COLLABORA_ADMIN_PASSWORD=
@@ -103,6 +106,27 @@ See also [example server setup]({{< ref "preparing_server" >}})
### OnlyOffice settings ###
# Domain of OnlyOffice, where you can find the frontend. Defaults to "onlyoffice.owncloud.test"
ONLYOFFICE_DOMAIN=
### Email / Inbucket settings ###
# Inbucket / Mail domain. Defaults to "mail.owncloud.test"
INBUCKET_DOMAIN=
### 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=
# Provider settings, see https://uppy.io/docs/companion/#provideroptions for reference. Empty by default, which disables providers.
COMPANION_ONEDRIVE_KEY=
COMPANION_ONEDRIVE_SECRET=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
@@ -152,6 +176,8 @@ On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to
127.0.0.1 collabora.owncloud.test
127.0.0.1 onlyoffice.owncloud.test
127.0.0.1 wopiserver.owncloud.test
127.0.0.1 mail.owncloud.test
127.0.0.1 companion.owncloud.test
```
After that you're ready to start the application stack: