diff --git a/docker-compose.yml b/docker-compose.yml index 9d138f85..f235fac7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,209 +1,210 @@ version: '3' services: coturn: container_name: kolab-coturn healthcheck: interval: 10s test: "kill -0 $$(cat /tmp/turnserver.pid)" timeout: 5s retries: 30 environment: - DB_NAME=${OPENVIDU_COTURN_REDIS_DATABASE} - DB_PASSWORD=${OPENVIDU_COTURN_REDIS_PASSWORD} - REDIS_IP=${OPENVIDU_COTURN_REDIS_IP} - TURN_PUBLIC_IP=${OPENVIDU_COTURN_IP} - TURN_LISTEN_PORT=3478 hostname: sturn.mgmt.com image: openvidu/openvidu-coturn:1.0.0 network_mode: host restart: on-failure tty: true kolab: build: context: ./docker/kolab/ container_name: kolab depends_on: - mariadb extra_hosts: - "kolab.mgmt.com:127.0.0.1" environment: - DB_HOST=${DB_HOST} - DB_ROOT_PASSWORD=Welcome2KolabSystems healthcheck: interval: 10s test: test -f /tmp/kolab-init.done timeout: 5s retries: 30 hostname: kolab.mgmt.com image: kolab network_mode: host tmpfs: - /run - /tmp - /var/run - /var/tmp tty: true volumes: + - ./ext/:/src/:ro - /etc/letsencrypt/:/etc/letsencrypt/:ro - ./docker/certs/ca.cert:/etc/pki/tls/certs/ca.cert:ro - ./docker/certs/ca.cert:/etc/pki/ca-trust/source/anchors/ca.cert:ro - ./docker/certs/kolab.hosted.com.cert:/etc/pki/tls/certs/kolab.hosted.com.cert - ./docker/certs/kolab.hosted.com.key:/etc/pki/tls/certs/kolab.hosted.com.key - ./docker/certs/kolab.mgmt.com.cert:/etc/pki/tls/certs/kolab.mgmt.com.cert - ./docker/certs/kolab.mgmt.com.key:/etc/pki/tls/certs/kolab.mgmt.com.key - ./docker/kolab/utils:/root/utils:ro - ./src/.env:/.dockerenv:ro - /sys/fs/cgroup:/sys/fs/cgroup:ro kurento-media-server: build: context: ./docker/kurento-media-server/ container_name: kolab-kurento-media-server environment: - GST_DEBUG=3,Kurento*:4,kms*:4,sdp*:4,webrtc*:4,*rtpendpoint:4,rtp*handler:4,rtpsynchronizer:4,agnosticbin:4 hostname: kurento-media-server.hosted.com image: apheleia/kurento-media-server:6.15.0 network_mode: host mariadb: container_name: kolab-mariadb environment: MYSQL_ROOT_PASSWORD: Welcome2KolabSystems TZ: "+02:00" healthcheck: interval: 10s test: test -e /var/run/mysqld/mysqld.sock timeout: 5s retries: 30 image: mariadb network_mode: host nginx: build: context: ./docker/nginx/ args: APP_WEBSITE_DOMAIN: ${APP_WEBSITE_DOMAIN:?err} healthcheck: interval: 10s test: ["CMD-SHELL", "curl -so /dev/null http://localhost/ || exit 1"] timeout: 5s retries: 30 container_name: kolab-nginx hostname: nginx.hosted.com image: kolab-nginx network_mode: host tmpfs: - /run - /tmp - /var/run - /var/tmp tty: true volumes: - ./docker/certs/imap.hosted.com.cert:/etc/pki/tls/certs/imap.hosted.com.cert - ./docker/certs/imap.hosted.com.key:/etc/pki/tls/private/imap.hosted.com.key openvidu: build: context: ./docker/openvidu/ container_name: kolab-openvidu depends_on: - kurento-media-server environment: - APP_DOMAIN=${APP_DOMAIN} - CERTIFICATE_TYPE=letsencrypt - COTURN_IP=${OPENVIDU_COTURN_IP} - COTURN_REDIS_DBNAME=${OPENVIDU_COTURN_REDIS_DATABASE} - COTURN_REDIS_PASSWORD=${OPENVIDU_COTURN_REDIS_PASSWORD} - COTURN_REDIS_IP=${OPENVIDU_COTURN_REDIS_IP} - DOMAIN_OR_PUBLIC_IP=${OPENVIDU_PUBLIC_IP} - SERVER_PORT=${OPENVIDU_SERVER_PORT} - KMS_STUN_IP=${OPENVIDU_COTURN_IP} - KMS_STUN_PORT=3478 - KMS_URIS=["ws://localhost:8888/kurento", "ws://localhost:8889/kurento"] - OPENVIDU_SECRET=${OPENVIDU_API_PASSWORD} - OPENVIDU_WEBHOOK=${OPENVIDU_WEBHOOK} - OPENVIDU_WEBHOOK_ENDPOINT=${OPENVIDU_WEBHOOK_ENDPOINT} - SERVER_SSL_ENABLED=false hostname: openvidu.hosted.com image: apheleia/openvidu:2.18.0 network_mode: host tmpfs: - /run - /tmp - /var/run - /var/tmp tty: true volumes: - /etc/letsencrypt/:/etc/letsencrypt/:ro pdns-sql: build: context: ./docker/pdns-sql/ container_name: kolab-pdns-sql depends_on: - mariadb hostname: pdns-sql image: apheleia/kolab-pdns-sql network_mode: host tmpfs: - /run - /tmp - /var/run - /var/tmp tty: true volumes: - /sys/fs/cgroup:/sys/fs/cgroup:ro proxy: build: context: ./docker/proxy/ healthcheck: interval: 10s test: ["CMD-SHELL", "curl -so /dev/null http://localhost/ || exit 1"] timeout: 5s retries: 30 container_name: kolab-proxy hostname: kanarip.internet-box.ch image: kolab-proxy network_mode: host tmpfs: - /run - /tmp - /var/run - /var/tmp tty: true volumes: - ./docker/certs/:/etc/certs/:ro - /etc/letsencrypt/:/etc/letsencrypt/:ro - /sys/fs/cgroup:/sys/fs/cgroup:ro redis: build: context: ./docker/redis/ healthcheck: interval: 10s test: "redis-cli ping || exit 1" timeout: 5s retries: 30 container_name: kolab-redis hostname: redis image: redis network_mode: host volumes: - ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro swoole: build: context: ./docker/swoole/ container_name: kolab-swoole image: apheleia/swoole:4.6.x worker: build: context: ./docker/worker/ container_name: kolab-worker depends_on: - kolab hostname: worker image: kolab-worker network_mode: host tmpfs: - /run - /tmp - /var/run - /var/tmp tty: true volumes: - ./src:/home/worker/src.orig:ro - /sys/fs/cgroup:/sys/fs/cgroup:ro diff --git a/docker/kolab/utils/100-update-roundcube.sh b/docker/kolab/utils/100-update-roundcube.sh new file mode 100755 index 00000000..cc3c1be0 --- /dev/null +++ b/docker/kolab/utils/100-update-roundcube.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# This is incomplete and clearly not how it's supposed to be done, +# but it will work for now. + +cp -Rf /src/roundcubemail/program /usr/share/roundcubemail/program + +pushd /src/roundcubemail-plugins-kolab/plugins +cp -f calendar/*.js /usr/share/roundcubemail/public_html/assets/plugins/calendar/ +find calendar/ -type f \( -name "*.php" -o -name "*.inc" \) ! -name config.inc.php -exec cp -v {} /usr/share/roundcubemail/plugins/{} \; + +find libcalendaring/ -type f \( -name "*.php" -o -name "*.inc" \) ! -name config.inc.php -exec cp -v {} /usr/share/roundcubemail/plugins/{} \; +cp -f libcalendaring/*.js /usr/share/roundcubemail/public_html/assets/plugins/libcalendaring/ + +find libkolab/ -type f \( -name "*.php" -o -name "*.inc" \) ! -name config.inc.php -exec cp -v {} /usr/share/roundcubemail/plugins/{} \; +cp -f libkolab/*.js /usr/share/roundcubemail/public_html/assets/plugins/libkolab/ +popd + +systemctl reload httpd diff --git a/docker/kolab/utils/101-update-pykolab.sh b/docker/kolab/utils/101-update-pykolab.sh new file mode 100755 index 00000000..3941964e --- /dev/null +++ b/docker/kolab/utils/101-update-pykolab.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +cp /usr/lib/python2.7/site-packages/pykolab/constants.py /tmp/constants.py +cp -Rf /src/pykolab/pykolab /usr/lib/python2.7/site-packages/ +cp /tmp/constants.py /usr/lib/python2.7/site-packages/pykolab/constants.py + +systemctl restart wallace +systemctl restart kolabd diff --git a/docker/kolab/utils/102-enable-xdebug.sh b/docker/kolab/utils/102-enable-xdebug.sh new file mode 100755 index 00000000..bb381028 --- /dev/null +++ b/docker/kolab/utils/102-enable-xdebug.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +yum -y install php-xdebug + +cat << EOF > /etc/php.d/xdebug.ini +zend_extension=/usr/lib64/php/modules/xdebug.so + +# Profiler config for xdebug3 +#xdebug.mode=profile +#xdebug.output_dir="/tmp/" +#xdebug.start_with_request=trigger + +# Profiler config for xdebug2 +#xdebug.remote_log="/tmp/xdebug.log" +xdebug.profiler_enable = 0 +# Enable using a XDEBUG_PROFILE GET/POST parameter +xdebug.profiler_enable_trigger = 1 +xdebug.profiler_output_dir = "/tmp/" +#xdebug.remote_enable=on +#xdebug.remote_port=9000 +#xdebug.remote_autostart=0 +#xdebug.remote_connect_back=on +#xdebug.idekey=editor-xdebug +EOF diff --git a/docker/kolab/utils/104-update-syncroton.sh b/docker/kolab/utils/104-update-syncroton.sh new file mode 100755 index 00000000..56cd3441 --- /dev/null +++ b/docker/kolab/utils/104-update-syncroton.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +pushd /src/syncroton/ +cp -f lib/*.php /usr/share/kolab-syncroton/lib/ +cp -Rf lib/ext/Syncroton /usr/share/kolab-syncroton/lib/ext/Syncroton +popd + +systemctl reload httpd diff --git a/ext/.gitignore b/ext/.gitignore new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/ext/.gitignore @@ -0,0 +1 @@ +* diff --git a/ext/README.md b/ext/README.md new file mode 100644 index 00000000..64bfda59 --- /dev/null +++ b/ext/README.md @@ -0,0 +1,3 @@ +Use this directory to clone external git repositories (roundcubemail, roundcubemail-plugins-kolab, pykolab). + +This can then be used for a development setup.