Files
ocis/deployments/examples/ocis_full/onlyoffice.yml

88 lines
3.8 KiB
YAML

---
services:
traefik:
networks:
ocis-net:
aliases:
- ${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}
collaboration-oo:
image: ${OCIS_DOCKER_IMAGE}:${OCIS_DOCKER_TAG}
networks:
ocis-net:
depends_on:
ocis:
condition: service_started
onlyoffice:
condition: service_healthy
command: ["collaboration", "server"]
environment:
COLLABORATION_GRPC_ADDR: 0.0.0.0:9301
COLLABORATION_HTTP_ADDR: 0.0.0.0:9300
MICRO_REGISTRY: "nats-js-kv"
MICRO_REGISTRY_ADDRESS: "ocis:9233"
COLLABORATION_WOPI_SRC: http://collaboration-oo:9300
COLLABORATION_APP_NAME: "OnlyOffice"
COLLABORATION_APP_PRODUCT: "OnlyOffice"
COLLABORATION_APP_ADDR: https://${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}
COLLABORATION_APP_ICON: https://${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}/web-apps/apps/documenteditor/main/resources/img/favicon.ico
COLLABORATION_APP_INSECURE: "${INSECURE:-true}"
COLLABORATION_CS3API_DATAGATEWAY_INSECURE: "${INSECURE:-true}"
COLLABORATION_LOG_LEVEL: ${LOG_LEVEL:-info}
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
volumes:
# configure the .env file to use own paths instead of docker internal volumes
- ${OCIS_CONFIG_DIR:-ocis-config}:/etc/ocis
labels:
- "traefik.enable=true"
- "traefik.http.routers.collaboration-oo.entrypoints=http"
- "traefik.http.routers.collaboration-oo.rule=Host(`collaboration-oo`)"
- "traefik.http.routers.collaboration-oo.service=collaboration-oo"
- "traefik.http.services.collaboration-oo.loadbalancer.server.port=9300"
logging:
driver: ${LOG_DRIVER:-local}
restart: always
onlyoffice:
# note, you also need to add a volume when using the enterprise version, see below
image: ${ONLYOFFICE_IMAGE:-onlyoffice/documentserver}:${ONLYOFFICE_DOCKER_TAG}
networks:
ocis-net:
entrypoint:
- /bin/sh
- /entrypoint-override.sh
environment:
WOPI_ENABLED: "true"
# self-signed certificates
USE_UNAUTHORIZED_STORAGE: ${INSECURE:-false}
JWT_ENABLED: ${ONLYOFFICE_JWT_ENABLED:-false}
REDIS_SERVER_HOST: ${ONLYOFFICE_REDIS_HOST:-localhost}
REDIS_SERVER_PORT: ${ONLYOFFICE_REDIS_PORT:-6379}
volumes:
# paths are relative to the main compose file
- ./config/onlyoffice/entrypoint-override.sh:/entrypoint-override.sh
- ./config/onlyoffice/local.json:/etc/onlyoffice/documentserver/local.dist.json
#
# Mount the license file only if using the enterprise edition.
# For details see: Registering your Enterprise Edition version:
# https://helpcenter.onlyoffice.com/installation/docs-enterprise-install-docker.aspx
#
# if deactivate is commented in .env, any source will point to the license file in the oo container
# if deactivate is uncommented (default) in .env, any source will point to /dev/null in the oo container
- ${ONLYOFFICE_LICENSE_LOCAL:-/dev/null}:${ONLYOFFICE_DEACTIVATE_LICENSE:-/var/www/onlyoffice/Data/license.lic:ro}
labels:
- "traefik.enable=true"
- "traefik.http.routers.onlyoffice.entrypoints=https"
- "traefik.http.routers.onlyoffice.rule=Host(`${ONLYOFFICE_DOMAIN:-onlyoffice.owncloud.test}`)"
- "traefik.http.routers.onlyoffice.tls.certresolver=http"
- "traefik.http.routers.onlyoffice.service=onlyoffice"
- "traefik.http.services.onlyoffice.loadbalancer.server.port=80"
# websockets can't be opened when this is omitted
- "traefik.http.middlewares.onlyoffice.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.onlyoffice.middlewares=onlyoffice"
logging:
driver: ${LOG_DRIVER:-local}
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/hosting/discovery"]