-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
532 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
deployments/examples/ocis_web/config/ocis-appdriver-codimd/entrypoint-override.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
apk add curl | ||
|
||
#TODO: app driver itself should try again until CodiMD is up... | ||
|
||
retries=10 | ||
while [[ $retries -gt 0 ]]; do | ||
if curl --silent --show-error --fail http://codimd:3000 > /dev/null; then | ||
ocis storage-app-provider server | ||
else | ||
echo "CodiMD is not yet available, trying again in 10 seconds" | ||
sleep 10 | ||
retries=$((retries - 1)) | ||
fi | ||
done | ||
echo 'CodiMD was not available after 100 seconds' | ||
exit 1 |
7 changes: 7 additions & 0 deletions
7
deployments/examples/ocis_web/config/ocis-appdriver-collabora/entrypoint-override.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# if Collabora is already up and we have a new oCIS image, this app provider starts up too fast for oCIS | ||
sleep 20 | ||
|
||
ocis storage-app-provider server |
19 changes: 19 additions & 0 deletions
19
deployments/examples/ocis_web/config/ocis-appdriver-onlyoffice/entrypoint-override.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
apk add curl | ||
|
||
#TODO: app driver itself should try again until OnlyOffice is up... | ||
|
||
retries=10 | ||
while [[ $retries -gt 0 ]]; do | ||
if curl --silent --show-error --fail http://onlyoffice/hosting/discovery > /dev/null; then | ||
ocis storage-app-provider server | ||
else | ||
echo "OnlyOffice is not yet available, trying again in 10 seconds" | ||
sleep 10 | ||
retries=$((retries - 1)) | ||
fi | ||
done | ||
echo 'OnlyOffice was not available after 100 seconds' | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
[ | ||
{ | ||
"mime_type": "application/pdf", | ||
"extension": "pdf", | ||
"name": "PDF", | ||
"description": "PDF document", | ||
"icon": "", | ||
"default_app": "", | ||
"allow_creation": false | ||
}, | ||
{ | ||
"mime_type": "application/vnd.oasis.opendocument.text", | ||
"extension": "odt", | ||
"name": "OpenDocument", | ||
"description": "OpenDocument text document", | ||
"icon": "", | ||
"default_app": "Collabora", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "application/vnd.oasis.opendocument.spreadsheet", | ||
"extension": "ods", | ||
"name": "OpenSpreadsheet", | ||
"description": "OpenDocument spreadsheet document", | ||
"icon": "", | ||
"default_app": "Collabora", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "application/vnd.oasis.opendocument.presentation", | ||
"extension": "odp", | ||
"name": "OpenPresentation", | ||
"description": "OpenDocument presentation document", | ||
"icon": "", | ||
"default_app": "Collabora", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", | ||
"extension": "docx", | ||
"name": "Microsoft Word", | ||
"description": "Microsoft Word document", | ||
"icon": "", | ||
"default_app": "OnlyOffice", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | ||
"extension": "xlsx", | ||
"name": "Microsoft Excel", | ||
"description": "Microsoft Excel document", | ||
"icon": "", | ||
"default_app": "OnlyOffice", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "application/vnd.openxmlformats-officedocument.presentationml.presentation", | ||
"extension": "pptx", | ||
"name": "Microsoft PowerPoint", | ||
"description": "Microsoft PowerPoint document", | ||
"icon": "", | ||
"default_app": "OnlyOffice", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "application/vnd.jupyter", | ||
"extension": "ipynb", | ||
"name": "Jupyter Notebook", | ||
"description": "Jupyter Notebook", | ||
"icon": "", | ||
"default_app": "", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "text/markdown", | ||
"extension": "md", | ||
"name": "Markdown file", | ||
"description": "Markdown file", | ||
"icon": "", | ||
"default_app": "CodiMD", | ||
"allow_creation": true | ||
}, | ||
{ | ||
"mime_type": "application/compressed-markdown", | ||
"extension": "zmd", | ||
"name": "Compressed markdown file", | ||
"description": "Compressed markdown file", | ||
"icon": "", | ||
"default_app": "CodiMD", | ||
"allow_creation": false | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
deployments/examples/ocis_web/config/wopiserver/entrypoint-override.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#/bin/sh! | ||
set -e | ||
|
||
echo "${WOPISECRET}" > /etc/wopi/wopisecret | ||
echo "${IOPSECRET}" > /etc/wopi/iopsecret | ||
mkdir -p /var/run/secrets | ||
echo "$CODIMDSECRET" > /var/run/secrets/codimd_apikey | ||
|
||
cp /etc/wopi/wopiserver.conf.dist /etc/wopi/wopiserver.conf | ||
sed -i 's/ocis.owncloud.test/'${OCIS_DOMAIN}'/g' /etc/wopi/wopiserver.conf | ||
sed -i 's/collabora.owncloud.test/'${COLLABORA_DOMAIN}'/g' /etc/wopi/wopiserver.conf | ||
sed -i 's/wopiserver.owncloud.test/'${WOPISERVER_DOMAIN}'/g' /etc/wopi/wopiserver.conf | ||
|
||
touch /var/log/wopi/wopiserver.log | ||
|
||
/app/wopiserver.py & | ||
|
||
tail -f /var/log/wopi/wopiserver.log |
128 changes: 128 additions & 0 deletions
128
deployments/examples/ocis_web/config/wopiserver/wopiserver.conf.dist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# | ||
# wopiserver.conf | ||
# | ||
# Default configuration file for the WOPI server for CERNBox | ||
# | ||
############################################################## | ||
|
||
[general] | ||
# Storage access layer to be loaded in order to operate this WOPI server | ||
# Supported values: local, xroot, cs3. | ||
storagetype = cs3 | ||
|
||
# Port where to listen for WOPI requests | ||
port = 8880 | ||
|
||
# URL of your Microsoft Office Online service | ||
#oosurl = https://officeonline.owncloud.test | ||
|
||
# URL of your Collabora Online service | ||
#codeurl = https://collabora.owncloud.test | ||
|
||
# URL of your CodiMD service | ||
codimdurl = https://codimd.owncloud.test | ||
codimdinturl = http://codimd:3000 | ||
|
||
# URL of your WOPI server or your HA proxy in front of it | ||
wopiurl = https://wopiserver.owncloud.test | ||
|
||
# URL for direct download of files. The complete URL that is sent | ||
# to clients will include the access_token argument | ||
downloadurl = https://wopiserver.owncloud.test/wopi/cbox/download | ||
|
||
# Optional URL prefix for WebDAV access to the files. This enables the | ||
# 'Edit in Desktop client' action on Windows-based clients | ||
webdavurl = https://ocis.owncloud.test/webdav | ||
|
||
# List of file extensions deemed incompatible with LibreOffice: | ||
# interoperable locking will be disabled for such files | ||
nonofficetypes = .md .zmd .txt .epd | ||
|
||
# List of file extensions to be supported by Collabora | ||
codeofficetypes = .odt .ott .ods .ots .odp .otp .odg .otg .doc .dot .xls .xlt .xlm .ppt .pot .pps .vsd .dxf .wmf .cdr .pages .number .key | ||
|
||
# WOPI access token expiration time [seconds] | ||
tokenvalidity = 86400 | ||
|
||
# WOPI lock expiration time [seconds] | ||
wopilockexpiration = 7200 | ||
|
||
# WOPI lock strict check: if True, WOPI locks will be compared according to specs, | ||
# that is their representation must match. False (default) allows for a more relaxed | ||
# comparison, which compensates incorrect lock requests from Microsoft Office Online | ||
# on-premise setups. | ||
#wopilockstrictcheck = False | ||
|
||
# Logging level. Debug enables the Flask debug mode as well. | ||
# Valid values are: Debug, Info, Warning, Error. | ||
loglevel = Info | ||
|
||
# Location of the lock files. Currently, two modes are supported: | ||
# if a path is provided, all locks will be stored there with a hashed name, | ||
# otherwise the lock is stored on the same path as the original file. | ||
# This latter mode will eventually be dropped once the system is deemed | ||
# stable enough and lock files are hidden away. | ||
#lockpath = /your_storage/wopilocks | ||
|
||
|
||
[security] | ||
# Location of the secret files. Requires a restart of the | ||
# WOPI server when either the files or their content change. | ||
wopisecretfile = /etc/wopi/wopisecret | ||
iopsecretfile = /etc/wopi/iopsecret | ||
|
||
# Use https as opposed to http (requires certificate) | ||
usehttps = no | ||
|
||
# Certificate and key for https. Requires a restart | ||
# to apply a change. | ||
wopicert = /etc/grid-security/host.crt | ||
wopikey = /etc/grid-security/host.key | ||
|
||
|
||
[bridge] | ||
# SSL certificate check for the connected apps | ||
sslverify = False | ||
|
||
# Minimal time interval between two consecutive save operations [seconds] | ||
#saveinterval = 200 | ||
|
||
# Minimal time interval before a closed file is WOPI-unlocked [seconds] | ||
#unlockinterval = 90 | ||
|
||
|
||
[io] | ||
# Size used for buffered reads [bytes] | ||
chunksize = 4194304 | ||
|
||
|
||
[xroot] | ||
# URL of the default remote xroot storage server. This can be overridden | ||
# if the end-point is passed on the /wopi/cbox/open call | ||
#storageserver = root://your-xrootd-server.org | ||
|
||
# Optional EOS top-level path that will be prepended to all user paths. Useful | ||
# to map the CERNBox-exposed files in a subfolder of the EOS storage. By default, | ||
# this is not used and storagehomepath is empty. | ||
#storagehomepath = /your/top/storage/path | ||
|
||
|
||
[local] | ||
# Location of the folder or mount point used as local storage | ||
#storagehomepath = /mnt/your_local_storage | ||
|
||
|
||
[cs3] | ||
# Host and port of the Reva(-like) CS3-compliant GRPC gateway endpoint | ||
revagateway = ocis:9142 | ||
|
||
# HTTP (WebDAV) endpoint for uploading files | ||
#datagateway = https://your-reva-server.org:port/data | ||
|
||
# Reva/gRPC authentication token expiration time [seconds] | ||
# The default value matches Reva's default | ||
authtokenvalidity = 3600 | ||
|
||
# SSL certificate check for Reva | ||
# oCIS uses self signed certificate in this example | ||
sslverify = false |
Oops, something went wrong.