We're looking to take the leap into OnlyOffice for a rather large implementation after evaluating the online offering and have wanted to get working under docker-compose as the scripts do not operate in our environment.
ur implementation relies on an Nginx proxy which speaks only to the Community Server via http but serves it to the public as HTTPS via letsencrypt certificates, and allows the containers themselves to communicate to each other via HTTP. We use the jwilder/nginx-proxy along with the letsencrypt companion on many other containers yet are facing issues with getting the Document server to load documents.
Our Docker-compose.yml is as follows:
- Code: Select all
version: '2'
services:
oo-db:
container_name: oo-db
restart: always
image: mariadb
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=cs
- MYSQL_USER=oo
- MYSQL_PASSWORD=userpassword
networks:
- proxy-tier
oo-ds-app:
container_name: oo-ds-app
restart: always
image: onlyoffice/documentserver
volumes:
- ./ds/logs:/var/log/onlyoffice
- ./ds/data:/var/www/onlyoffice/Data
- ./ds/fonts:/usr/share/fonts/truetype/custom
stdin_open: true
tty: true
networks:
- proxy-tier
oo-cs-app:
container_name: oo-cs-app
restart: always
image: onlyoffice/communityserver
ports:
- 5222:5222
volumes:
- ./cs/data:/var/www/onlyoffice/Data
#- ./db:/var/lib/mysql
- ./cs/logs:/var/log/onlyoffice
- ./ds/data:/var/www/onlyoffice/DocumentServerData
environment:
- DOCUMENT_SERVER_PORT_80_TCP_ADDR=oo-ds-app
- DOCKER_ENABLED=true
- VIRTUAL_HOST=host@hostname.com
- VIRTUAL_NETWORK=nginx-proxy
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=host.hostname.com
- LETSENCRYPT_EMAIL=user@hostname.com
- MAIL_SERVER_DB_HOST=oo-mail-app
- SERVER_HOST=oo-cs-app
- MYSQL_SERVER_HOST=oo-db
- MYSQL_SERVER_DB_NAME=cs
- MYSQL_SERVER_USER=oo
- MYSQL_SERVER_PASS=userpassword
- MYSQL_SERVER_PORT=3306
stdin_open: true
tty: true
networks:
- proxy-tier
oo-mail-app:
container_name: oo-mail-app
restart: always
image: onlyoffice/mailserver
hostname: mx.test.com
ports:
- 25:25
- 587:587
- 993:993
- 8081:8081
environment:
- CONFIGURATION_ONLY=YES
- USE_DOCKER=YES
volumes:
- ./mail/certs:/etc/pki/tls/mailserver
- ./mail/logs:/var/log
- ./mail/db:/var/lib/mysql
stdin_open: true
tty: true
privileged: true
networks:
- proxy-tier
networks:
proxy-tier:
external:
name: nginx-proxy
--
While this allows us to load the Community Server, the Document Server component displays an error when loading any documents that simply says "Unknown Error - Press OK to return to Document List". Additionally, in Settings -> Integration -> Document Service, the first option "Document Editing Service Address" only contains /OfficeWeb/apps/api/documents/api.js where as all the other options contain "http://oo-ds-app/<content>". When attempting to update this field, we are met with an error that says "API Service is not defined".
I am stumped before I am able to release this to my developers to begin their investigations on integration and implementation. Perhaps members of the community can also relay their experiences with using the LetsEncrypt Certificate service along with a Nginx Reverse Proxy on docker w/ docker-compose ?
Kind Regards, Dave