Skip to content

Commit 9edf71a

Browse files
committed
added config for document server setup
1 parent 42014d7 commit 9edf71a

File tree

7 files changed

+498
-0
lines changed

7 files changed

+498
-0
lines changed

docs/ocis/development/testing.md

+8
Original file line numberDiff line numberDiff line change
@@ -584,3 +584,11 @@ The sample `fontsMap.json` file is located in `tests/config/drone/fontsMap.json`
584584
"defaultFont": "/path/to/ocis/tests/config/drone/NotoSans.ttf"
585585
}
586586
```
587+
588+
589+
## Running Test Suite With Document servers (Collabora, ONLYOFFICE or Microsoft using the WOPI protocol.)
590+
To run the test related to document servers, go to `tests/acceptance/docker` and run the command
591+
```bash
592+
docker compose up
593+
```
594+
This will start all necessary service along with the latest docker build of owncloud
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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.wordprocessingml.form
39+
extension: docxf
40+
name: Form Document
41+
description: Form Document
42+
icon: ''
43+
default_app: OnlyOffice
44+
allow_creation: true
45+
- mime_type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
46+
extension: xlsx
47+
name: Microsoft Excel
48+
description: Microsoft Excel document
49+
icon: ''
50+
default_app: OnlyOffice
51+
allow_creation: true
52+
- mime_type: application/vnd.openxmlformats-officedocument.presentationml.presentation
53+
extension: pptx
54+
name: Microsoft PowerPoint
55+
description: Microsoft PowerPoint document
56+
icon: ''
57+
default_app: OnlyOffice
58+
allow_creation: true
59+
- mime_type: application/vnd.jupyter
60+
extension: ipynb
61+
name: Jupyter Notebook
62+
description: Jupyter Notebook
63+
icon: ''
64+
default_app: ''
65+
allow_creation: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
password
2+
12345678
3+
123
4+
ownCloud
5+
ownCloud-1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
directives:
2+
child-src:
3+
- '''self'''
4+
connect-src:
5+
- '''self'''
6+
- 'blob:'
7+
- 'https://${COMPANION_DOMAIN|companion.owncloud.test}/'
8+
- 'wss://${COMPANION_DOMAIN|companion.owncloud.test}/'
9+
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
10+
default-src:
11+
- '''none'''
12+
font-src:
13+
- '''self'''
14+
frame-ancestors:
15+
- '''self'''
16+
frame-src:
17+
- '''self'''
18+
- 'blob:'
19+
- 'https://embed.diagrams.net/'
20+
# In contrary to bash and docker the default is given after the | character
21+
- 'https://${ONLYOFFICE_DOMAIN|onlyoffice.owncloud.test}/'
22+
- 'https://${COLLABORA_DOMAIN|collabora.owncloud.test}/'
23+
# This is needed for the external-sites web extension when embedding sites
24+
- 'https://owncloud.dev'
25+
img-src:
26+
- '''self'''
27+
- 'data:'
28+
- 'blob:'
29+
- 'https://raw.githubusercontent.com/owncloud/awesome-ocis/'
30+
# In contrary to bash and docker the default is given after the | character
31+
- 'https://${ONLYOFFICE_DOMAIN|onlyoffice.owncloud.test}/'
32+
- 'https://${COLLABORA_DOMAIN|collabora.owncloud.test}/'
33+
manifest-src:
34+
- '''self'''
35+
media-src:
36+
- '''self'''
37+
object-src:
38+
- '''self'''
39+
- 'blob:'
40+
script-src:
41+
- '''self'''
42+
- '''unsafe-inline'''
43+
style-src:
44+
- '''self'''
45+
- '''unsafe-inline'''
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
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+
}

0 commit comments

Comments
 (0)