Note: please note that Liferay has renamed its Liferay Experience
Could offerings to Liferay SaaS (formerly LXC) and
Liferay PaaS (formerly LXC-SM).
Issue
- Sometimes, it is necessary to generate previews for "office" files such as doc, docx, xls, etc. To accomplish this, it is necessary to integrate Liferay with OpenOffice/ LibreOffice.
- How can this integration be achieved within Liferay PaaS projects?
Environment
- Liferay PaaS
Resolution
- To integrate LibreOffice with Liferay PaaS it is recommended to create a new custom service:
-
Here's an example of LCP.json for a new service:
{
"id": "libreoffice",
"image": "[your_trusted_image]/libreoffice-api",
"cpu": 1,
"memory": 512,
"scale": 1,
"kind": "Deployment",
"dependencies": [],
"readinessProbe": {
"timeoutSeconds": 5,
"tcpSocket": {
"port": 8100
},
"initialDelaySeconds": 20,
"failureThreshold": 5
},
"livenessProbe": {
"timeoutSeconds": 10,
"tcpSocket": {
"port": 8100
},
"initialDelaySeconds": 60,
"failureThreshold": 3
},
"loadBalancer": {
"defaultBackend": false,
"cdn": false,
"customDomains": []
},
"ports": [
{
"protocol": "TCP",
"port": 8100,
"targetPort": 8100,
"external": false
}
]
}