Skip to content

Commit

Permalink
Merge pull request #9131 from owncloud/backport-wopi-example
Browse files Browse the repository at this point in the history
Backport wopi example
  • Loading branch information
micbar authored May 10, 2024
2 parents 86ec03d + a4eb346 commit bc5ab41
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 75 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-wopi-example.md
Original file line number Diff line number Diff line change
@@ -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

This file was deleted.

18 changes: 0 additions & 18 deletions deployments/examples/ocis_wopi/config/ocis/web-latest.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions deployments/examples/ocis_wopi/config/ocis/web-released.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 28 additions & 17 deletions deployments/examples/ocis_wopi/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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}
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down
30 changes: 28 additions & 2 deletions docs/ocis/deployment/ocis_wopi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" >}})

Expand Down Expand Up @@ -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=
Expand All @@ -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"
Expand All @@ -95,14 +98,35 @@ 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=

### 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`.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit bc5ab41

Please sign in to comment.