Browse Source

[NEW] add collabraoffice support

nj-collabra-office
default 3 years ago
parent
commit
06b7c5c999
  1. 2
      apache/build/Dockerfile
  2. 31
      collabraoffice/hooks/init
  3. 15
      collabraoffice/hooks/web_proxy-relation-joined
  4. 23
      collabraoffice/metadata.yml

2
apache/build/Dockerfile

@ -53,7 +53,7 @@ RUN apt-get update && \
pecl install mongodb && docker-php-ext-enable mongodb && \
pecl install xdebug && docker-php-ext-enable xdebug && \
pecl install imagick && docker-php-ext-enable imagick && \
MODULES="rewrite headers ssl" && \
MODULES="rewrite headers ssl proxy proxy_balancer proxy_wstunnel proxy_connect proxy_http" && \
for module in ${MODULES}; do \
a2enmod "$module"; \
done && \

31
collabraoffice/hooks/init

@ -0,0 +1,31 @@
#!/bin/bash
## Init is run on host
## For now it is run every time the script is launched, but
## it should be launched only once after build.
## Accessible variables are:
## - SERVICE_NAME Name of current service
## - DOCKER_BASE_IMAGE Base image from which this service might be built if any
## - SERVICE_DATASTORE Location on host of the DATASTORE of this service
## - SERVICE_CONFIGSTORE Location on host of the CONFIGSTORE of this service
set -e
admin_user=$(options-get admin.user 2>&1) || {
admin_user="admin"
}
admin_password=$(options-get admin.password 2>&1) || {
admin_password="admin"
}
init-config-add "\
$SERVICE_NAME:
environment:
username: \"$admin_user\"
password: \"$admin_password\"
domain: alusage\\.fr
server_name: share\\.alusage\\.fr
extra_params: --o:ssl.enable=false --o:ssl.termination=true
"

15
collabraoffice/hooks/web_proxy-relation-joined

@ -0,0 +1,15 @@
#!/bin/bash
DOMAIN=$(relation-get domain) || exit 1
echo "$DOMAIN"
echo "${DOMAIN//./\\.}"
set -e
## XXXnjeudy need <your-dot-escaped-domain> like share\\.example\\.com
config-add "\
services:
$MASTER_BASE_SERVICE_NAME:
cap_add:
- MKNOD
"

23
collabraoffice/metadata.yml

@ -0,0 +1,23 @@
# from: https://hub.docker.com/r/collabora/code/tags - https://github.com/CollaboraOnline/online/tree/master/docker
docker-image: collabora/code
#data-resources:
# - /var/www/onlyoffice/Data
#config-resources:
# - /etc/onlyoffice/documentserver
uses:
## XXXvlab: public access should NOT be necessary, but seem the only way to make
## it work: https://dev.onlyoffice.org/viewtopic.php?t=19272
web-proxy:
#constraint: required | recommended | optional
#auto: pair | summon | none ## default: pair
constraint: required
auto: summon
solves:
proxy: "Public access"
default-options:
target: !var-expand ${MASTER_BASE_SERVICE_NAME}:9980
apache-core-rules: !var-expand |
ProxyPassMatch "/cool/(.*)/ws$" wss://${MASTER_BASE_SERVICE_NAME}:9980/cool/$1/ws nocanon
ProxyPass /cool/adminws wss://${MASTER_BASE_SERVICE_NAME}:9980/cool/adminws
Loading…
Cancel
Save