mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
add Collabora Online Office and Rocket.Chat to docker-compose.yml
This commit is contained in:
parent
bc1ae1cbaa
commit
f4b541b922
@ -70,10 +70,13 @@ services:
|
||||
# 1. comment out the whole db service below AND
|
||||
# 2. set EGW_DB_HOST=localhost AND
|
||||
# 3. uncomment the next line and modify the host path (first one), it depends on your distro:
|
||||
# - RHEL/CentOS /var/lib/mysql/mysql.sock
|
||||
# - openSUSE/SLE /var/run/mysql/mysql.sock
|
||||
# - Debian/Ubuntu /var/run/mysqld/mysqld.sock
|
||||
#- /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock
|
||||
# - RHEL/CentOS /var/lib/mysql/mysql.sock:/var/run/mysqld/mysqld.sock
|
||||
# - openSUSE/SLE /var/run/mysql:/var/run/mysqld
|
||||
# - Debian/Ubuntu /var/run/mysqld:/var/run/mysqld
|
||||
#- /var/run/mysqld:/var/run/mysqld
|
||||
# private CA so egroupware can validate your certificate to talk to Collabora or Rocket.Chat
|
||||
# multiple certificates (eg. a chain) have to be single files in a directory, with one named private-ca.crt!
|
||||
#- /etc/egroupware-docker/private-ca.crt:/usr/local/share/ca-certificates/private-ca.crt:ro
|
||||
environment:
|
||||
#
|
||||
# MariaDB/MySQL host to use: for internal service use "db", for host database (socket bind-mounted into container) use "localhost"
|
||||
|
@ -110,6 +110,10 @@ server {
|
||||
location = / {
|
||||
return 301 $scheme://$http_host/egroupware/index.php;
|
||||
}
|
||||
# redirect /egroupware to /egroupware/
|
||||
location = /egroupware {
|
||||
return 301 $redirectscheme://$host/egroupware/index.php;
|
||||
}
|
||||
|
||||
# Collabora sniplet meant to be included in server block of EGroupware vhost
|
||||
# static files
|
||||
|
@ -19,6 +19,29 @@ volumes:
|
||||
# # location of deprecated EGroupware packages like Wiki, SiteMgr, KnowledgeBase
|
||||
# device: /usr/share/egroupware
|
||||
# #device: $PWD/extra
|
||||
# collabora-config
|
||||
collabora-config:
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
# to upgrade an existing non-docker installation most easy is to use the existing
|
||||
# data directory /var/lib/egroupware AND the host database see below
|
||||
#device: /var/lib/egroupware/default/loolwsd
|
||||
# otherwise data is stored in data subdirectory of the current directory
|
||||
device: $PWD/data/default/loolwsd
|
||||
# store Rocket.Chat MongoDB on an (internal) Volume
|
||||
mongo:
|
||||
# directory to store MongoDB dumps
|
||||
rocketchat-dumps:
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: $PWD/data/default/rocketchat/dump
|
||||
rocketchat-uploads:
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: $PWD/data/default/rocketchat/uploads
|
||||
services:
|
||||
egroupware:
|
||||
image: egroupware/egroupware:latest
|
||||
@ -35,10 +58,13 @@ services:
|
||||
# 1. comment out the whole db service below AND
|
||||
# 2. set EGW_DB_HOST=localhost AND
|
||||
# 3. uncomment the next line and modify the host path (first one), it depends on your distro:
|
||||
# - RHEL/CentOS /var/lib/mysql/mysql.sock
|
||||
# - openSUSE/SLE /var/run/mysql/mysql.sock
|
||||
# - Debian/Ubuntu /var/run/mysqld/mysqld.sock
|
||||
#- /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock
|
||||
# - RHEL/CentOS /var/lib/mysql/mysql.sock:/var/run/mysqld/mysqld.sock
|
||||
# - openSUSE/SLE /var/run/mysql:/var/run/mysqld
|
||||
# - Debian/Ubuntu /var/run/mysqld:/var/run/mysqld
|
||||
#- /var/run/mysqld:/var/run/mysqld
|
||||
# private CA so egroupware can validate your certificate to talk to Collabora or Rocket.Chat
|
||||
# multiple certificates (eg. a chain) have to be single files in a directory, with one named private-ca.crt!
|
||||
#- /etc/egroupware-docker/private-ca.crt:/usr/local/share/ca-certificates/private-ca.crt:ro
|
||||
environment:
|
||||
# MariaDB/MySQL host to use: for internal service use "db", for host database (socket bind-mounted into container) use "localhost"
|
||||
- EGW_DB_HOST=db
|
||||
@ -118,3 +144,65 @@ services:
|
||||
command: --schedule "0 0 4 * * *"
|
||||
container_name: egroupware-watchtower
|
||||
restart: always
|
||||
|
||||
# Collabora Online Office
|
||||
collabora-key:
|
||||
image: "quay.io/egroupware/collabora-key:stable"
|
||||
#image: collabora/code:latest
|
||||
# needs to be initialised via: docker run --rm -v dev_collabora-config:/mnt --entrypoint '/bin/cp -r /etc/loolwsd /mnt' quay.io/egroupware/collabora-key:stable
|
||||
volumes:
|
||||
- collabora-config:/etc/loolwsd
|
||||
# dont try to regenerate the (not used certificate) as volumn is readonly
|
||||
environment:
|
||||
- DONT_GEN_SSL_CERT=1
|
||||
restart: always
|
||||
container_name: collabora-key
|
||||
# set the ip-address of your docker host AND your official DNS name so Collabora
|
||||
# can access EGroupware without the need to go over your firewall
|
||||
#extra_hosts:
|
||||
#- "my.host.name:ip-address"
|
||||
|
||||
# Rocket.Chat server
|
||||
rocketchat:
|
||||
image: rocketchat/rocket.chat:latest
|
||||
command: bash -c 'for i in `seq 1 30`; do node main.js && s=$$? && break || s=$$?; echo "Tried $$i times. Waiting 5 secs..."; sleep 5; done; (exit $$s)'
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- rocketchat-uploads:/app/uploads
|
||||
# if EGroupware uses a certificate from a private CA, OAuth authentication will fail, you need to:
|
||||
# - have the CA certificate stored at /etc/egroupware-docker/private-ca.crt
|
||||
# - uncomment the next 2 lines about the private CA:
|
||||
# - /etc/egroupware-docker/private-ca.crt:/usr/local/share/ca-certificates/private-ca.crt:ro
|
||||
environment:
|
||||
# - NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/private-ca.crt
|
||||
# IMPORTANT: change ROOT_URL to your actual url eg. https://domain.com/rocketchat
|
||||
- ROOT_URL=http://localhost/rocketchat
|
||||
- PORT=3000
|
||||
- MONGO_URL=mongodb://mongo:27017/rocketchat
|
||||
- MONGO_OPLOG_URL=mongodb://mongo:27017/local
|
||||
# - HTTP_PROXY=http://proxy.domain.com
|
||||
# - HTTPS_PROXY=http://proxy.domain.com
|
||||
depends_on:
|
||||
- mongo
|
||||
container_name: rocketchat
|
||||
# set the ip-address of your docker host AND your official DNS name so Rocket.Chat
|
||||
# can access EGroupware without the need to go over your firewall
|
||||
#extra_hosts:
|
||||
#- "my.host.name:ip-address"
|
||||
|
||||
# MongoDB for Rocket.Chat
|
||||
mongo:
|
||||
image: mongo:4.0
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- mongo:/data/db
|
||||
- rocketchat-dumps:/dump
|
||||
command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1
|
||||
container_name: rocketchat-mongo
|
||||
# this container's job is just run the command to initialize the replica set.
|
||||
# it will run the command and remove himself (it will not stay running)
|
||||
mongo-init-replica:
|
||||
image: mongo:4.0
|
||||
command: 'bash -c "for i in `seq 1 30`; do mongo mongo/rocketchat --eval \"rs.initiate({ _id: ''rs0'', members: [ { _id: 0, host: ''localhost:27017'' } ]})\" && s=$$? && break || s=$$?; echo \"Tried $$i times. Waiting 5 secs...\"; sleep 5; done; (exit $$s)"'
|
||||
depends_on:
|
||||
- mongo
|
||||
|
@ -121,4 +121,38 @@ server {
|
||||
location = / {
|
||||
return 301 $redirectscheme://$host/egroupware/index.php;
|
||||
}
|
||||
# redirect /egroupware to /egroupware/
|
||||
location = /egroupware {
|
||||
return 301 $redirectscheme://$host/egroupware/index.php;
|
||||
}
|
||||
|
||||
# Collabora sniplet meant to be included in server block of EGroupware vhost
|
||||
# static files
|
||||
location ^~ /loleaflet {
|
||||
proxy_pass http://collabora-key:9980;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
# WOPI discovery URL
|
||||
location ^~ /hosting/discovery {
|
||||
proxy_pass http://collabora-key:9980;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
# websockets, download, presentation and image upload
|
||||
location ^~ /lool {
|
||||
proxy_pass http://collabora-key:9980;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
# Rocket.Chat sniplet meant to be included in server block of EGroupware vhost
|
||||
# proxy into rocketchat container
|
||||
location /rocketchat {
|
||||
proxy_pass http://rocketchat:3000;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user