mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-26 15:55:56 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
[Unit]
|
||||
Description=Only Office converter
|
||||
Requires=rabbitmq-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/var/www/onlyoffice/documentserver/server/FileConverter/converter
|
||||
WorkingDirectory=/var/www/onlyoffice/documentserver/server/FileConverter/
|
||||
User=ds
|
||||
Group=ds
|
||||
Environment=NODE_ENV=oods
|
||||
Environment=NODE_CONFIG_DIR=/etc/onlyoffice/documentserver
|
||||
Environment=NODE_DISABLE_COLORS=1
|
||||
Environment=APPLICATION_NAME=ONLYOFFICE
|
||||
Restart=always
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
NoNewPrivileges=yes
|
||||
SyslogIdentifier=oods-converter
|
||||
MemoryLimit=1024M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@@ -0,0 +1,24 @@
|
||||
[Unit]
|
||||
Description=Only Office document service
|
||||
Requires=rabbitmq-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/var/www/onlyoffice/documentserver/server/DocService/docservice
|
||||
WorkingDirectory=/var/www/onlyoffice/documentserver/server/DocService/
|
||||
User=ds
|
||||
Group=ds
|
||||
Environment=NODE_ENV=oods
|
||||
Environment=NODE_CONFIG_DIR=/etc/onlyoffice/documentserver
|
||||
Environment=NODE_DISABLE_COLORS=1
|
||||
Restart=always
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
NoNewPrivileges=yes
|
||||
SyslogIdentifier=oods-docservice
|
||||
MemoryLimit=600M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Only Office metrics
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/var/www/onlyoffice/documentserver/server/Metrics/metrics ./config/config.js
|
||||
WorkingDirectory=/var/www/onlyoffice/documentserver/server/Metrics/
|
||||
User=ds
|
||||
Group=ds
|
||||
Environment=NODE_DISABLE_COLORS=1
|
||||
Restart=always
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectSystem=full
|
||||
ProtectHome=yes
|
||||
NoNewPrivileges=yes
|
||||
SyslogIdentifier=oods-metrics
|
||||
MemoryLimit=50M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
32
roles/onlyoffice_document_server/templates/httpd.conf.j2
Normal file
32
roles/onlyoffice_document_server/templates/httpd.conf.j2
Normal file
@@ -0,0 +1,32 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName {{ oo_vhost }}
|
||||
Include ansible_conf.d/common_env.inc
|
||||
|
||||
SetEnvIf Host "^(.*)$" THE_HOST=$1
|
||||
RequestHeader setifempty X-Forwarded-Proto http
|
||||
RequestHeader setifempty X-Forwarded-Host %{THE_HOST}e
|
||||
ProxyAddHeaders Off
|
||||
|
||||
ProxyPassMatch (.*)(/websocket)$ ws://localhost:8000/$1$2
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
RewriteRule ^/$ /welcome [R=301,L]
|
||||
RewriteRule ^/OfficeWeb(/apps/.*)$ /2018-01-11-13-33/web-apps$1 [R=301,L]
|
||||
|
||||
ProxyPassMatch ^(/2018-01-11-13-33)?(/fonts/.*) http://localhost:{{ oo_docserver_port }}$2
|
||||
ProxyPassMatch ^(/2018-01-11-13-33)?(/doc/.*) http://localhost:{{ oo_docserver_port }}$2
|
||||
ProxyPassMatch ^(/2018-01-11-13-33)?(/.*) http://localhost:{{ oo_docserver_port }}$2
|
||||
ProxyPassMatch ^(/2018-01-11-13-33)?(/spellchecker)(/.*) http://localhost:{{ oo_spellchecker_port }}/$3
|
||||
|
||||
AliasMatch ^(/cache/files.*)(/.*) /var/lib/onlyoffice/documentserver/App_Data$1
|
||||
AliasMatch ^(/2018-01-11-13-33)?/(web-apps/apps/api/documents/api.js)$ /var/www/onlyoffice/documentserver/$2
|
||||
AliasMatch ^(/2018-01-11-13-33)?/(web-apps|sdkjs|sdkjs-plugins)(/.*)$ /var/www/onlyoffice/documentserver/$2$3
|
||||
|
||||
<Directory /var/lib/onlyoffice/documentserver/App_Data>
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
@@ -0,0 +1,6 @@
|
||||
include /etc/onlyoffice/documentserver/nginx/includes/http-common.conf;
|
||||
server {
|
||||
listen 0.0.0.0:80;
|
||||
server_name {{ oo_ds_vhost }};
|
||||
include /etc/onlyoffice/documentserver/nginx/includes/ds-docservice.conf;
|
||||
}
|
103
roles/onlyoffice_document_server/templates/oods.json.j2
Normal file
103
roles/onlyoffice_document_server/templates/oods.json.j2
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"log": {
|
||||
"filePath": "/etc/onlyoffice/documentserver/log4js/production.json"
|
||||
},
|
||||
"storage": {
|
||||
"fs": {
|
||||
"folderPath": "/var/lib/onlyoffice/documentserver/App_Data/cache/files"
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"CoAuthoring": {
|
||||
{% if oo_secret is defined %}
|
||||
"secret": {
|
||||
"inbox": {
|
||||
"string": "{{ oo_secret }}"
|
||||
},
|
||||
"outbox": {
|
||||
"string": "{{ oo_secret }}"
|
||||
}
|
||||
},
|
||||
"token": {
|
||||
"enable": {
|
||||
"browser": true,
|
||||
"request": {
|
||||
"inbox": true,
|
||||
"outbox": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{% endif %}
|
||||
"sql": {
|
||||
"type": "mysql",
|
||||
"dbHost": "{{ oo_db_server }}",
|
||||
"dbPort": {{ oo_db_port }},
|
||||
"dbName": "{{ oo_db_name }}",
|
||||
"dbUser": "{{ oo_db_user }}",
|
||||
"dbPass": "{{ oo_db_pass }}",
|
||||
"charset": "utf8"
|
||||
},
|
||||
{% if oo_auto_save %}
|
||||
"autoAssembly": {
|
||||
"enable": true,
|
||||
"interval": "5m"
|
||||
},
|
||||
{% endif %}
|
||||
"server": {
|
||||
"static_content": {
|
||||
"/fonts": {
|
||||
"path": "/var/www/onlyoffice/documentserver/fonts",
|
||||
"options": {"maxAge": "7d"}
|
||||
},
|
||||
"/sdkjs": {
|
||||
"path": "/var/www/onlyoffice/documentserver/sdkjs",
|
||||
"options": {"maxAge": "7d"}
|
||||
},
|
||||
"/web-apps": {
|
||||
"path": "/var/www/onlyoffice/documentserver/web-apps",
|
||||
"options": {"maxAge": "7d"}
|
||||
},
|
||||
"/welcome": {
|
||||
"path": "/var/www/onlyoffice/documentserver/server/welcome",
|
||||
"options": {"maxAge": "7d"}
|
||||
},
|
||||
"/info": {
|
||||
"path": "/var/www/onlyoffice/documentserver/server/info",
|
||||
"options": {"maxAge": "7d"}
|
||||
},
|
||||
"/sdkjs-plugins": {
|
||||
"path": "/var/www/onlyoffice/documentserver/sdkjs-plugins",
|
||||
"options": {"maxAge": "7d"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"utils_common_fontdir": "/usr/share/fonts"
|
||||
},
|
||||
"sockjs": {
|
||||
"sockjs_url": "/web-apps/vendor/sockjs/sockjs.min.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"license": {
|
||||
"license_file": "/var/www/onlyoffice/documentserver/../Data/license.lic",
|
||||
"warning_limit_percents": "70"
|
||||
},
|
||||
"FileConverter": {
|
||||
"converter": {
|
||||
"fontDir": "/usr/share/fonts",
|
||||
"presentationThemesDir": "/var/www/onlyoffice/documentserver/sdkjs/slide/themes",
|
||||
"x2tPath": "/var/www/onlyoffice/documentserver/server/FileConverter/bin/x2t",
|
||||
"docbuilderPath": "/var/www/onlyoffice/documentserver/server/FileConverter/bin/docbuilder",
|
||||
"docbuilderAllFontsPath": "/var/lib/onlyoffice/documentserver/App_Data/docbuilder/AllFonts.js"
|
||||
}
|
||||
},
|
||||
"FileStorage": {
|
||||
"directory": "/var/lib/onlyoffice/documentserver/App_Data"
|
||||
},
|
||||
"SpellChecker": {
|
||||
"server": {
|
||||
"dictDir": "/var/www/onlyoffice/documentserver/server/SpellChecker/dictionaries"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user