Skip to content

Commit f3902f9

Browse files
committed
Added collabora compatibility
1 parent a746cd9 commit f3902f9

File tree

11 files changed

+1587
-5
lines changed

11 files changed

+1587
-5
lines changed

dev.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ auto-checkout +=
1818
collective.behavior.talcondition
1919
collective.classification.folder
2020
collective.classification.tree
21+
collective.collabora
2122
collective.compoundcriterion
2223
collective.contact.core
2324
collective.contact.contactlist
@@ -95,12 +96,14 @@ eggs +=
9596
Products.Clouseau
9697
# Products.PDBDebugMode
9798
Products.PrintingMailHost
99+
collective.collabora
98100
collective.wfautodoc
99101
# imio.restapi
100102
plone.app.workflowmanager
101103
wildcard.fixpersistentutilities
102104

103105
zcml +=
106+
collective.collabora
104107
${debug:zcml}
105108

106109
zope-conf-additional +=

docker/coolwsd.xml

Lines changed: 364 additions & 0 deletions
Large diffs are not rendered by default.

docker/docker-compose.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# quaive.app.libreoffice docker-compose file
2+
# ==========================================
3+
4+
# Have Docker installed:
5+
# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
6+
#
7+
# https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue
8+
# $ sudo groupadd docker
9+
# $ sudo usermod -aG docker $USER
10+
11+
# Run:
12+
# docker compose up
13+
# or:
14+
# docker compose start
15+
16+
# Using a .env file
17+
# -----------------
18+
#
19+
# NOTE: Never check a `.env` file in into a repository!
20+
#
21+
# Use a .env file to set some parameters for production use.
22+
# The available environment variables are:
23+
# SERVER_PORT: The port you want to expose the LibreOffice / Collabora
24+
# server to the Docker host.
25+
# Default: `9980`.
26+
# ADMIN_USER: The username for the LibreOffice / Collabora admin interface.
27+
# Default: `admin`
28+
# ADMIN_PASS: The password for the LibreOffice / Collabora admin interface.
29+
# Default: `admin`
30+
# SSL_TERMINATION: Enable SSL termination by the LibreOffice / Collabora server
31+
# when proxied by another SSL proxy, like nginx. Should be set
32+
# to `true` in production environments.
33+
# Default: `false`.
34+
#
35+
# This is an example `.env` file:
36+
# ```
37+
# ADMIN_USER=admin
38+
# ADMIN_PASS=supersecret
39+
# SSL_TERMINATION=true
40+
# SERVER_PORT=9980
41+
# ```
42+
43+
# Service URLs
44+
# ------------
45+
#
46+
# https://host.docker.internal:9980/hosting/discovery
47+
# https://host.docker.internal:9980/hosting/capabilities
48+
# https://host.docker.internal:9980/browser/dist/admin/admin.html
49+
50+
# References
51+
# ----------
52+
#
53+
# - https://hub.docker.com/r/collabora/code/tags
54+
# - https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html
55+
# - https://sdk.collaboraonline.com/docs/installation/Configuration.html
56+
57+
services:
58+
59+
collabora:
60+
image: collabora/code:latest
61+
restart: no
62+
container_name: collabora-server
63+
volumes:
64+
- ./coolwsd.xml/:/etc/coolwsd/coolwsd.xml:ro
65+
expose:
66+
- 9980
67+
ports:
68+
- "${SERVER_PORT:-9980}:9980"
69+
extra_hosts:
70+
# For DEVELOPMENT
71+
# host.docker.internal points to the IP of the host and can be used by
72+
# other docker containers, to reach collabora via the host. This is
73+
# necessary for Collabora to be able to make calls to Plone.
74+
- "host.docker.internal:host-gateway"
75+
environment:
76+
- username=${ADMIN_USER:-admin}
77+
- password=${ADMIN_PASS:-admin}
78+
- extra_params=--o:ssl.enable=false --o:ssl.termination=${SSL_TERMINATION:-false}
79+
80+
# This demo nginx is configured to listen on host.docker.internal:80
81+
# and to proxy /collabora/* to the collabora server.
82+
# This enables accessing collabora on the same hostname and port as Plone,
83+
# which means the browser will not activate CORS protections.
84+
nginx:
85+
image: nginx:1.21
86+
restart: no
87+
container_name: collabora-nginx
88+
volumes:
89+
- ./nginx/:/etc/nginx/:ro
90+
ports:
91+
- 80:80

docker/nginx/fastcgi.conf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
3+
fastcgi_param QUERY_STRING $query_string;
4+
fastcgi_param REQUEST_METHOD $request_method;
5+
fastcgi_param CONTENT_TYPE $content_type;
6+
fastcgi_param CONTENT_LENGTH $content_length;
7+
8+
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
9+
fastcgi_param REQUEST_URI $request_uri;
10+
fastcgi_param DOCUMENT_URI $document_uri;
11+
fastcgi_param DOCUMENT_ROOT $document_root;
12+
fastcgi_param SERVER_PROTOCOL $server_protocol;
13+
fastcgi_param REQUEST_SCHEME $scheme;
14+
fastcgi_param HTTPS $https if_not_empty;
15+
16+
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
17+
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
18+
19+
fastcgi_param REMOTE_ADDR $remote_addr;
20+
fastcgi_param REMOTE_PORT $remote_port;
21+
fastcgi_param SERVER_ADDR $server_addr;
22+
fastcgi_param SERVER_PORT $server_port;
23+
fastcgi_param SERVER_NAME $server_name;
24+
25+
# PHP only, required if PHP was built with --enable-force-cgi-redirect
26+
fastcgi_param REDIRECT_STATUS 200;

0 commit comments

Comments
 (0)