mirror of
https://github.com/YunoHost-Apps/onlyoffice_ynh.git
synced 2024-09-03 19:56:11 +02:00
Cleanup
This commit is contained in:
parent
ca2353e221
commit
6788f3dd59
5 changed files with 4 additions and 331 deletions
|
@ -1,244 +0,0 @@
|
||||||
{
|
|
||||||
"statsd": {
|
|
||||||
"useMetrics": false,
|
|
||||||
"host": "localhost",
|
|
||||||
"port": "8125",
|
|
||||||
"prefix": "ds."
|
|
||||||
},
|
|
||||||
"log": {
|
|
||||||
"filePath": "",
|
|
||||||
"options": {
|
|
||||||
"reloadSecs": 60,
|
|
||||||
"replaceConsole": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"queue": {
|
|
||||||
"visibilityTimeout": 300,
|
|
||||||
"retentionPeriod": 900
|
|
||||||
},
|
|
||||||
"storage": {
|
|
||||||
"name": "storage-fs",
|
|
||||||
"fs": {
|
|
||||||
"folderPath": "",
|
|
||||||
"urlExpires": 900,
|
|
||||||
"secretString": "onlyoffice"
|
|
||||||
},
|
|
||||||
"region": "",
|
|
||||||
"endpoint": "http://localhost/s3",
|
|
||||||
"bucketName": "cache",
|
|
||||||
"storageFolderName": "files",
|
|
||||||
"urlExpires": 604800,
|
|
||||||
"accessKeyId": "AKID",
|
|
||||||
"secretAccessKey": "SECRET",
|
|
||||||
"useRequestToGetUrl": false,
|
|
||||||
"useSignedUrl": false,
|
|
||||||
"externalHost": ""
|
|
||||||
},
|
|
||||||
"rabbitmq": {
|
|
||||||
"url": "amqp://guest:guest@localhost:5672",
|
|
||||||
"socketOptions": {},
|
|
||||||
"exchangepubsub": "ds.pubsub",
|
|
||||||
"queueconverttask": "ds.converttask",
|
|
||||||
"queueconvertresponse": "ds.convertresponse",
|
|
||||||
"exchangeconvertdead": "ds.exchangeconvertdead",
|
|
||||||
"queueconvertdead": "ds.convertdead"
|
|
||||||
},
|
|
||||||
"dnscache": {
|
|
||||||
"enable" : true,
|
|
||||||
"ttl" : 300,
|
|
||||||
"cachesize" : 1000
|
|
||||||
},
|
|
||||||
"services": {
|
|
||||||
"CoAuthoring": {
|
|
||||||
"server": {
|
|
||||||
"port": 8000,
|
|
||||||
"workerpercpu": 1,
|
|
||||||
"mode": "development",
|
|
||||||
"limits_tempfile_upload": 104857600,
|
|
||||||
"limits_image_size": 26214400,
|
|
||||||
"limits_image_download_timeout": 120,
|
|
||||||
"callbackRequestTimeout": 120,
|
|
||||||
"healthcheckfilepath": "../public/healthcheck.docx",
|
|
||||||
"savetimeoutdelay": 5000,
|
|
||||||
"edit_singleton": false,
|
|
||||||
"forgottenfiles": "forgotten",
|
|
||||||
"forgottenfilesname": "output",
|
|
||||||
"maxRequestChanges": 20000,
|
|
||||||
"openProtectedFile": true
|
|
||||||
},
|
|
||||||
"requestDefaults": {
|
|
||||||
"headers": {
|
|
||||||
"userAgent": "Node.js/6.13"
|
|
||||||
},
|
|
||||||
"rejectUnauthorized": false
|
|
||||||
},
|
|
||||||
"autoAssembly": {
|
|
||||||
"enable": false,
|
|
||||||
"interval": "5m",
|
|
||||||
"step": "1m"
|
|
||||||
},
|
|
||||||
"utils": {
|
|
||||||
"utils_common_fontdir": "null",
|
|
||||||
"utils_fonts_search_patterns": "*.ttf;*.ttc;*.otf",
|
|
||||||
"resource_expires": 31536000,
|
|
||||||
"limits_image_types_upload": "jpg;png;gif;bmp"
|
|
||||||
},
|
|
||||||
"sql": {
|
|
||||||
"type": "postgres",
|
|
||||||
"tableChanges": "doc_changes",
|
|
||||||
"tableResult": "task_result",
|
|
||||||
"dbHost": "localhost",
|
|
||||||
"dbPort": 5432,
|
|
||||||
"dbName": "onlyoffice",
|
|
||||||
"dbUser": "onlyoffice",
|
|
||||||
"dbPass": "onlyoffice",
|
|
||||||
"charset": "utf8",
|
|
||||||
"connectionlimit": 10,
|
|
||||||
"max_allowed_packet": 1048575
|
|
||||||
},
|
|
||||||
"redis": {
|
|
||||||
"name": "redis",
|
|
||||||
"prefix": "ds:",
|
|
||||||
"host": "localhost",
|
|
||||||
"port": 6379
|
|
||||||
},
|
|
||||||
"pubsub": {
|
|
||||||
"name": "pubsubRabbitMQ",
|
|
||||||
"maxChanges": 1000
|
|
||||||
},
|
|
||||||
"expire": {
|
|
||||||
"saveLock": 60,
|
|
||||||
"presence": 300,
|
|
||||||
"locks": 604800,
|
|
||||||
"changeindex": 86400,
|
|
||||||
"lockDoc": 30,
|
|
||||||
"message": 86400,
|
|
||||||
"lastsave": 604800,
|
|
||||||
"forcesave": 604800,
|
|
||||||
"saved": 3600,
|
|
||||||
"documentsCron": "0 */2 * * * *",
|
|
||||||
"files": 86400,
|
|
||||||
"filesCron": "00 00 */1 * * *",
|
|
||||||
"filesremovedatonce": 100,
|
|
||||||
"sessionidle": "0",
|
|
||||||
"sessionabsolute": "30d",
|
|
||||||
"sessionclosecommand": "2m",
|
|
||||||
"pemStdTTL": "1h",
|
|
||||||
"pemCheckPeriod": "10m",
|
|
||||||
"updateVersionStatus": "5m"
|
|
||||||
},
|
|
||||||
"ipfilter": {
|
|
||||||
"rules": [{"address": "*", "allowed": true}],
|
|
||||||
"useforrequest": false,
|
|
||||||
"errorcode": 401
|
|
||||||
},
|
|
||||||
"secret": {
|
|
||||||
"browser": {"string": "secret", "file": "", "tenants": {}},
|
|
||||||
"inbox": {"string": "secret", "file": "", "tenants": {}},
|
|
||||||
"outbox": {"string": "secret", "file": ""},
|
|
||||||
"session": {"string": "secret", "file": ""}
|
|
||||||
},
|
|
||||||
"token": {
|
|
||||||
"enable": {
|
|
||||||
"browser": false,
|
|
||||||
"request": {
|
|
||||||
"inbox": false,
|
|
||||||
"outbox": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"browser": {
|
|
||||||
"secretFromInbox": true
|
|
||||||
},
|
|
||||||
"inbox": {
|
|
||||||
"header": "Authorization",
|
|
||||||
"prefix": "Bearer ",
|
|
||||||
"inBody": false
|
|
||||||
},
|
|
||||||
"outbox": {
|
|
||||||
"header": "Authorization",
|
|
||||||
"prefix": "Bearer ",
|
|
||||||
"algorithm": "HS256",
|
|
||||||
"expires": "5m",
|
|
||||||
"inBody": false
|
|
||||||
},
|
|
||||||
"session": {
|
|
||||||
"algorithm": "HS256",
|
|
||||||
"expires": "30d"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"plugins": {
|
|
||||||
"uri": "/sdkjs-plugins",
|
|
||||||
"autostart": []
|
|
||||||
},
|
|
||||||
"editor":{
|
|
||||||
"spellcheckerUrl": "/spellchecker",
|
|
||||||
"reconnection":{
|
|
||||||
"attempts": 50,
|
|
||||||
"delay": "2s"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sockjs": {
|
|
||||||
"sockjs_url": "",
|
|
||||||
"websocket": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"license" : {
|
|
||||||
"license_file": "",
|
|
||||||
"warning_limit_percents": "70"
|
|
||||||
},
|
|
||||||
"FileConverter": {
|
|
||||||
"converter": {
|
|
||||||
"maxDownloadBytes": 104857600,
|
|
||||||
"downloadTimeout": 120,
|
|
||||||
"downloadAttemptMaxCount": 3,
|
|
||||||
"downloadAttemptDelay": 1000,
|
|
||||||
"maxprocesscount": 1,
|
|
||||||
"fontDir": "null",
|
|
||||||
"presentationThemesDir": "null",
|
|
||||||
"x2tPath": "null",
|
|
||||||
"docbuilderPath": "null",
|
|
||||||
"docbuilderAllFontsPath": "null",
|
|
||||||
"args": "",
|
|
||||||
"spawnOptions": {},
|
|
||||||
"errorfiles": "",
|
|
||||||
"streamWriterBufferSize": 8388608,
|
|
||||||
"maxRedeliveredCount": 2,
|
|
||||||
"inputLimits": [
|
|
||||||
{
|
|
||||||
"type": "docx;dotx;docm;dotm",
|
|
||||||
"zip": {
|
|
||||||
"uncompressed": "50MB",
|
|
||||||
"template": "*.xml"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "xlsx;xltx;xlsm;xltm",
|
|
||||||
"zip": {
|
|
||||||
"uncompressed": "300MB",
|
|
||||||
"template": "*.xml"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "pptx;ppsx;potx;pptm;ppsm;potm",
|
|
||||||
"zip": {
|
|
||||||
"uncompressed": "50MB",
|
|
||||||
"template": "*.xml"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"FileStorage": {
|
|
||||||
"host": "",
|
|
||||||
"port": 4567,
|
|
||||||
"directory": "",
|
|
||||||
"silent": true
|
|
||||||
},
|
|
||||||
"SpellChecker": {
|
|
||||||
"server": {
|
|
||||||
"port": 8080,
|
|
||||||
"mode": "development"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
Section: misc
|
|
||||||
Priority: optional
|
|
||||||
Package: nodejs
|
|
||||||
Version: 8.0.0
|
|
||||||
Depends:
|
|
||||||
Architecture: all
|
|
||||||
Description: Fake package for nodejs
|
|
|
@ -1,7 +0,0 @@
|
||||||
Section: misc
|
|
||||||
Priority: optional
|
|
||||||
Package: postgresql-client
|
|
||||||
Version: 9.1
|
|
||||||
Depends:
|
|
||||||
Architecture: all
|
|
||||||
Description: Fake package for postgresql-client
|
|
|
@ -1,70 +0,0 @@
|
||||||
include /etc/nginx/includes/onlyoffice-http.conf;
|
|
||||||
|
|
||||||
## Normal HTTP host
|
|
||||||
server {
|
|
||||||
listen 0.0.0.0:80;
|
|
||||||
listen [::]:80 default_server;
|
|
||||||
server_name _;
|
|
||||||
server_tokens off;
|
|
||||||
|
|
||||||
## Redirects all traffic to the HTTPS host
|
|
||||||
root /nowhere; ## root doesn't have to be a valid path since we are redirecting
|
|
||||||
rewrite ^ https://$host$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#HTTP host for internal services
|
|
||||||
server {
|
|
||||||
listen 127.0.0.1:80;
|
|
||||||
listen [::1]:80;
|
|
||||||
server_name localhost;
|
|
||||||
server_tokens off;
|
|
||||||
|
|
||||||
include /etc/nginx/includes/onlyoffice-documentserver-common.conf;
|
|
||||||
include /etc/nginx/includes/onlyoffice-documentserver-docservice.conf;
|
|
||||||
}
|
|
||||||
|
|
||||||
## HTTPS host
|
|
||||||
server {
|
|
||||||
listen 0.0.0.0:443 ssl;
|
|
||||||
listen [::]:443 ssl default_server;
|
|
||||||
server_tokens off;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
|
|
||||||
## Strong SSL Security
|
|
||||||
## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
|
|
||||||
ssl on;
|
|
||||||
ssl_certificate {{SSL_CERTIFICATE_PATH}};
|
|
||||||
ssl_certificate_key {{SSL_KEY_PATH}};
|
|
||||||
ssl_verify_client off;
|
|
||||||
|
|
||||||
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
|
|
||||||
|
|
||||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
|
||||||
ssl_session_cache builtin:1000 shared:SSL:10m;
|
|
||||||
|
|
||||||
ssl_prefer_server_ciphers on;
|
|
||||||
|
|
||||||
add_header Strict-Transport-Security max-age=31536000;
|
|
||||||
# add_header X-Frame-Options SAMEORIGIN;
|
|
||||||
add_header X-Content-Type-Options nosniff;
|
|
||||||
|
|
||||||
## [Optional] If your certficate has OCSP, enable OCSP stapling to reduce the overhead and latency of running SSL.
|
|
||||||
## Replace with your ssl_trusted_certificate. For more info see:
|
|
||||||
## - https://medium.com/devops-programming/4445f4862461
|
|
||||||
## - https://www.ruby-forum.com/topic/4419319
|
|
||||||
## - https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx
|
|
||||||
# ssl_stapling on;
|
|
||||||
# ssl_stapling_verify on;
|
|
||||||
# ssl_trusted_certificate /etc/nginx/ssl/stapling.trusted.crt;
|
|
||||||
# resolver 208.67.222.222 208.67.222.220 valid=300s; # Can change to your DNS resolver if desired
|
|
||||||
# resolver_timeout 10s;
|
|
||||||
|
|
||||||
## [Optional] Generate a stronger DHE parameter:
|
|
||||||
## cd /etc/ssl/certs
|
|
||||||
## sudo openssl dhparam -out dhparam.pem 4096
|
|
||||||
##
|
|
||||||
# ssl_dhparam /etc/ssl/certs/dhparam.pem;
|
|
||||||
|
|
||||||
include /etc/nginx/includes/onlyoffice-documentserver-*.conf;
|
|
||||||
|
|
||||||
}
|
|
|
@ -194,10 +194,11 @@ ynh_package_install onlyoffice-documentserver
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Fix config file..."
|
|
||||||
|
|
||||||
# Fix https://github.com/ONLYOFFICE/onlyoffice-owncloud/issues/172#issuecomment-411746394
|
### `ynh_replace_string` is used to replace a string in a file.
|
||||||
#cp -f ../conf/default.json /etc/onlyoffice/documentserver/default.json
|
### (It's compatible with sed regular expressions syntax)
|
||||||
|
|
||||||
|
#ynh_replace_string "match_string" "replace_string" "$final_path/CONFIG_FILE"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
|
Loading…
Add table
Reference in a new issue