mirror of
https://github.com/tiredofit/docker-collabora-online.git
synced 2026-03-14 14:25:49 +01:00
Release 2.3.0 - See CHANGELOG.md
This commit is contained in:
parent
067a405c4f
commit
3988009f2c
17 changed files with 252 additions and 247 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -1,3 +1,11 @@
|
|||
## 2.3.0 2021-12-02 <techsupport+sd111 at selfdesign dot org>
|
||||
|
||||
### Added
|
||||
- Debian Bulleye Base
|
||||
- Collabora Online 21.11.0-3
|
||||
- Libreoffice CO2021
|
||||
|
||||
|
||||
## 2.2.4 2021-10-29 <dave at tiredofit dot ca>
|
||||
|
||||
### Added
|
||||
|
|
@ -170,7 +178,7 @@
|
|||
- `ENABLE_TLS` (Default: `TRUE`)
|
||||
- `ENABLE_TLS_CERT_GENERATE` (Default: `TRUE`)
|
||||
- `ENABLE_TLS_REVERSE_PROXY` (Default: `FALSE`)
|
||||
- `TLS_CERT_PATH` (Default: `/etc/loolwsd/certs`)
|
||||
- `TLS_CERT_PATH` (Default: `/etc/coolwsd/certs`)
|
||||
- `TLS_CA_FILENAME` (Default: `ca-chain-cert.pem`)
|
||||
- `TLS_CERT_FILENAME` (Default: `cert.pem`)
|
||||
- `TLS_KEY_FILENAME` (Default: `key.pem`)
|
||||
|
|
|
|||
106
Dockerfile
106
Dockerfile
|
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/tiredofit/debian:buster as builder
|
||||
FROM docker.io/tiredofit/debian:bullseye as builder
|
||||
LABEL maintainer="Dave Conroy (dave at tiredofit dot ca)"
|
||||
|
||||
### Buildtime arguments
|
||||
|
|
@ -14,16 +14,16 @@ ARG APP_NAME
|
|||
|
||||
### Environment Variables
|
||||
ENV COLLABORA_ONLINE_BRANCH=${COLLABORA_ONLINE_BRANCH:-"master"} \
|
||||
COLLABORA_ONLINE_VERSION=${COLLABORA_ONLINE_VERSION:-"cp-6.4.13-3"} \
|
||||
COLLABORA_ONLINE_VERSION=${COLLABORA_ONLINE_VERSION:-"cp-21.11.0-3 "} \
|
||||
COLLABORA_ONLINE_REPO_URL=${COLLABORA_ONLINE_REPO_URL:-"https://github.com/CollaboraOnline/online"} \
|
||||
#
|
||||
LIBREOFFICE_BRANCH=${LIBREOFFICE_BRANCH:-"master"} \
|
||||
LIBREOFFICE_VERSION=${LIBREOFFICE_VERSION:-"cp-6.4-49"} \
|
||||
LIBREOFFICE_VERSION=${LIBREOFFICE_VERSION:-"distro/collabora/co-2021"} \
|
||||
LIBREOFFICE_REPO_URL=${LIBREOFFICE_REPO_URL:-"https://github.com/LibreOffice/core"} \
|
||||
#
|
||||
APP_NAME=${APP_NAME:-"Document Editor"} \
|
||||
#
|
||||
POCO_VERSION=${POCO_VERSION:-"poco-1.11.0-release.tar.gz"} \
|
||||
POCO_VERSION=${POCO_VERSION:-"poco-1.11.1-release.tar.gz"} \
|
||||
POCO_URL=${POCO_URL:-"https://github.com/pocoproject/poco/archive/"} \
|
||||
#
|
||||
MAX_CONNECTIONS=${MAX_CONNECTIONS:-"100000"} \
|
||||
|
|
@ -37,16 +37,16 @@ RUN set -x && \
|
|||
### Add Repositories
|
||||
apt-get update && \
|
||||
apt-get -o Dpkg::Options::="--force-confold" upgrade -y && \
|
||||
echo "deb-src http://deb.debian.org/debian buster main" >> /etc/apt/sources.list && \
|
||||
echo "deb http://deb.debian.org/debian buster contrib" >> /etc/apt/sources.list && \
|
||||
echo "deb-src http://deb.debian.org/debian $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') main" >> /etc/apt/sources.list && \
|
||||
echo "deb http://deb.debian.org/debian $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') contrib" >> /etc/apt/sources.list && \
|
||||
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
||||
\
|
||||
### Setup Distribution
|
||||
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
|
||||
\
|
||||
mkdir -p /home/lool && \
|
||||
useradd lool -G sudo && \
|
||||
chown lool:lool /home/lool -R && \
|
||||
mkdir -p /home/cool && \
|
||||
useradd cool -G sudo && \
|
||||
chown cool:cool /home/cool -R && \
|
||||
\
|
||||
BUILD_DEPS=' \
|
||||
adduser \
|
||||
|
|
@ -79,7 +79,6 @@ RUN set -x && \
|
|||
procps \
|
||||
python3-lxml \
|
||||
python3-polib \
|
||||
python-polib \
|
||||
sudo \
|
||||
translate-toolkit \
|
||||
ttf-mscorefonts-installer \
|
||||
|
|
@ -123,34 +122,34 @@ RUN set -x && \
|
|||
--with-distro="CPLinux-LOKit" \
|
||||
--disable-epm \
|
||||
--without-package-format && \
|
||||
chown -R lool /usr/src/libreoffice-core && \
|
||||
sudo -u lool make fetch && \
|
||||
sudo -u lool make -j$(nproc) build-nocheck && \
|
||||
chown -R cool /usr/src/libreoffice-core && \
|
||||
sudo -u cool make fetch && \
|
||||
sudo -u cool make -j$(nproc) build-nocheck && \
|
||||
mkdir -p /opt/libreoffice && \
|
||||
chown -R lool /opt/libreoffice && \
|
||||
cp -R /usr/src/libreoffice-core/instdir/* /opt/libreoffice/ && \
|
||||
chown -R cool /opt/libreoffice && \
|
||||
cp -R /usr/src/libreoffice-core/instdir/* /opt/libreoffice/
|
||||
\
|
||||
### Build LibreOffice Online (Not as long as above)
|
||||
git clone -b ${COLLABORA_ONLINE_BRANCH} ${COLLABORA_ONLINE_REPO_URL} /usr/src/libreoffice-online && \
|
||||
cd /usr/src/libreoffice-online && \
|
||||
git clone -b ${COLLABORA_ONLINE_BRANCH} ${COLLABORA_ONLINE_REPO_URL} /usr/src/collabora-online && \
|
||||
cd /usr/src/collabora-online && \
|
||||
git checkout ${COLLABORA_ONLINE_VERSION} && \
|
||||
if [ -d "/build-assets/online/src" ] ; then cp -R /build-assets/online/src/* /usr/src/libreoffice-online ; fi; \
|
||||
if [ -d "/build-assets/online/src" ] ; then cp -R /build-assets/online/src/* /usr/src/collabora-online ; fi; \
|
||||
if [ -d "/build-assets/online/scripts" ] ; then for script in /build-assets/online/scripts/*.sh; do echo "** Applying $script"; bash $script; done && \ ; fi ; \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/libreoffice-online/configure.ac && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/libreoffice-online/loleaflet/admin/admin.strings.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/libreoffice-online/loleaflet/src/control/Toolbar.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/libreoffice-online/loleaflet/src/core/Socket.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/libreoffice-online/loleaflet/src/layer/marker/ProgressOverlay.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/libreoffice-online/loleaflet/src/map/Clipboard.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/libreoffice-online/loleaflet/welcome/*.html && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/collabora-online/configure.ac && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/collabora-online/browser/admin/admin.strings.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/collabora-online/browser/src/control/Toolbar.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/collabora-online/browser/src/core/Socket.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/collabora-online/browser/src/layer/marker/ProgressOverlay.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/collabora-online/browser/src/map/Clipboard.js && \
|
||||
sed -i "s|Collabora Online Development Edition|${APP_NAME}|g" /usr/src/collabora-online/browser/welcome/*.html && \
|
||||
./autogen.sh && \
|
||||
./configure --enable-silent-rules \
|
||||
--with-lokit-path="/usr/src/libreoffice-core/include" \
|
||||
--with-lo-path=/opt/libreoffice \
|
||||
--with-max-connections=${MAX_CONNECTIONS} \
|
||||
--with-max-documents=${MAX_DOCUMENTS} \
|
||||
--with-logfile=/var/log/lool/lool.log \
|
||||
--prefix=/opt/lool \
|
||||
--with-logfile=/var/log/cool/cool.log \
|
||||
--prefix=/opt/cool \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--with-poco-includes=/opt/poco/include \
|
||||
|
|
@ -158,14 +157,12 @@ RUN set -x && \
|
|||
--with-app-name="${APP_NAME}" \
|
||||
--with-vendor="tiredofit@github" \
|
||||
&& \
|
||||
( scripts/locorestrings.py /usr/src/libreoffice-online /usr/src/libreoffice-core/translations ) && \
|
||||
( scripts/unocommands.py --update /usr/src/libreoffice-online /usr/src/libreoffice-core ) && \
|
||||
( scripts/unocommands.py --translate /usr/src/libreoffice-online /usr/src/libreoffice-core/translations ) && \
|
||||
#( scripts/locorestrings.py /usr/src/collabora-online /usr/src/libreoffice-core/translations ) && \
|
||||
make -j$(nproc) && \
|
||||
mkdir -p /opt/lool && \
|
||||
chown -R lool /opt/lool && \
|
||||
cp -R loolwsd.xml /opt/lool/ && \
|
||||
cp -R loolkitconfig.xcu /opt/lool && \
|
||||
mkdir -p /opt/cool && \
|
||||
chown -R cool /opt/cool && \
|
||||
cp -R coolwsd.xml /opt/cool/ && \
|
||||
cp -R coolkitconfig.xcu /opt/cool && \
|
||||
make install && \
|
||||
\
|
||||
### Cleanup
|
||||
|
|
@ -179,12 +176,12 @@ RUN set -x && \
|
|||
rm -rf /var/lib/apt/lists/* && \
|
||||
rm -rf /var/log/*
|
||||
|
||||
FROM docker.io/tiredofit/debian:buster
|
||||
FROM docker.io/tiredofit/debian:bullseye
|
||||
LABEL maintainer="Dave Conroy (dave at tiredofit dot ca)"
|
||||
|
||||
### Set Defaults
|
||||
ENV ADMIN_USER=admin \
|
||||
ADMIN_PASS=libreoffice \
|
||||
ADMIN_PASS=collaboraonline \
|
||||
CONTAINER_ENABLE_MESSAGING=FALSE
|
||||
|
||||
### Grab Compiled Assets from builder image
|
||||
|
|
@ -194,10 +191,10 @@ ADD build-assets /build-assets
|
|||
|
||||
### Install Dependencies
|
||||
RUN set -x && \
|
||||
adduser --quiet --system --group --home /opt/lool lool && \
|
||||
adduser --quiet --system --group --home /opt/cool cool && \
|
||||
\
|
||||
### Add Repositories
|
||||
echo "deb http://deb.debian.org/debian buster contrib" >> /etc/apt/sources.list && \
|
||||
echo "deb http://deb.debian.org/debian $(cat /etc/os-release |grep "VERSION=" | awk 'NR>1{print $1}' RS='(' FS=')') contrib" >> /etc/apt/sources.list && \
|
||||
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
|
||||
apt-get update && \
|
||||
apt-get -o Dpkg::Options::="--force-confold" upgrade -y && \
|
||||
|
|
@ -219,7 +216,6 @@ RUN set -x && \
|
|||
libpam0g \
|
||||
libpng16-16 \
|
||||
libsm6 \
|
||||
libubsan0 \
|
||||
libubsan1 \
|
||||
libxcb-render0 \
|
||||
libxcb-shm0 \
|
||||
|
|
@ -236,27 +232,27 @@ RUN set -x && \
|
|||
&& \
|
||||
\
|
||||
### Setup Directories and Permissions
|
||||
mkdir -p /etc/loolwsd && \
|
||||
mv /opt/lool/loolwsd.xml /etc/loolwsd/ && \
|
||||
mv /opt/lool/loolkitconfig.xcu /etc/loolwsd/ && \
|
||||
chown -R lool /etc/loolwsd && \
|
||||
mkdir -p /opt/lool/child-roots && \
|
||||
chown -R lool /opt/* && \
|
||||
mkdir -p /var/cache/loolwsd && \
|
||||
chown -R lool /var/cache/loolwsd && \
|
||||
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /opt/lool/bin/loolforkit && \
|
||||
setcap cap_sys_admin=ep /opt/lool/bin/loolmount && \
|
||||
mkdir -p /etc/coolwsd && \
|
||||
mv /opt/cool/coolwsd.xml /etc/coolwsd/ && \
|
||||
mv /opt/cool/coolkitconfig.xcu /etc/coolwsd/ && \
|
||||
chown -R cool /etc/coolwsd && \
|
||||
mkdir -p /opt/cool/child-roots && \
|
||||
chown -R cool /opt/* && \
|
||||
mkdir -p /var/cache/coolwsd && \
|
||||
chown -R cool /var/cache/coolwsd && \
|
||||
setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /opt/cool/bin/coolforkit && \
|
||||
setcap cap_sys_admin=ep /opt/cool/bin/coolmount && \
|
||||
mkdir -p /usr/share/hunspell && \
|
||||
mkdir -p /usr/share/hyphen && \
|
||||
mkdir -p /usr/share/mythes && \
|
||||
mkdir -p /var/cache/loolwsd && \
|
||||
chown -R lool /var/cache/loolwsd && \
|
||||
mkdir -p /var/log/lool && \
|
||||
touch /var/log/lool/loolwsd.log && \
|
||||
chown -R lool /var/log/lool && \
|
||||
mkdir -p /var/cache/coolwsd && \
|
||||
chown -R cool /var/cache/coolwsd && \
|
||||
mkdir -p /var/log/cool && \
|
||||
touch /var/log/cool/coolwsd.log && \
|
||||
chown -R cool /var/log/cool && \
|
||||
\
|
||||
### Setup LibreOffice Online Jails
|
||||
sudo -u lool /opt/lool/bin/loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice && \
|
||||
sudo -u cool /opt/cool/bin/coolwsd-systemplate-setup /opt/cool/systemplate /opt/libreoffice && \
|
||||
\
|
||||
if [ -d "/build-assets/container/src" ] ; then cp -R /build-assets/container/src/* /usr/src/libreoffice-container ; fi; \
|
||||
if [ -d "/build-assets/container/scripts" ] ; then for script in /build-assets/container/scripts/*.sh; do echo "** Applying $script"; bash $script; done && \ ; fi ; \
|
||||
|
|
|
|||
67
README.md
67
README.md
|
|
@ -1,9 +1,9 @@
|
|||
# github.com/tiredofit/docker-libreoffice-online
|
||||
# github.com/tiredofit/docker-collabora-online
|
||||
|
||||
[](https://github.com/tiredofit/docker-libreoffice-online/releases/latest)
|
||||
[](https://github.com/tiredofit/docker-libreoffice-online/actions?query=workflow%3Abuild)
|
||||
[](https://hub.docker.com/r/tiredofit/libreoffice-online/)
|
||||
[](https://hub.docker.com/r/tiredofit/libreoffice-online/)
|
||||
[](https://github.com/tiredofit/docker-collabora-online/releases/latest)
|
||||
[](https://github.com/tiredofit/docker-collabora-online/actions?query=workflow%3Abuild)
|
||||
[](https://hub.docker.com/r/tiredofit/collabora-online/)
|
||||
[](https://hub.docker.com/r/tiredofit/collabora-online/)
|
||||
[](https://github.com/sponsors/tiredofit)
|
||||
[](https://www.paypal.me/tiredofit)
|
||||
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
## About
|
||||
|
||||
This will build a Docker image for [LibreOffice Online](https://libreoffice.org/) for editing documents in a browser from supported applications.
|
||||
This will build a Docker image for [Collabora Online](https://www.collaboraoffice.com/collabora-online//) for editing documents in a browser from supported applications.
|
||||
|
||||
* Configurable Concurrent User and Document Limit (set to generarous values by default)
|
||||
* Custom Font Support
|
||||
|
|
@ -72,21 +72,22 @@ This will build a Docker image for [LibreOffice Online](https://libreoffice.org/
|
|||
|
||||
|
||||
### Prebuilt Images
|
||||
Builds of the image are available on [Docker Hub](https://hub.docker.com/r/tiredofit/libreoffice-online) and is the recommended method of installation.
|
||||
Builds of the image are available on [Docker Hub](https://hub.docker.com/r/tiredofit/collabora-online) and is the recommended method of installation.
|
||||
|
||||
```bash
|
||||
docker pull tiredofit/libreoffice-online:(imagetag)
|
||||
docker pull tiredofit/collabora-online:(imagetag)
|
||||
```
|
||||
|
||||
The following image tags are available along with their taged release based on what's written in the [Changelog](CHANGELOG.md):
|
||||
|
||||
| LibreOffice version | LibreOffice Online version | Tag |
|
||||
| ------------------- | -------------------------- | -------- |
|
||||
| `6.4.x` | `6.4.x` | `latest` |
|
||||
| `6.4.x` | `6.4.x` | `2.1` |
|
||||
| `6.4.x` | `6.4.x` | `2.0` |
|
||||
| `6.0.x` | `4.0.x` | `1.6` |
|
||||
| `5.3.x` | `3.4.x` | 1.1 |
|
||||
| LibreOffice version | Collabora Online version | Tag |
|
||||
| ------------------- | ------------------------- | -------- |
|
||||
| `2021` | `21.11.0` | `latest` |
|
||||
| `2021` | `21.11.0` | `2.3.0` |
|
||||
| `6.4.x` | `6.4.x` | `2.1` |
|
||||
| `6.4.x` | `6.4.x` | `2.0` |
|
||||
| `6.0.x` | `4.0.x` | `1.6` |
|
||||
| `5.3.x` | `3.4.x` | `1.1` |
|
||||
|
||||
#### Multi Architecture
|
||||
Images are built primarily for `amd64` architecture, and may also include builds for `arm/v6`, `arm/v7`, `arm64` and others. These variants are all unsupported. Consider [sponsoring](https://github.com/sponsors/tiredofit) my work so that I can work with various hardware. To see if this image supports multiple architecures, type `docker manifest (image):(tag)`
|
||||
|
|
@ -105,17 +106,17 @@ The following directories should be mapped for persistent storage in order to ut
|
|||
|
||||
| Folder | Description |
|
||||
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| `/var/log/loolwsd` | Log files |
|
||||
| `/assets/custom` | If you want to update the theme of LibreOffice online, dropping files in here will overwrite /opt/lool/share on startup |
|
||||
| `/logs/` | Log files |
|
||||
| `/assets/custom` | If you want to update the theme of Collabora online, dropping files in here will overwrite /opt/cool/share on startup |
|
||||
| `/assets/custom-fonts` | (Optional) If you want to include custom truetype fonts, place them in this folder |
|
||||
| `/assets/custom-scripts` | (Optional) If you want to execute a bash script before the application starts, drop your files here |
|
||||
| `/etc/loolwsd/certs` | (Optional) If you would like to use your own certificates, map this volume and set appropriate variables |
|
||||
| `/etc/coolwsd/certs` | (Optional) If you would like to use your own certificates, map this volume and set appropriate variables |
|
||||
|
||||
### Environment Variables
|
||||
|
||||
#### Base Images used
|
||||
|
||||
This image relies on an [Alpine Linux](https://hub.docker.com/r/tiredofit/debian) base image that relies on an [init system](https://github.com/just-containers/s6-overlay) for added capabilities. Outgoing SMTP capabilities are handlded via `msmtp`. Individual container performance monitoring is performed by [zabbix-agent](https://zabbix.org). Additional tools include: `bash`,`curl`,`less`,`logrotate`,`nano`,`vim`.
|
||||
This image relies on a [Debian Linux](https://hub.docker.com/r/tiredofit/debian) base image that relies on an [init system](https://github.com/just-containers/s6-overlay) for added capabilities. Outgoing SMTP capabilities are handlded via `msmtp`. Individual container performance monitoring is performed by [zabbix-agent](https://zabbix.org). Additional tools include: `bash`,`curl`,`less`,`logrotate`,`nano`,`vim`.
|
||||
|
||||
Be sure to view the following repositories to understand all the customizable options:
|
||||
|
||||
|
|
@ -134,19 +135,19 @@ Be sure to view the following repositories to understand all the customizable op
|
|||
| `WATERMARK_TEXT` | Text to display for watermark | `` |
|
||||
|
||||
#### Administration
|
||||
| Parameter | Description | Default |
|
||||
| ---------------------- | --------------------------------------------- | ------------- |
|
||||
| `ENABLE_ADMIN_CONSOLE` | Enable Administration Console | `TRUE` |
|
||||
| `ADMIN_USER` | User for accessing Administration Console | `admin` |
|
||||
| `ADMIN_PASS` | Password for accessing Administration Console | `libreoffice` |
|
||||
| Parameter | Description | Default |
|
||||
| ---------------------- | --------------------------------------------- | ----------------- |
|
||||
| `ENABLE_ADMIN_CONSOLE` | Enable Administration Console | `TRUE` |
|
||||
| `ADMIN_USER` | User for accessing Administration Console | `admin` |
|
||||
| `ADMIN_PASS` | Password for accessing Administration Console | `collaboraonline` |
|
||||
|
||||
#### Logging
|
||||
| Parameter | Description | Default |
|
||||
| -------------------- | ------------------------------------------------------------------------------------------------ | --------------- |
|
||||
| `LOG_TYPE` | Write Logs to `CONSOLE` or to `FILE` | `CONSOLE` |
|
||||
| `LOG_LEVEL` | Log Level - Available `none, fatal, critical, error, warning, notice, information, debug, trace` | `warning` |
|
||||
| `LOG_PATH` | Log Path | `/var/log/lool` |
|
||||
| `LOG_FILE` | Log File | `lool.log` |
|
||||
| `LOG_PATH` | Log Path | `/var/log/cool` |
|
||||
| `LOG_FILE` | Log File | `cool.log` |
|
||||
| `LOG_ANONYMIZE` | Anonymize File+User information in Logs `TRUE` or `FALSE` | `FALSE` |
|
||||
| `LOG_ANONYMIZE_SALT` | Salt for anonymizing log data | 8 char random |
|
||||
| `LOG_CLIENT_CONSOLE` | Log in users browser console | `false` |
|
||||
|
|
@ -212,7 +213,7 @@ The image comes with English (US, GB, Canada variants) baked into the image, how
|
|||
| `ENABLE_TLS_REVERSE_PROXY` | If using a Reverse SSL terminating proxy in front of this container | `TRUE` |
|
||||
| `TLS_CA_FILENAME` | TLS CA Cert filename with extension | `ca-chain-cert.pem` |
|
||||
| `TLS_CERT_FILENAME` | TLS Certificate filename with extension | `cert.pem` |
|
||||
| `TLS_CERT_PATH` | TLS certificates path | `/etc/loolwsd/certs` |
|
||||
| `TLS_CERT_PATH` | TLS certificates path | `/etc/coolwsd/certs` |
|
||||
| `TLS_KEY_FILENAME` | TLS Private Key filename with extension | `key.pem` |
|
||||
|
||||
#### Performance and Limits
|
||||
|
|
@ -220,7 +221,7 @@ The image comes with English (US, GB, Canada variants) baked into the image, how
|
|||
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
||||
| `AUTO_SAVE` | The number of seconds after which document, if modified, should be saved | `300` |
|
||||
| `BATCH_PRIORITY` | A (lower) priority for use by batch convert to processes to avoid starving interactive ones | `5` |
|
||||
| `CONNECTION_TIMEOUT` | Connection, Send, Receeive timeout in seconds for connections initiated by loolwsd | `30` |
|
||||
| `CONNECTION_TIMEOUT` | Connection, Send, Receeive timeout in seconds for connections initiated by coolwsd | `30` |
|
||||
| `FILE_SIZE_LIMIT` | The maximum file size allowed to each document process to write | `0` (unlimited) |
|
||||
| `IDLE_SAVE` | The number of idle seconds after which document, if modified, should be saved | `30` |
|
||||
| `IDLE_UNLOAD_TIMEOUT` | The maximum number of seconds before unloading an idle documen | `3600` |
|
||||
|
|
@ -251,14 +252,14 @@ The image comes with English (US, GB, Canada variants) baked into the image, how
|
|||
| ----------------------- | ------------------------------------------------------- | --------------- |
|
||||
| `ALLOW_172_XX_SUBNET` | Allow 172.16.0.0/12 Subnet | `TRUE` |
|
||||
| `ENABLE_CAPABILITIES` | Enable Capabilities | `TRUE` |
|
||||
| `ENABLE_CONFIG_RELOAD` | Enable Reload of loolwsd if config changed in container | `TRUE` |
|
||||
| `ENABLE_CONFIG_RELOAD` | Enable Reload of coolwsd if config changed in container | `TRUE` |
|
||||
| `ENABLE_SECCOMP` | Enable Seccomp | `TRUE` |
|
||||
| `LOLEAFLET_HTML` | Name of loleaflet.html to use | `loleafet.html` |
|
||||
| `LOLEAFLET_HTML` | Name of browser.html to use | `loleafet.html` |
|
||||
| `REDLINING_AS_COMMENTS` | Show red-lines as comments | `false` |
|
||||
| `DOCUMENT_SIGNING_URL` | Endpoint URL of signing server | `` |
|
||||
| `NETWORK_PROTOCOL` | Network Protocol `ipv4` `ipv6` `all` | `ipv4` |
|
||||
| `ENABLE_WEBDAV` | Enable WebDav Storage | `FALSE` |
|
||||
| `FILE_SERVER_ROOT_PATH` | Path to directory considered as root | `loleaflet/../` |
|
||||
| `FILE_SERVER_ROOT_PATH` | Path to directory considered as root | `browser/../` |
|
||||
| `FRAME_ANCESTORS` | Hosts where interface van be hosted in Iframe | `` |
|
||||
| `ENABLE_MOUNT_JAIL` | Enable mounting jails | `true` |
|
||||
| `CHILD_ROOT_PATH` | Child root path | `child-roots` |
|
||||
|
|
@ -274,7 +275,7 @@ The following ports are exposed.
|
|||
|
||||
| Port | Description |
|
||||
| ------ | ------------------------ |
|
||||
| `9980` | Libreoffice Web Services |
|
||||
| `9980` | Collabora Web Services |
|
||||
|
||||
* * *
|
||||
## Maintenance
|
||||
|
|
@ -307,6 +308,6 @@ These images were built to serve a specific need in a production environment and
|
|||
MIT. See [LICENSE](LICENSE) for more details.
|
||||
# References
|
||||
|
||||
* https://libreoffice.org
|
||||
* https://www.collaboraoffice.com/collabora-online/
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,33 +1,33 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
|
||||
libreoffice-app:
|
||||
image: tiredofit/libreoffice-online:latest
|
||||
hostname: libreoffice.example.com
|
||||
container_name: libreoffice-app
|
||||
collabora-online-app:
|
||||
image: tiredofit/collabora-online:latest
|
||||
hostname: collabora-online.example.com
|
||||
container_name: collabora-online-app
|
||||
expose:
|
||||
- 9980
|
||||
cap_add:
|
||||
- MKNOD
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.frontend.rule=Host:libreoffice.example.com
|
||||
- traefik.frontend.rule=Host:collabora-online.example.com
|
||||
- traefik.port=9980
|
||||
- traefik.protocol=http
|
||||
- traefik.docker.network=proxy
|
||||
- traefik.backend=libreoffice-app
|
||||
- traefik.backend=collabora-online-app
|
||||
environment:
|
||||
- VIRTUAL_HOST=libreoffice.example.com
|
||||
- VIRTUAL_HOST=collabora-online.example.com
|
||||
- VIRTUAL_NETWORK=proxy
|
||||
- VIRTUAL_PORT=9980
|
||||
- VIRTUAL_PROTO=https
|
||||
- LETSENCRYPT_HOST=libreoffice.example.com
|
||||
- LETSENCRYPT_HOST=collabora-online.example.com
|
||||
- LETSENCRYPT_EMAIL=techsupport@example.com
|
||||
|
||||
- CONTAINER_NAME=libreoffice-app
|
||||
|
||||
|
||||
- CONTAINER_NAME=collabora-online-app
|
||||
|
||||
- ADMIN_USER=admin
|
||||
- ADMIN_PASS=libreoffice
|
||||
- ADMIN_PASS=collabora-online
|
||||
- ALLOWED_HOSTS=allowedhostname.example.com
|
||||
- DICTIONARIES="en_GB en_US"
|
||||
- LOG_LEVEL=warning
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
libreoffice-app:
|
||||
image: tiredofit/libreoffice-online
|
||||
hostname: libreoffice.example.com
|
||||
container_name: libreoffice-app
|
||||
collabora-online-app:
|
||||
image: tiredofit/collabora-online
|
||||
hostname: collabora-online.example.com
|
||||
container_name: collabora-online-app
|
||||
expose:
|
||||
- 9980
|
||||
cap_add:
|
||||
- MKNOD
|
||||
environment:
|
||||
- VIRTUAL_HOST=libreoffice.example.com
|
||||
- VIRTUAL_HOST=collabora-online.example.com
|
||||
- VIRTUAL_NETWORK=nginx-proxy
|
||||
- VIRTUAL_PORT=9980
|
||||
- VIRTUAL_PROTO=https
|
||||
- LETSENCRYPT_HOST=libreoffice.example.com
|
||||
- LETSENCRYPT_HOST=collabora-online.example.com
|
||||
- LETSENCRYPT_EMAIL=techsupport@example.com
|
||||
|
||||
- CONTAINER_NAME=libreoffice-app
|
||||
|
||||
|
||||
- CONTAINER_NAME=collabora-online-app
|
||||
|
||||
- ADMIN_USER=admin
|
||||
- ADMIN_PASS=libreoffice
|
||||
- ADMIN_PASS=collabora-online
|
||||
- ALLOWED_HOSTS=allowedhostname.example.com
|
||||
- DICTIONARIES="en_GB en_US"
|
||||
- LOG_LEVEL=warning
|
||||
|
|
|
|||
|
|
@ -1,30 +1,30 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
|
||||
libreoffice-online-app:
|
||||
image: tiredofit/libreoffice-online
|
||||
container_name: libreoffice-online-app
|
||||
hostname: libreoffice.example.com
|
||||
|
||||
collabora-online-app:
|
||||
image: tiredofit/collabora-online
|
||||
container_name: collabora-online-app
|
||||
hostname: collabora-online.example.com
|
||||
expose:
|
||||
- 9980
|
||||
cap_add:
|
||||
- MKNOD
|
||||
- NET_ADMIN
|
||||
privileged: true
|
||||
labels:
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.frontend.rule=Host:libreoffice.example.com
|
||||
- traefik.frontend.rule=Host:collabora-online.example.com
|
||||
- traefik.port=9980
|
||||
- traefik.protocol=http
|
||||
- traefik.docker.network=proxy
|
||||
- traefik.backend=libreoffice-online-app
|
||||
- traefik.backend=collabora-online-app
|
||||
volumes:
|
||||
- ./logs:/var/log/lool
|
||||
- ./logs:/logs
|
||||
environment:
|
||||
- CONTAINER_NAME=libreoffice-online-app
|
||||
- CONTAINER_NAME=collabora-online-app
|
||||
|
||||
- ADMIN_USER=admin
|
||||
- ADMIN_PASS=libreoffice
|
||||
- ADMIN_PASS=collabora-online
|
||||
|
||||
- ALLOWED_HOSTS=^(.*)\.example\.org
|
||||
|
||||
|
|
|
|||
2
install/assets/cron/coolwsd
Normal file
2
install/assets/cron/coolwsd
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
0 0 */1 * * root find /var/cache/coolwsd -type f -a -atime +10 -exec rm {} \;
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
0 0 */1 * * root find /var/cache/loolwsd -type f -a -atime +10 -exec rm {} \;
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ ENABLE_TLS=${ENABLE_TLS:-"FALSE"}
|
|||
ENABLE_TLS_CERT_GENERATE=${ENABLE_TLS_CERT_GENERATE:-"TRUE"}
|
||||
ENABLE_TLS_REVERSE_PROXY=${ENABLE_TLS_REVERSE_PROXY:-"TRUE"}
|
||||
ENABLE_WEBDAV=${ENABLE_WEBDAV:-"FALSE"}
|
||||
FILE_SERVER_ROOT_PATH=${FILE_SERVER_ROOT_PATH:-"loleaflet/../"}
|
||||
FILE_SERVER_ROOT_PATH=${FILE_SERVER_ROOT_PATH:-"browser/../"}
|
||||
FILE_SIZE_LIMIT=${FILE_SIZE_LIMIT:-0}
|
||||
IDLE_SAVE=${IDLE_SAVE:-30}
|
||||
IDLE_UNLOAD_TIMEOUT=${IDLE_UNLOAD_TIMEOUT:-3600}
|
||||
|
|
@ -32,13 +32,13 @@ LOG_ANONYMIZE=${LOG_ANONYMIZE:-"FALSE"}
|
|||
LOG_ANONYMIZE_SALT=${LOG_ANONYMIZE_SALT:-"$(date +%s%N | cut -b12-19)"}
|
||||
LOG_CLIENT_CONSOLE=${LOG_CLIENT_CONSOLE:-"false"}
|
||||
LOG_COLOURIZE=${LOG_COLOURIZE:-"true"}
|
||||
LOG_FILE=${LOG_FILE:-"lool.log"}
|
||||
LOG_FILE=${LOG_FILE:-"cool.log"}
|
||||
LOG_FILE_FLUSH=${LOG_FILE_FLUSH:-"false"}
|
||||
LOG_LEVEL=${LOG_LEVEL:-"warning"}
|
||||
LOG_LIBREOFFICE=${LOG_LIBREOFFICE:-"-INFO-WARN"}
|
||||
LOG_PATH=${LOG_PATH:-"/var/log/lool/"}
|
||||
LOG_PATH=${LOG_PATH:-"/logs/"}
|
||||
LOG_TYPE=${LOG_TYPE:-"CONSOLE"}
|
||||
LOLEAFLET_HTML=${LOLEAFLET_HTML:-"loleaflet.html"}
|
||||
LOLEAFLET_HTML=${LOLEAFLET_HTML:-"browser.html"}
|
||||
MAX_CONVERT_LIMIT=${MAX_CONVERT_LIMIT:-100}
|
||||
MAX_FILE_LOAD_LIMIT=${MAX_FILE_LOAD_LIMIT:-100}
|
||||
MAX_OPEN_FILES=${MAX_OPEN_FILES:-0}
|
||||
|
|
@ -48,14 +48,14 @@ MEMORY_STACK_LIMIT=${MEMORY_STACK_LIMIT:-8000}
|
|||
MEMORY_USAGE_MAX=${MEMORY_USAGE_MAX:-"80.0"}
|
||||
MEMORY_VIRT_LIMIT=${MEMORY_VIRT_LIMIT:-0}
|
||||
NETWORK_PROTOCOL=${NETWORK_PROTOCOL:-"ipv4"}
|
||||
PATH_PREFIX=${PATH_PREFIX:-"/opt/lool/"}
|
||||
PATH_PREFIX=${PATH_PREFIX:-"/opt/cool/"}
|
||||
PRESPAWN_CHILD_PROCESSES=${PRESPAWN_CHILD_PROCESSES:-1}
|
||||
REDLINING_AS_COMMENTS=${REDLINING_AS_COMMENTS:-"false"}
|
||||
SETUP_TYPE=${SETUP_TYPE:-"AUTO"}
|
||||
SYS_TEMPLATE_PATH=${SYS_TEMPLATE_PATH:-"systemplate"}
|
||||
TLS_CA_FILENAME=${TLS_CA_FILENAME:-"ca-chain.cert.pem"}
|
||||
TLS_CERT_FILENAME=${TLS_CERT_FILENAME:-"cert.pem"}
|
||||
TLS_CERT_PATH=${TLS_CERT_PATH:-"/etc/loolwsd/certs"}
|
||||
TLS_CERT_PATH=${TLS_CERT_PATH:-"/etc/coolwsd/certs"}
|
||||
TLS_KEY_FILENAME=${TLS_KEY_FILENAME:-"key.pem"}
|
||||
USER_IDLE_TIMEOUT=${USER_IDLE_TIMEOUT:-900}
|
||||
USER_OUT_OF_FOCUS_TIMEOUT=${USER_OUT_OF_FOCUS_TIMEOUT:-60}
|
||||
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
set_config() {
|
||||
print_debug "Setting: '${1}' with value: '${2}'"
|
||||
/opt/lool/bin/loolconfig set ${1} ""${2}""
|
||||
/opt/cool/bin/coolconfig set ${1} ""${2}""
|
||||
}
|
||||
|
|
@ -2,20 +2,20 @@
|
|||
|
||||
source /assets/functions/00-container
|
||||
prepare_service single
|
||||
PROCESS_NAME="libreoffice-online"
|
||||
PROCESS_NAME="collabora-online"
|
||||
|
||||
sanity_var "ALLOWED_HOSTS" "Allowed Hostnames"
|
||||
|
||||
print_debug "Creating directories and setting up logging"
|
||||
mkdir -p "${LOG_PATH}"
|
||||
touch "${LOG_PATH}"/"${LOG_FILE}"
|
||||
chown -R lool "${LOG_PATH}"
|
||||
create_logrotate lool ${LOG_PATH}/${LOG_FILE} none lool lool
|
||||
chown -R cool "${LOG_PATH}"
|
||||
create_logrotate cool ${LOG_PATH}/${LOG_FILE} none cool cool
|
||||
|
||||
print_debug "Setting up DNS Resolution"
|
||||
rm /opt/lool/systemplate/etc/resolv.conf
|
||||
cp /etc/hosts /opt/lool/systemplate/etc/
|
||||
cp /etc/resolv.conf /opt/lool/systemplate/etc/
|
||||
rm /opt/cool/systemplate/etc/resolv.conf
|
||||
cp /etc/hosts /opt/cool/systemplate/etc/
|
||||
cp /etc/resolv.conf /opt/cool/systemplate/etc/
|
||||
|
||||
## Custom Dictionary Support
|
||||
if [ -n "${DICTIONARIES}" ]; then
|
||||
|
|
@ -55,14 +55,14 @@ if [ -n "${DICTIONARIES}" ]; then
|
|||
|
||||
silent apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
chown -R lool. /opt/libreoffice/share/extensions/*
|
||||
chown -R cool. /opt/libreoffice/share/extensions/*
|
||||
fi
|
||||
|
||||
### Custom File Support
|
||||
if [ -d /assets/custom ] ; then
|
||||
print_warn "Custom Files Found, Copying over top of Master.."
|
||||
cp -R /assets/custom/* /opt/lool/share/
|
||||
chown -R lool. /opt/lool/share/
|
||||
cp -R /assets/custom/* /opt/cool/share/
|
||||
chown -R cool. /opt/cool/share/
|
||||
fi
|
||||
|
||||
### Execute Custom Scripts if exist to modify parts of the system
|
||||
|
|
@ -78,12 +78,12 @@ fi
|
|||
### Load Custom Fonts
|
||||
if [ -d /assets/custom-fonts/ ] ; then
|
||||
print_warn "Found Custom Fonts to insert"
|
||||
chown -R lool /assets/custom-fonts
|
||||
chown -R cool /assets/custom-fonts
|
||||
chmod +rx /assets/custom-fonts
|
||||
ln -s /assets/custom-fonts /usr/share/fonts/truetype/custom
|
||||
silent fc-cache -f -v
|
||||
rm -rf /opt/lool/systemplate
|
||||
silent sudo -u lool /opt/lool/bin/loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice
|
||||
rm -rf /opt/cool/systemplate
|
||||
silent sudo -u cool /opt/cool/bin/coolwsd-systemplate-setup /opt/cool/systemplate /opt/libreoffice
|
||||
fi
|
||||
|
||||
if var_true "${ENABLE_TLS}" ; then
|
||||
|
|
@ -114,7 +114,7 @@ if var_true "${ENABLE_TLS}" ; then
|
|||
cp -R certs/servers/localhost/cert.pem "${TLS_CERT_PATH}"/"${TLS_CERT_FILENAME}"
|
||||
cp -R certs/ca/root.crt.pem "${TLS_CERT_PATH}"/"${TLS_CA_FILENAME}"
|
||||
rm -rf /tmp/ssl
|
||||
chown -R lool "${TLS_CERT_PATH}"
|
||||
chown -R cool "${TLS_CERT_PATH}"
|
||||
else
|
||||
if [ ! -f "${TLS_CERT_PATH}/${TLS_KEY_FILENAME}" ] || [ ! -f "${TLS_CERT_PATH}/${TLS_CA_FILENAME}" ] || [ ! -f "${TLS_CERT_PATH}/${TLS_CERT_FILENAME}" ] ; then
|
||||
print_error "TLS Certificates missing... Please switch to autogenerate mode, or place your certifcates in the correct location."
|
||||
|
|
@ -126,83 +126,83 @@ fi
|
|||
if [ "$SETUP_TYPE" = "AUTO" ]; then
|
||||
print_notice "Autogenerating Configuration File"
|
||||
### Replace Configuration directives
|
||||
sed -i -e "s|<allowed_languages \(.*\)>.*</allowed_languages>|<allowed_languages \1>${LANGUAGE}</allowed_languages>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<sys_template_path \(.*\)>.*</sys_template_path>|<sys_template_path \1>${SYS_TEMPLATE_PATH}</sys_template_path>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<child_root_path \(.*\)>.*</child_root_path>|<child_root_path \1>${CHILD_ROOT_PATH}</child_root_path>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<mount_jail_tree \(.*\)>.*</mount_jail_tree>|<mount_jail_tree \1>${ENABLE_MOUNT_JAIL}</mount_jail_tree>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<server_name \(.*\)>.*</server_name>|<server_name \1>${HOSTNAME}</server_name>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<file_server_root_path \(.*\)>.*</file_server_root_path>|<file_server_root_path \1>${FILE_SERVER_ROOT_PATH}</file_server_root_path>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<memproportion \(.*\)>.*</memproportion>|<memproportion \1>${MEMORY_USAGE_MAX}</memproportion>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<num_prespawn_children \(.*\)>.*</num_prespawn_children>|<num_prespawn_children \1>${PRESPAWN_CHILD_PROCESSES}</num_prespawn_children>|g" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<max_concurrency \(.*\)>.*<\/max_concurrency>|<max_concurrency \1>${MAX_THREADS_DOCUMENT}<\/max_concurrency>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<batch_priority \(.*\)>.*<\/batch_priority>|<batch_priority \1>${BATCH_PRIORITY}<\/batch_priority>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<document_signing_url \(.*\)>.*<\/document_signing_url>|<document_signing_url \1>${DOCUMENT_SIGNING_URL}<\/document_signing_url>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<redlining_as_comments \(.*\)>.*<\/redlining_as_comments>|<redlining_as_comments \1>${REDLINING_AS_COMMENTS}<\/redlining_as_comments>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<idle_timeout_secs \(.*\)>.*<\/idle_timeout_secs>|<idle_timeout_secs \1>${IDLE_UNLOAD_TIMEOUT}<\/idle_timeout_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<idlesave_duration_secs \(.*\)>.*<\/idlesave_duration_secs>|<idlesave_duration_secs \1>${IDLE_SAVE}<\/idlesave_duration_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<autosave_duration_secs \(.*\)>.*<\/autosave_duration_secs>|<autosave_duration_secs \1>${AUTO_SAVE}<\/autosave_duration_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<always_save_on_exit \(.*\)>.*<\/always_save_on_exit>|<always_save_on_exit \1>${ALWAYS_SAVE_ON_EXIT}<\/always_save_on_exit>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_virt_mem_mb \(.*\)>.*<\/limit_virt_mem_mb>|<limit_virt_mem_mb \1>${MEMORY_VIRT_LIMIT}<\/limit_virt_mem_mb>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_stack_mem_kb \(.*\)>.*<\/limit_stack_mem_kb>|<limit_stack_mem_kb \1>${MEMORY_STACK_LIMIT}<\/limit_stack_mem_kb>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_file_size_mb \(.*\)>.*<\/limit_file_size_mb>|<limit_file_size_mb \1>${FILE_SIZE_LIMIT}<\/limit_file_size_mb>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_num_open_files \(.*\)>.*<\/limit_num_open_files>|<limit_num_open_files \1>${MAX_OPEN_FILES}<\/limit_num_open_files>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_load_secs \(.*\)>.*<\/limit_load_secs>|<limit_load_secs \1>${MAX_FILE_LOAD_LIMIT}<\/limit_load_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_convert_secs \(.*\)>.*<\/limit_convert_secs>|<limit_convert_secs \1>${MAX_CONVERT_LIMIT}<\/limit_convert_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<cleanup desc=\(.*\)>.*>|<cleanup desc=\1>${ENABLE_CLEANUP}>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<cleanup_interval_ms \(.*\)>.*<\/cleanup_interval_ms>|<cleanup_interval_ms \1>${CLEANUP_INTERVAL}<\/cleanup_interval_ms>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<bad_behavior_period_secs \(.*\)>.*<\/bad_behavior_period_secs>|<bad_behavior_period_secs \1>${CLEANUP_BAD_BEHAVIOUR_TIME}<\/bad_behavior_period_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<idle_time_secs \(.*\)>.*<\/<idle_time_secs>|<<idle_time_secs \1>${CLEANUP_IDLE_TIME}<\/<idle_time_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_dirty_mem_mb \(.*\)>.*<\/limit_dirty_mem_mb>|<limit_dirty_mem_mb \1>${CLEANUP_LIMIT_DIRTY_MEMORY}<\/limit_dirty_mem_mb>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_cpu_per \(.*\)>.*<\/limit_cpu_per>|<limit_cpu_per \1>${CLEANUP_LIMIT_CPU_PER}<\/limit_cpu_per>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<out_of_focus_timeout_secs \(.*\)>.*<\/out_of_focus_timeout_secs>|<out_of_focus_timeout_secs \1>${USER_OUT_OF_FOCUS_TIMEOUT}<\/out_of_focus_timeout_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<idle_timeout_secs \(.*\)>.*<\/idle_timeout_secs>|<idle_timeout_secs \1>${USER_IDLE_TIMEOUT}<\/idle_timeout_secs>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<loleaflet_html \(.*\)>.*<\/loleaflet_html>|<loleaflet_html \1>${LOLEAFLET_HTML}<\/loleaflet_html>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<color \(.*\)>.*<\/color>|<color \1>${LOG_COLOURIZE}<\/color>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<level \(.*\)>.*<\/level>|<level \1>${LOG_LEVEL}<\/level>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<protocol \(.*\)>.*<\/protocol>|<protocol \1>${LOG_CLIENT_CONSOLE}<\/protocol>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<lokit_sal_log \(.*\)>.*<\/lokit_sal_log>|<lokit_sal_log \1>${LOG_LIBREOFFICE}<\/lokit_sal_log>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<loleaflet_logging \(.*\)>.*<\/loleaflet_logging>|<loleaflet_logging \1>${LOG_CLIENT_CONSOLE}<\/loleaflet_logging>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<proto \(.*\)>.*<\/proto>|<proto \1>${NETWORK_PROTOCOL}<\/proto>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<frame_ancestors \(.*\)>.*<\/frame_ancestors>|<frame_ancestors \1>${FRAME_ANCESTORS}<\/frame_ancestors>|" /etc/loolwsd/loolwsd.xml
|
||||
#sed -i -e "s|localhost<\/host>|${ALLOWED_HOSTS}<\/host>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<connection_timeout \(.*\)>.*<\/connection_timeout>|<connection_timeout \1>${CONNECTION_TIMEOUT}<\/connection_timeout>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<ca_file_path \(.*\) relative=\"false\">.*<\/ca_file_path>|<ca_file_path \1 relative=\"false\">${TLS_CERT_PATH}/${TLS_CA_FILENAME}<\/ca_file_path>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<cert_file_path \(.*\) relative=\"false\">.*<\/cert_file_path>|<cert_file_path \1 relative=\"false\">${TLS_CERT_PATH}/${TLS_CERT_FILENAME}<\/cert_file_path>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<key_file_path \(.*\) relative=\"false\">.*<\/key_file_path>|<key_file_path \1 relative=\"false\">${TLS_CERT_PATH}/${TLS_KEY_FILENAME}<\/key_file_path>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<seccomp \(.*\)>.*<\/seccomp>|<seccomp \1>${ENABLE_SECCOMP}<\/seccomp>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<capabilities \(.*\)>.*<\/capabilities>|<capabilities \1>${ENABLE_CAPABILITIES}<\/capabilities>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<opacity \(.*\)>.*<\/opacity>|<opacity \1>${WATERMARK_OPACITY}<\/opacity>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<text \(.*\)>.*<\/text>|<text \1>${WATERMARK_TEXT}<\/text>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<mode \(.*\)>.*<\/mode>|<mode \1>${INTERFACE}<\/mode>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<webdav desc=\(.*\) allow=\".*\">|<webdav desc=\1 allow=\"${ENABLE_WEBDAV}\">|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<enable desc=\(.*\)>.*<\/enable>|<enable desc=\1>${ENABLE_ADMIN_CONSOLE}<\/enable>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<username \(.*\)>.*<\/username>|<username \1>${ADMIN_USER}<\/username>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<password \(.*\)>.*<\/password>|<password \1>${ADMIN_PASS}<\/password>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<limit_data_mem_kb \(.*\)>.*<\/limit_data_mem_kb>|<limit_data_mem_kb \1>${MEMORY_DATA_LIMIT}<\/limit_data_mem_kb>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<allowed_languages \(.*\)>.*</allowed_languages>|<allowed_languages \1>${LANGUAGE}</allowed_languages>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<sys_template_path \(.*\)>.*</sys_template_path>|<sys_template_path \1>${SYS_TEMPLATE_PATH}</sys_template_path>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<child_root_path \(.*\)>.*</child_root_path>|<child_root_path \1>${CHILD_ROOT_PATH}</child_root_path>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<mount_jail_tree \(.*\)>.*</mount_jail_tree>|<mount_jail_tree \1>${ENABLE_MOUNT_JAIL}</mount_jail_tree>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<server_name \(.*\)>.*</server_name>|<server_name \1>${HOSTNAME}</server_name>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<file_server_root_path \(.*\)>.*</file_server_root_path>|<file_server_root_path \1>${FILE_SERVER_ROOT_PATH}</file_server_root_path>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<memproportion \(.*\)>.*</memproportion>|<memproportion \1>${MEMORY_USAGE_MAX}</memproportion>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<num_prespawn_children \(.*\)>.*</num_prespawn_children>|<num_prespawn_children \1>${PRESPAWN_CHILD_PROCESSES}</num_prespawn_children>|g" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<max_concurrency \(.*\)>.*<\/max_concurrency>|<max_concurrency \1>${MAX_THREADS_DOCUMENT}<\/max_concurrency>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<batch_priority \(.*\)>.*<\/batch_priority>|<batch_priority \1>${BATCH_PRIORITY}<\/batch_priority>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<document_signing_url \(.*\)>.*<\/document_signing_url>|<document_signing_url \1>${DOCUMENT_SIGNING_URL}<\/document_signing_url>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<redlining_as_comments \(.*\)>.*<\/redlining_as_comments>|<redlining_as_comments \1>${REDLINING_AS_COMMENTS}<\/redlining_as_comments>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<idle_timeout_secs \(.*\)>.*<\/idle_timeout_secs>|<idle_timeout_secs \1>${IDLE_UNLOAD_TIMEOUT}<\/idle_timeout_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<idlesave_duration_secs \(.*\)>.*<\/idlesave_duration_secs>|<idlesave_duration_secs \1>${IDLE_SAVE}<\/idlesave_duration_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<autosave_duration_secs \(.*\)>.*<\/autosave_duration_secs>|<autosave_duration_secs \1>${AUTO_SAVE}<\/autosave_duration_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<always_save_on_exit \(.*\)>.*<\/always_save_on_exit>|<always_save_on_exit \1>${ALWAYS_SAVE_ON_EXIT}<\/always_save_on_exit>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_virt_mem_mb \(.*\)>.*<\/limit_virt_mem_mb>|<limit_virt_mem_mb \1>${MEMORY_VIRT_LIMIT}<\/limit_virt_mem_mb>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_stack_mem_kb \(.*\)>.*<\/limit_stack_mem_kb>|<limit_stack_mem_kb \1>${MEMORY_STACK_LIMIT}<\/limit_stack_mem_kb>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_file_size_mb \(.*\)>.*<\/limit_file_size_mb>|<limit_file_size_mb \1>${FILE_SIZE_LIMIT}<\/limit_file_size_mb>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_num_open_files \(.*\)>.*<\/limit_num_open_files>|<limit_num_open_files \1>${MAX_OPEN_FILES}<\/limit_num_open_files>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_load_secs \(.*\)>.*<\/limit_load_secs>|<limit_load_secs \1>${MAX_FILE_LOAD_LIMIT}<\/limit_load_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_convert_secs \(.*\)>.*<\/limit_convert_secs>|<limit_convert_secs \1>${MAX_CONVERT_LIMIT}<\/limit_convert_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<cleanup desc=\(.*\)>.*>|<cleanup desc=\1>${ENABLE_CLEANUP}>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<cleanup_interval_ms \(.*\)>.*<\/cleanup_interval_ms>|<cleanup_interval_ms \1>${CLEANUP_INTERVAL}<\/cleanup_interval_ms>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<bad_behavior_period_secs \(.*\)>.*<\/bad_behavior_period_secs>|<bad_behavior_period_secs \1>${CLEANUP_BAD_BEHAVIOUR_TIME}<\/bad_behavior_period_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<idle_time_secs \(.*\)>.*<\/<idle_time_secs>|<<idle_time_secs \1>${CLEANUP_IDLE_TIME}<\/<idle_time_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_dirty_mem_mb \(.*\)>.*<\/limit_dirty_mem_mb>|<limit_dirty_mem_mb \1>${CLEANUP_LIMIT_DIRTY_MEMORY}<\/limit_dirty_mem_mb>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_cpu_per \(.*\)>.*<\/limit_cpu_per>|<limit_cpu_per \1>${CLEANUP_LIMIT_CPU_PER}<\/limit_cpu_per>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<out_of_focus_timeout_secs \(.*\)>.*<\/out_of_focus_timeout_secs>|<out_of_focus_timeout_secs \1>${USER_OUT_OF_FOCUS_TIMEOUT}<\/out_of_focus_timeout_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<idle_timeout_secs \(.*\)>.*<\/idle_timeout_secs>|<idle_timeout_secs \1>${USER_IDLE_TIMEOUT}<\/idle_timeout_secs>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<browser_html \(.*\)>.*<\/browser_html>|<browser_html \1>${LOLEAFLET_HTML}<\/browser_html>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<color \(.*\)>.*<\/color>|<color \1>${LOG_COLOURIZE}<\/color>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<level \(.*\)>.*<\/level>|<level \1>${LOG_LEVEL}<\/level>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<protocol \(.*\)>.*<\/protocol>|<protocol \1>${LOG_CLIENT_CONSOLE}<\/protocol>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<lokit_sal_log \(.*\)>.*<\/lokit_sal_log>|<lokit_sal_log \1>${LOG_LIBREOFFICE}<\/lokit_sal_log>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<browser_logging \(.*\)>.*<\/browser_logging>|<browser_logging \1>${LOG_CLIENT_CONSOLE}<\/browser_logging>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<proto \(.*\)>.*<\/proto>|<proto \1>${NETWORK_PROTOCOL}<\/proto>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<frame_ancestors \(.*\)>.*<\/frame_ancestors>|<frame_ancestors \1>${FRAME_ANCESTORS}<\/frame_ancestors>|" /etc/coolwsd/coolwsd.xml
|
||||
#sed -i -e "s|localhost<\/host>|${ALLOWED_HOSTS}<\/host>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<connection_timeout \(.*\)>.*<\/connection_timeout>|<connection_timeout \1>${CONNECTION_TIMEOUT}<\/connection_timeout>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<ca_file_path \(.*\) relative=\"false\">.*<\/ca_file_path>|<ca_file_path \1 relative=\"false\">${TLS_CERT_PATH}/${TLS_CA_FILENAME}<\/ca_file_path>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<cert_file_path \(.*\) relative=\"false\">.*<\/cert_file_path>|<cert_file_path \1 relative=\"false\">${TLS_CERT_PATH}/${TLS_CERT_FILENAME}<\/cert_file_path>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<key_file_path \(.*\) relative=\"false\">.*<\/key_file_path>|<key_file_path \1 relative=\"false\">${TLS_CERT_PATH}/${TLS_KEY_FILENAME}<\/key_file_path>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<seccomp \(.*\)>.*<\/seccomp>|<seccomp \1>${ENABLE_SECCOMP}<\/seccomp>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<capabilities \(.*\)>.*<\/capabilities>|<capabilities \1>${ENABLE_CAPABILITIES}<\/capabilities>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<opacity \(.*\)>.*<\/opacity>|<opacity \1>${WATERMARK_OPACITY}<\/opacity>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<text \(.*\)>.*<\/text>|<text \1>${WATERMARK_TEXT}<\/text>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<mode \(.*\)>.*<\/mode>|<mode \1>${INTERFACE}<\/mode>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<webdav desc=\(.*\) allow=\".*\">|<webdav desc=\1 allow=\"${ENABLE_WEBDAV}\">|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<enable desc=\(.*\)>.*<\/enable>|<enable desc=\1>${ENABLE_ADMIN_CONSOLE}<\/enable>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<username \(.*\)>.*<\/username>|<username \1>${ADMIN_USER}<\/username>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<password \(.*\)>.*<\/password>|<password \1>${ADMIN_PASS}<\/password>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<limit_data_mem_kb \(.*\)>.*<\/limit_data_mem_kb>|<limit_data_mem_kb \1>${MEMORY_DATA_LIMIT}<\/limit_data_mem_kb>|" /etc/coolwsd/coolwsd.xml
|
||||
|
||||
if var_false "${ENABLE_TLS}" ; then
|
||||
sed -i -E "s|<enable type=\"bool\" desc=\"Controls(.*)>.*<\/enable>|<enable type=\"bool\" desc=\"Controls\1>false<\/enable>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -E "s|<enable type=\"bool\" desc=\"Controls(.*)>.*<\/enable>|<enable type=\"bool\" desc=\"Controls\1>false<\/enable>|" /etc/coolwsd/coolwsd.xml
|
||||
fi
|
||||
|
||||
if var_true "${ENABLE_TLS_REVERSE_PROXY}" ; then
|
||||
sed -i -e "s|<termination \(.*\)>.*<\/termination>|<termination \1>true<\/termination>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<termination \(.*\)>.*<\/termination>|<termination \1>true<\/termination>|" /etc/coolwsd/coolwsd.xml
|
||||
else
|
||||
sed -i -e "s|<termination \(.*\)>.*<\/termination>|<termination \1>false<\/termination>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<termination \(.*\)>.*<\/termination>|<termination \1>false<\/termination>|" /etc/coolwsd/coolwsd.xml
|
||||
fi
|
||||
|
||||
if var_true "${LOG_ANONYMIZE}"; then
|
||||
sed -i -e "s|<anonymize_user_data \(.*\)>.*<\/anonymize_user_data>|<anonymize_user_data \1>${LOG_ANONYMIZE}<\/anonymize_user_data>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<anonymization_salt \(.*\)>.*<\/anonymization_salt>|<anonymization_salt \1>${LOG_ANONYMIZE_SALT}<\/anonymization_salt>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<anonymize_user_data \(.*\)>.*<\/anonymize_user_data>|<anonymize_user_data \1>${LOG_ANONYMIZE}<\/anonymize_user_data>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<anonymization_salt \(.*\)>.*<\/anonymization_salt>|<anonymization_salt \1>${LOG_ANONYMIZE_SALT}<\/anonymization_salt>|" /etc/coolwsd/coolwsd.xml
|
||||
fi
|
||||
|
||||
if [ "$LOG_TYPE" = "FILE" ]; then
|
||||
sed -i -e "s|<file enable=\"false\"|<file enable=\"true\"|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<property name=\"path\"\(.*\)>.*<\/property>|<property name=\"path\" \1>${LOG_PATH}/${LOG_FILE}<\/property>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i -e "s|<property name=\"flush\"\(.*\)>.*<\/property>|<property name=\"flush\" \1>${LOG_FILE_FLUSH}<\/property>|" /etc/loolwsd/loolwsd.xml
|
||||
sed -i "s|<LOG_PATH>|${LOG_PATH}|g" /etc/logrotate.d/loolwsd
|
||||
sed -i -e "s|<file enable=\"false\"|<file enable=\"true\"|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<property name=\"path\"\(.*\)>.*<\/property>|<property name=\"path\" \1>${LOG_PATH}/${LOG_FILE}<\/property>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i -e "s|<property name=\"flush\"\(.*\)>.*<\/property>|<property name=\"flush\" \1>${LOG_FILE_FLUSH}<\/property>|" /etc/coolwsd/coolwsd.xml
|
||||
sed -i "s|<LOG_PATH>|${LOG_PATH}|g" /etc/logrotate.d/coolwsd
|
||||
else
|
||||
print_debug "Log: Console"
|
||||
rm -rf /etc/logrotate.d/loolwsd
|
||||
rm -rf /etc/logrotate.d/coolwsd
|
||||
fi
|
||||
|
||||
### Allowed Hosts
|
||||
|
|
@ -210,23 +210,23 @@ if [ "$SETUP_TYPE" = "AUTO" ]; then
|
|||
for host in $allowed_hosts
|
||||
do
|
||||
print_info "Adding Allowed Host: ${host}"
|
||||
sed -i "/>localhost<\/host>/a \ \ \ \ \ \ \ \ \ \ \ \ \<host desc=\"Docker\ added\ regex\ pattern\ of\ hostname\ to\ allow\ or\ deny.\"\ allow=\"true\">${host}</host>" /etc/loolwsd/loolwsd.xml
|
||||
sed -i "/>localhost<\/host>/a \ \ \ \ \ \ \ \ \ \ \ \ \<host desc=\"Docker\ added\ regex\ pattern\ of\ hostname\ to\ allow\ or\ deny.\"\ allow=\"true\">${host}</host>" /etc/coolwsd/coolwsd.xml
|
||||
done
|
||||
|
||||
if var_true "${ALLOW_172_XX_SUBNET}" ; then
|
||||
print_debug "Allowing 172.16.0.0/12 Subnet"
|
||||
sed -i "/<\/post_allow>/i \ \ \ \ \ \ \ \ <host\ desc=\"Additional\ Docker\ Networks to allow\">172\\.1\[6789\]\.\[0-9\]\{1,3\}\.\[0-9\]\{1,3\}<\/host>" /etc/loolwsd/loolwsd.xml
|
||||
sed -i "/<\/post_allow>/i \ \ \ \ \ \ \ \ <host\ desc=\"Additional\ Docker\ Networks to allow\">172\\.2\[0-9\]\\.\[0-9\]\{1,3\}\\.\[0-9\]\{1,3\}<\/host>" /etc/loolwsd/loolwsd.xml
|
||||
sed -i "/<\/post_allow>/i \ \ \ \ \ \ \ \ <host\ desc=\"Additional\ Docker\ Networks to allow\">172\\.3\[01\]\\.\[0-9\]\{1,3\}\\.\[0-9\]\{1,3\}<\/host>" /etc/loolwsd/loolwsd.xml
|
||||
sed -i "/<\/post_allow>/i \ \ \ \ \ \ \ \ <host\ desc=\"Additional\ Docker\ Networks to allow\">172\\.1\[6789\]\.\[0-9\]\{1,3\}\.\[0-9\]\{1,3\}<\/host>" /etc/coolwsd/coolwsd.xml
|
||||
sed -i "/<\/post_allow>/i \ \ \ \ \ \ \ \ <host\ desc=\"Additional\ Docker\ Networks to allow\">172\\.2\[0-9\]\\.\[0-9\]\{1,3\}\\.\[0-9\]\{1,3\}<\/host>" /etc/coolwsd/coolwsd.xml
|
||||
sed -i "/<\/post_allow>/i \ \ \ \ \ \ \ \ <host\ desc=\"Additional\ Docker\ Networks to allow\">172\\.3\[01\]\\.\[0-9\]\{1,3\}\\.\[0-9\]\{1,3\}<\/host>" /etc/coolwsd/coolwsd.xml
|
||||
fi
|
||||
fi
|
||||
|
||||
# Generate WOPI proof key
|
||||
if [ ! -f /etc/loolwsd/proof_key.pub ]; then
|
||||
silent /opt/lool/bin/loolwsd-generate-proof-key
|
||||
if [ ! -f /etc/coolwsd/proof_key.pub ]; then
|
||||
silent /opt/cool/bin/coolwsd-generate-proof-key
|
||||
fi
|
||||
|
||||
# Enable Config Reload (Restart when /etc/loolwsd/loolwsd.xml changes)
|
||||
# Enable Config Reload (Restart when /etc/coolwsd/coolwsd.xml changes)
|
||||
if var_false "${ENABLE_CONFIG_RELOAD}" ; then
|
||||
print_debug "Disabling Automatic Configuration Reloader"
|
||||
rm -rf /etc/services.available/11-inotify
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
source /assets/functions/00-container
|
||||
prepare_service defaults single
|
||||
PROCESS_NAME="libreoffice-online"
|
||||
PROCESS_NAME="collabora-online"
|
||||
|
||||
check_container_initialized
|
||||
check_service_initialized init
|
||||
|
|
@ -11,12 +11,12 @@ liftoff
|
|||
export LC_CTYPE=en_US.UTF-8
|
||||
|
||||
print_start "Starting Libreoffice Online Web Services daemon"
|
||||
exec sudo -u lool /opt/lool/bin/loolwsd \
|
||||
exec sudo -u cool /opt/cool/bin/coolwsd \
|
||||
--version \
|
||||
--o:sys_template_path=/opt/lool/systemplate \
|
||||
--o:sys_template_path=/opt/cool/systemplate \
|
||||
--o:lo_template_path=/opt/libreoffice \
|
||||
--o:child_root_path=/opt/lool/child-roots \
|
||||
--o:file_server_root_path=/opt/lool/share/loolwsd storage.filesystem[@allow]=true \
|
||||
--o:child_root_path=/opt/cool/child-roots \
|
||||
--o:file_server_root_path=/opt/cool/share/coolwsd storage.filesystem[@allow]=true \
|
||||
--o:admin_console.username=${ADMIN_USER} \
|
||||
--o:admin_console.password=${ADMIN_PASS} \
|
||||
${EXTRA_OPTIONS} >> /var/log/lool/loolwsd.log
|
||||
${EXTRA_OPTIONS} >> ${LOG_PATH}/${LOG_FILE}
|
||||
|
|
@ -5,12 +5,12 @@ prepare_service defaults single
|
|||
PROCESS_NAME="config-reloader"
|
||||
|
||||
check_container_initialized
|
||||
check_service_initialized init 10-loolwsd
|
||||
check_service_initialized init 10-coolwsd
|
||||
liftoff
|
||||
|
||||
while inotifywait -q -e create,delete,modify,attrib /etc/loolwsd/loolwsd.xml
|
||||
while inotifywait -q -e create,delete,modify,attrib /etc/coolwsd/coolwsd.xml
|
||||
do
|
||||
print_info "Reloading loolwsd configuration do to a detected certificate change"
|
||||
pkill -f --signal 1 loolwsd
|
||||
print_info "Reloading coolwsd configuration do to a detected certificate change"
|
||||
pkill -f --signal 1 coolwsd
|
||||
exit 0
|
||||
done
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
UserParameter=cool.mem_consumed,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-cool.py | grep 'cool.mem.consumed' | awk '{print $2}'
|
||||
UserParameter=cool.active_users,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-cool.py | grep 'cool.active_users_count' | awk '{print $2}'
|
||||
UserParameter=cool.active_docs,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-cool.py | grep 'cool.active_docs' | awk '{print $2}'
|
||||
UserParameter=cool.bytes_sent,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-cool.py | grep 'cool.sent_bytes' | awk '{print $2}'
|
||||
UserParameter=cool.bytes_received,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-cool.py | grep 'cool.recv_bytes' | awk '{print $2}'
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
UserParameter=lool.mem_consumed,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-lool.py | grep 'lool.mem.consumed' | awk '{print $2}'
|
||||
UserParameter=lool.active_users,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-lool.py | grep 'lool.active_users_count' | awk '{print $2}'
|
||||
UserParameter=lool.active_docs,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-lool.py | grep 'lool.active_docs' | awk '{print $2}'
|
||||
UserParameter=lool.bytes_sent,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-lool.py | grep 'lool.sent_bytes' | awk '{print $2}'
|
||||
UserParameter=lool.bytes_received,/etc/zabbix/zabbix_agentd.conf.d/scripts/check-lool.py | grep 'lool.recv_bytes' | awk '{print $2}'
|
||||
|
|
@ -28,12 +28,12 @@ def get_doc_info(socket_url,token_value):
|
|||
return data
|
||||
|
||||
if __name__ == '__main__':
|
||||
url = "http://localhost:9980/loleaflet/dist/admin/admin.html"
|
||||
url = "http://localhost:9980/browser/dist/admin/admin.html"
|
||||
username = os.getenv('ADMIN_USER')
|
||||
password = os.getenv('ADMIN_PASS')
|
||||
token_value = get_token_value(url,username,password)
|
||||
socket_url = "ws://localhost:9980/lool/adminws"
|
||||
socket_url = "ws://localhost:9980/cool/adminws"
|
||||
data = get_doc_info(socket_url,token_value)
|
||||
for key,value in data.items() :
|
||||
print("lool."+key , value)
|
||||
print("cool."+key , value)
|
||||
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
</groups>
|
||||
<templates>
|
||||
<template>
|
||||
<template>APP - Libreoffice Online</template>
|
||||
<name>APP - Libreoffice Online</name>
|
||||
<template>APP - Collabora Online</template>
|
||||
<name>APP - Collabora Online</name>
|
||||
<description/>
|
||||
<groups>
|
||||
<group>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>lool.active_docs</key>
|
||||
<key>cool.active_docs</key>
|
||||
<delay>1m</delay>
|
||||
<history>7d</history>
|
||||
<trends>365d</trends>
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>lool.active_users</key>
|
||||
<key>cool.active_users</key>
|
||||
<delay>1m</delay>
|
||||
<history>7d</history>
|
||||
<trends>365d</trends>
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>lool.bytes_received</key>
|
||||
<key>cool.bytes_received</key>
|
||||
<delay>1m</delay>
|
||||
<history>7d</history>
|
||||
<trends>365d</trends>
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>lool.bytes_sent</key>
|
||||
<key>cool.bytes_sent</key>
|
||||
<delay>1m</delay>
|
||||
<history>7d</history>
|
||||
<trends>365d</trends>
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>lool.mem_consumed</key>
|
||||
<key>cool.mem_consumed</key>
|
||||
<delay>1m</delay>
|
||||
<history>7d</history>
|
||||
<trends>365d</trends>
|
||||
|
|
@ -233,7 +233,7 @@
|
|||
<type>0</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>proc.num[loolwsd]</key>
|
||||
<key>proc.num[coolwsd]</key>
|
||||
<delay>1m</delay>
|
||||
<history>7d</history>
|
||||
<trends>365d</trends>
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
</templates>
|
||||
<triggers>
|
||||
<trigger>
|
||||
<expression>{APP - Libreoffice Online:proc.num[loolwsd].sum(#3)}=0</expression>
|
||||
<expression>{APP - Libreoffice Online:proc.num[coolwsd].sum(#3)}=0</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Libreoffice Online Service is down</name>
|
||||
|
|
@ -323,7 +323,7 @@
|
|||
<type>0</type>
|
||||
<item>
|
||||
<host>APP - Libreoffice Online</host>
|
||||
<key>lool.active_docs</key>
|
||||
<key>cool.active_docs</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
|
|
@ -355,7 +355,7 @@
|
|||
<type>0</type>
|
||||
<item>
|
||||
<host>APP - Libreoffice Online</host>
|
||||
<key>lool.active_users</key>
|
||||
<key>cool.active_users</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
|
|
@ -387,7 +387,7 @@
|
|||
<type>0</type>
|
||||
<item>
|
||||
<host>APP - Libreoffice Online</host>
|
||||
<key>lool.active_docs</key>
|
||||
<key>cool.active_docs</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
|
|
@ -399,7 +399,7 @@
|
|||
<type>0</type>
|
||||
<item>
|
||||
<host>APP - Libreoffice Online</host>
|
||||
<key>lool.active_users</key>
|
||||
<key>cool.active_users</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
|
|
@ -411,7 +411,7 @@
|
|||
<type>0</type>
|
||||
<item>
|
||||
<host>APP - Libreoffice Online</host>
|
||||
<key>lool.mem_consumed</key>
|
||||
<key>cool.mem_consumed</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
|
|
@ -443,7 +443,7 @@
|
|||
<type>0</type>
|
||||
<item>
|
||||
<host>APP - Libreoffice Online</host>
|
||||
<key>lool.mem_consumed</key>
|
||||
<key>cool.mem_consumed</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
Loading…
Add table
Add a link
Reference in a new issue