Skip to content

Commit a3f20d3

Browse files
authored
[tests-only][full-ci]Added docker compose for colabora and onlyoffice (#9265)
* Added services for collabora * Added services for only office * Fix blocked mixed content through traefik config in onlyoffice * Make the value with double quotation * Added e2e tests for collabora * Added e2e tests for only office without checking content * Added tests in collabora and office both * Review Address: viktor * Change dependencies for services * Change after the public link open automatically * Review address and rebase * change dependencies * Review changes * Review changes * Review address- 2 * change feature name- review
1 parent d2e70a2 commit a3f20d3

File tree

12 files changed

+605
-22
lines changed

12 files changed

+605
-22
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
set -e
3+
4+
apk add curl
5+
6+
#TODO: app driver itself should try again until OnlyOffice is up...
7+
8+
retries=10
9+
while [[ $retries -gt 0 ]]; do
10+
if curl --silent --show-error --fail http://onlyoffice/hosting/discovery > /dev/null; then
11+
echo "OnlyOffice is available !!"
12+
ocis app-provider server
13+
else
14+
echo "OnlyOffice is not yet available, trying again in 10 seconds"
15+
sleep 10
16+
retries=$((retries - 1))
17+
fi
18+
done
19+
echo 'OnlyOffice was not available after 100 seconds'
20+
exit 1

dev/docker/ocis.entrypoint.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

dev/docker/ocis/app-registry.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
app_registry:
2+
mimetypes:
3+
- mime_type: application/pdf
4+
extension: pdf
5+
name: PDF
6+
description: PDF document
7+
icon: ""
8+
default_app: ""
9+
allow_creation: false
10+
- mime_type: application/vnd.oasis.opendocument.text
11+
extension: odt
12+
name: OpenDocument
13+
description: OpenDocument text document
14+
icon: ""
15+
default_app: Collabora
16+
allow_creation: true
17+
- mime_type: application/vnd.oasis.opendocument.spreadsheet
18+
extension: ods
19+
name: OpenSpreadsheet
20+
description: OpenDocument spreadsheet document
21+
icon: ""
22+
default_app: Collabora
23+
allow_creation: true
24+
- mime_type: application/vnd.oasis.opendocument.presentation
25+
extension: odp
26+
name: OpenPresentation
27+
description: OpenDocument presentation document
28+
icon: ""
29+
default_app: Collabora
30+
allow_creation: true
31+
- mime_type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
32+
extension: docx
33+
name: Microsoft Word
34+
description: Microsoft Word document
35+
icon: ""
36+
default_app: OnlyOffice
37+
allow_creation: true
38+
- mime_type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
39+
extension: xlsx
40+
name: Microsoft Excel
41+
description: Microsoft Excel document
42+
icon: ""
43+
default_app: OnlyOffice
44+
allow_creation: true
45+
- mime_type: application/vnd.openxmlformats-officedocument.presentationml.presentation
46+
extension: pptx
47+
name: Microsoft PowerPoint
48+
description: Microsoft PowerPoint document
49+
icon: ""
50+
default_app: OnlyOffice
51+
allow_creation: true
52+
- mime_type: application/vnd.jupyter
53+
extension: ipynb
54+
name: Jupyter Notebook
55+
description: Jupyter Notebook
56+
icon: ""
57+
default_app: ""
58+
allow_creation: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# we can't mount it directly because the run-document-server.sh script wants to move it
5+
cp /etc/onlyoffice/documentserver/local.dist.json /etc/onlyoffice/documentserver/local.json
6+
7+
/app/ds/run-document-server.sh

dev/docker/onlyoffice/local.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"services": {
3+
"CoAuthoring": {
4+
"sql": {
5+
"type": "postgres",
6+
"dbHost": "localhost",
7+
"dbPort": "5432",
8+
"dbName": "onlyoffice",
9+
"dbUser": "onlyoffice",
10+
"dbPass": "onlyoffice"
11+
},
12+
"token": {
13+
"enable": {
14+
"request": {
15+
"inbox": true,
16+
"outbox": true
17+
},
18+
"browser": true
19+
},
20+
"inbox": {
21+
"header": "Authorization"
22+
},
23+
"outbox": {
24+
"header": "Authorization"
25+
}
26+
},
27+
"secret": {
28+
"inbox": {
29+
"string": "B8LjkNqGxn6gf8bkuBUiMwyuCFwFddnu"
30+
},
31+
"outbox": {
32+
"string": "B8LjkNqGxn6gf8bkuBUiMwyuCFwFddnu"
33+
},
34+
"session": {
35+
"string": "B8LjkNqGxn6gf8bkuBUiMwyuCFwFddnu"
36+
}
37+
}
38+
}
39+
},
40+
"rabbitmq": {
41+
"url": "amqp://guest:guest@localhost"
42+
},
43+
"FileConverter": {
44+
"converter": {
45+
"inputLimits": [
46+
{
47+
"type": "docx;dotx;docm;dotm",
48+
"zip": {
49+
"uncompressed": "1GB",
50+
"template": "*.xml"
51+
}
52+
},
53+
{
54+
"type": "xlsx;xltx;xlsm;xltm",
55+
"zip": {
56+
"uncompressed": "1GB",
57+
"template": "*.xml"
58+
}
59+
},
60+
{
61+
"type": "pptx;ppsx;potx;pptm;ppsm;potm",
62+
"zip": {
63+
"uncompressed": "1GB",
64+
"template": "*.xml"
65+
}
66+
}
67+
]
68+
}
69+
}
70+
71+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
set -e
3+
4+
echo "${WOPISECRET}" > /etc/wopi/wopisecret
5+
6+
cp /etc/wopi/wopiserver.conf.dist /etc/wopi/wopiserver.conf
7+
sed -i 's/wopiserver.owncloud.test/'${WOPISERVER_DOMAIN}'/g' /etc/wopi/wopiserver.conf
8+
9+
if [ "$WOPISERVER_INSECURE" == "true" ]; then
10+
sed -i 's/sslverify\s=\sTrue/sslverify = False/g' /etc/wopi/wopiserver.conf
11+
fi
12+
13+
/app/wopiserver.py
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#
2+
# This config is based on https://github.com/cs3org/wopiserver/blob/master/wopiserver.conf
3+
#
4+
# wopiserver.conf
5+
#
6+
# Default configuration file for the WOPI server for oCIS
7+
#
8+
##############################################################
9+
10+
[general]
11+
# Storage access layer to be loaded in order to operate this WOPI server
12+
# only "cs3" is supported with oCIS
13+
storagetype = cs3
14+
15+
# Port where to listen for WOPI requests
16+
port = 8880
17+
18+
# Logging level. Debug enables the Flask debug mode as well.
19+
# Valid values are: Debug, Info, Warning, Error.
20+
loglevel = Error
21+
loghandler = stream
22+
logdest = stdout
23+
24+
# URL of your WOPI server or your HA proxy in front of it
25+
wopiurl = https://wopiserver.owncloud.test
26+
27+
# URL for direct download of files. The complete URL that is sent
28+
# to clients will include the access_token argument
29+
downloadurl = https://wopiserver.owncloud.test/wopi/cbox/download
30+
31+
# The internal server engine to use (defaults to flask).
32+
# Set to waitress for production installations.
33+
internalserver = waitress
34+
35+
# List of file extensions deemed incompatible with LibreOffice:
36+
# interoperable locking will be disabled for such files
37+
nonofficetypes = .md .zmd .txt .epd
38+
39+
# List of file extensions to be supported by Collabora (deprecated)
40+
codeofficetypes = .odt .ott .ods .ots .odp .otp .odg .otg .doc .dot .xls .xlt .xlm .ppt .pot .pps .vsd .dxf .wmf .cdr .pages .number .key
41+
42+
# WOPI access token expiration time [seconds]
43+
tokenvalidity = 86400
44+
45+
# WOPI lock expiration time [seconds]
46+
wopilockexpiration = 3600
47+
48+
# WOPI lock strict check: if True, WOPI locks will be compared according to specs,
49+
# that is their representation must match. False (default) allows for a more relaxed
50+
# comparison, which compensates incorrect lock requests from Microsoft Office Online
51+
# on-premise setups.
52+
wopilockstrictcheck = False
53+
54+
# Enable support of rename operations from WOPI apps. This is currently
55+
# disabled by default as it has been observed that both MS Office and Collabora
56+
# Online do not play well with this feature.
57+
# Not supported with oCIS, must always be set to "False"
58+
enablerename = False
59+
60+
# Detection of external Microsoft Office or LibreOffice locks. By default, lock files
61+
# compatible with Office for Desktop applications are detected, assuming that the
62+
# underlying storage can be mounted as a remote filesystem: in this case, WOPI GetLock
63+
# and SetLock operations return such locks and prevent online apps from entering edit mode.
64+
# This feature can be disabled in order to operate a pure WOPI server for online apps.
65+
# Not supported with oCIS, must always be set to "False"
66+
detectexternallocks = False
67+
68+
# Location of the webconflict files. By default, such files are stored in the same path
69+
# as the original file. If that fails (e.g. because of missing permissions),
70+
# an attempt is made to store such files in this path if specified, otherwise
71+
# the system falls back to the recovery space (cf. io|recoverypath).
72+
# The keywords <user_initial> and <username> are replaced with the actual username's
73+
# initial letter and the actual username, respectively, so you can use e.g.
74+
# /your_storage/home/user_initial/username
75+
#conflictpath = /
76+
77+
# ownCloud's WOPI proxy configuration. Disabled by default.
78+
#wopiproxy = https://external-wopi-proxy.com
79+
#wopiproxysecretfile = /path/to/your/shared-key-file
80+
#proxiedappname = Name of your proxied app
81+
82+
[security]
83+
# Location of the secret files. Requires a restart of the
84+
# WOPI server when either the files or their content change.
85+
wopisecretfile = /etc/wopi/wopisecret
86+
# iop secret is not used for cs3 storage type
87+
#iopsecretfile = /etc/wopi/iopsecret
88+
89+
# Use https as opposed to http (requires certificate)
90+
usehttps = no
91+
92+
# Certificate and key for https. Requires a restart
93+
# to apply a change.
94+
wopicert = /etc/grid-security/host.crt
95+
wopikey = /etc/grid-security/host.key
96+
97+
[bridge]
98+
# SSL certificate check for the connected apps
99+
sslverify = True
100+
101+
# Minimal time interval between two consecutive save operations [seconds]
102+
#saveinterval = 200
103+
104+
# Minimal time interval before a closed file is WOPI-unlocked [seconds]
105+
#unlockinterval = 90
106+
107+
# CodiMD: disable creating zipped bundles when files contain pictures
108+
#disablezip = False
109+
110+
[io]
111+
# Size used for buffered reads [bytes]
112+
chunksize = 4194304
113+
114+
# Path to a recovery space in case of I/O errors when reaching to the remote storage.
115+
# This is expected to be a local path, and it is provided in order to ease user support.
116+
# Defaults to the indicated spool folder.
117+
recoverypath = /var/spool/wopirecovery
118+
119+
[cs3]
120+
# Host and port of the Reva(-like) CS3-compliant GRPC gateway endpoint
121+
revagateway = ocis:9142
122+
123+
# Reva/gRPC authentication token expiration time [seconds]
124+
# The default value matches Reva's default
125+
authtokenvalidity = 3600
126+
127+
# SSL certificate check for Reva
128+
sslverify = True

0 commit comments

Comments
 (0)