diff --git a/bin/quickstart.sh b/bin/quickstart.sh index 08e94159..4aa5c848 100755 --- a/bin/quickstart.sh +++ b/bin/quickstart.sh @@ -1,91 +1,94 @@ #!/bin/bash set -e function die() { echo "$1" exit 1 } rpm -qv composer >/dev/null 2>&1 || \ test ! -z "$(which composer 2>/dev/null)" || \ die "Is composer installed?" rpm -qv docker-compose >/dev/null 2>&1 || \ test ! -z "$(which docker-compose 2>/dev/null)" || \ die "Is docker-compose installed?" rpm -qv npm >/dev/null 2>&1 || \ test ! -z "$(which npm 2>/dev/null)" || \ die "Is npm installed?" rpm -qv php >/dev/null 2>&1 || \ test ! -z "$(which php 2>/dev/null)" || \ die "Is php installed?" rpm -qv php-ldap >/dev/null 2>&1 || \ test ! -z "$(php --ini | grep ldap)" || \ die "Is php-ldap installed?" rpm -qv php-mysqlnd >/dev/null 2>&1 || \ test ! -z "$(php --ini | grep mysql)" || \ die "Is php-mysqlnd installed?" test ! -z "$(php --modules | grep swoole)" || \ die "Is swoole installed?" base_dir=$(dirname $(dirname $0)) docker pull docker.io/kolab/centos7:latest -docker-compose down +docker-compose down --remove-orphans docker-compose build pushd ${base_dir}/src/ -cp .env.example .env + +if [ ! -f ".env" ]; then + cp .env.example .env +fi if [ -f ".env.local" ]; then # Ensure there's a line ending echo "" >> .env cat .env.local >> .env fi popd bin/regen-certs -docker-compose up -d coturn kolab mariadb openvidu proxy redis +docker-compose up -d coturn kolab mariadb openvidu kurento-media-server proxy redis pushd ${base_dir}/src/ rm -rf vendor/ composer.lock php -dmemory_limit=-1 /bin/composer install npm install find bootstrap/cache/ -type f ! -name ".gitignore" -delete ./artisan key:generate ./artisan jwt:secret -f ./artisan clear-compiled ./artisan cache:clear ./artisan horizon:install if [ ! -z "$(rpm -qv chromium 2>/dev/null)" ]; then chver=$(rpmquery --queryformat="%{VERSION}" chromium | awk -F'.' '{print $1}') ./artisan dusk:chrome-driver ${chver} fi if [ ! -f 'resources/countries.php' ]; then ./artisan data:countries fi npm run dev popd docker-compose up -d worker pushd ${base_dir}/src/ rm -rf database/database.sqlite ./artisan db:ping --wait php -dmemory_limit=512M ./artisan migrate:refresh --seed ./artisan swoole:http start popd diff --git a/docker-compose.openvidu.yml b/docker-compose.openvidu.yml new file mode 100644 index 00000000..0d15fbf6 --- /dev/null +++ b/docker-compose.openvidu.yml @@ -0,0 +1,22 @@ +version: '3' +services: + kurento-media-server2: + build: + context: ./docker/kurento-media-server/ + container_name: kolab-kurento-media-server2 + environment: + - GST_DEBUG=3,Kurento*:4,kms*:4,sdp*:4,webrtc*:4,*rtpendpoint:4,rtp*handler:4,rtpsynchronizer:4,agnosticbin:4 + - KMS_PORT=8889 + hostname: kurento-media-server.hosted.com + image: apheleia/kurento-media-server:6.15.0 + network_mode: host + openvidu: + build: + context: ./docker/openvidu-dev/ + depends_on: + - kurento-media-server + - kurento-media-server2 + volumes: + - /etc/letsencrypt/:/etc/letsencrypt/:ro + - ~/src/openvidu:/src/openvidu/ + - ./docker/openvidu-dev/build/.m2:/root/.m2/ diff --git a/docker-compose.yml b/docker-compose.yml index 7c294426..d5c3a535 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,133 +1,145 @@ version: '3' services: coturn: container_name: kolab-coturn 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" 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: - /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 healthcheck: interval: 10s test: test -e /var/run/mysqld/mysqld.sock timeout: 5s retries: 30 image: mariadb network_mode: host 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} - - HTTP_PORT=8080 - - HTTPS_PORT=443 + - SERVER_PORT=${OPENVIDU_SERVER_PORT} - KMS_STUN_IP=${OPENVIDU_COTURN_IP} - KMS_STUN_PORT=3478 - - KMS_URIS=["ws://localhost:8888/kurento"] + - 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_PORT=8443 + - SERVER_SSL_ENABLED=false hostname: openvidu.hosted.com - image: openvidu/openvidu-server-kms:2.15.0 + image: apheleia/openvidu:2.16.0 network_mode: host tmpfs: - /run - /tmp - /var/run - /var/tmp tty: true volumes: - /etc/letsencrypt/:/etc/letsencrypt/:ro proxy: build: context: ./docker/proxy/ 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/ container_name: kolab-redis hostname: redis image: redis network_mode: host volumes: - ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro 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/coturn/Dockerfile b/docker/coturn/Dockerfile index 87f683c3..551b3fca 100644 --- a/docker/coturn/Dockerfile +++ b/docker/coturn/Dockerfile @@ -1,37 +1,38 @@ FROM fedora:31 MAINTAINER Jeroen van Meeuwen RUN dnf -y install \ --setopt 'tsflags=nodocs' \ bash-completion \ bind-utils \ coturn \ curl \ dhcp-client \ iproute \ iptraf-ng \ iputils \ less \ lsof \ mtr \ net-tools \ NetworkManager \ NetworkManager-tui \ network-scripts \ nmap-ncat \ openssh-clients \ openssh-server \ procps-ng \ + redis \ strace \ systemd-udev \ tcpdump \ telnet \ traceroute \ vim-enhanced \ wget && \ dnf clean all COPY rootfs/ / CMD ["/usr/local/bin/coturn.sh"] diff --git a/docker/kurento-media-server/Dockerfile b/docker/kurento-media-server/Dockerfile index 55ae43c7..e3913706 100644 --- a/docker/kurento-media-server/Dockerfile +++ b/docker/kurento-media-server/Dockerfile @@ -1,225 +1,427 @@ FROM fedora:31 MAINTAINER Jeroen van Meeuwen -# From https://github.com/Kurento/kurento-media-server/blob/master/debian/control -# -# build-essential, -# cmake, -# gstreamer1.5-plugins-good, -# kms-cmake-utils (>= 6.7.0), -# kms-core-dev (>= 6.7.0), -# kms-elements-dev (>= 6.7.0), -# kms-filters-dev (>= 6.7.0), -# kurento-module-creator (>= 6.7.0), -# libboost-dev, -# libboost-filesystem-dev, -# libboost-log-dev, -# libboost-program-options-dev, -# libboost-system-dev, -# libboost-test-dev, -# libboost-thread-dev, -# libevent-dev, -# libglibmm-2.4-dev, -# libgstreamer-plugins-base1.5-dev, -# libsigc++-2.0-dev, -# libwebsocketpp-dev - ENV CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -fasynchronous-unwind-tables -fstack-clash-protection -flto" -ENV CXXFLAGS=${CFLAGS} -ENV LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin' -ENV CC=gcc -ENV CXX=g++ -ENV AR=/bin/gcc-ar -ENV RANLIB=/bin/gcc-ranlib -ENV NM=/bin/gcc-nm +ENV CXXFLAGS="${CFLAGS}" +ENV LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto -fuse-linker-plugin" +ENV CC="gcc" +ENV CXX="g++" +ENV AR="/bin/gcc-ar" +ENV RANLIB="/bin/gcc-ranlib" +ENV NM="/bin/gcc-nm" ENV CMAKE_CXX_ARCHIVE_CREATE=" qcs " +ENV OPENSSL_CONF='' +ENV GST_DEBUG="*:3,Kurento*:5,kms*:5,sdp*:4,webrtc*:5,*rtpendpoint:5,rtp*handler:5,rtpsynchronizer:5,agnosticbin:4,GST_ELEMENT_FACTORY:7" + +ARG CLEAN=1 ARG CMAKEOPTS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_INSTALL_SYSCONFDIR=/etc/ -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules/ -DBUILD_SHARED_LIBS=ON -DCMAKE_AR=${AR} -DCMAKE_CXX_ARCHIVE_FINISH=true -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules/ -DGENERATE_TESTS=FALSE -DDISABLE_TESTS=TRUE" -ARG KURENTO_VERSION="6.14.0" +ARG GST_BASE_VERSION="1.8.1-1kurento2" +ARG GST_VERSION="1.8.1" +ARG KURENTO_MEDIA_SERVER_VERSION="6.15.0" +ARG KURENTO_CMAKE_VERSION="6.15.0" +ARG KURENTO_CORE_VERSION="6.15.0" +ARG KURENTO_ELEMENTS_VERSION="6.15.0" +ARG KURENTO_FILTERS_VERSION="6.15.0" +ARG KURENTO_MODULE_CREATOR_VERSION="6.15.0" ARG KURENTO_JSONCPP_VERSION="1.6.4" +ARG KURENTO_JSONRPC_VERSION="6.15.0" +ARG OPENCV_VERSION="3.4.10" RUN rpm -Uvh https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-31.noarch.rpm && \ rpm -Uvh https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-31.noarch.rpm && \ dnf -y install \ + autoconf \ + automake \ + bison \ boost-devel \ cmake \ coreutils \ + dnf-plugins-core \ ffmpeg \ + ffmpeg-devel \ + flac-devel \ + flex \ gcc-c++ \ + gettext-devel \ git \ glibmm24-devel \ - gstreamer1-devel \ - gstreamer1-plugins-base-devel \ - gstreamer1-plugins-bad-free-devel \ - gstreamer1-plugins-bad-freeworld \ - gstreamer1-plugins-good \ - gstreamer1-plugins-ugly \ + gsl-devel \ + gtk-doc \ libevent-devel \ - libnice-devel \ + libjpeg-devel \ + libmicrodns-devel \ + libpng-devel \ libsigc++20-devel \ libsoup-devel \ + libsrtp-devel \ + libtool \ + libunwind-devel \ libuuid-devel \ + libvisual-devel \ libvpx-devel \ make \ maven \ + meson \ net-tools \ + opencl-headers \ opencv-devel \ + # not available on ppc64le? \ + #openni-devel \ openssl-devel \ + opus-devel \ + patch \ redhat-rpm-config \ + spandsp-devel \ + usrsctp-devel \ vim-enhanced \ - websocketpp-devel && \ + webrtc-audio-processing-devel \ + websocketpp-devel \ + x264-devel \ + x265-devel && \ + # meson in module older than meson in updates \ + dnf module -y disable meson && \ + dnf -y update meson && \ + rpm -e --nodeps gstreamer1 gstreamer1-plugins-base && \ + dnf -y clean all && \ mkdir -p /src/ && \ - git clone https://github.com/Kurento/kms-cmake-utils.git /src/kms-cmake-utils.git && \ + if [ "${GST_BASE_VERSION}" == "1.8.1-1kurento2" ]; then \ + git clone https://github.com/Kurento/gstreamer.git /src/gstreamer.git && \ + cd /src/gstreamer.git/ && \ + sed -i \ + -e 's|git://anongit.freedesktop.org/gstreamer/common.*$|https://anongit.freedesktop.org/git/gstreamer/common.git/|g' \ + .gitmodules && \ + git submodule init && \ + git submodule update && \ + #sed -r -i \ + # -e 's/^GST_API_VERSION=.*$/GST_API_VERSION=1.0/g' \ + # configure.ac && \ + autopoint --force && \ + autoreconf -vi && \ + ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-failing-tests --disable-static --disable-static-plugins --enable-shared && \ + make -j $(nproc) VERBOSE=1 && \ + make install VERBOSE=1 ; \ + else \ + git clone -b ${GST_BASE_VERSION} https://gitlab.freedesktop.org/gstreamer/gstreamer.git /src/gstreamer.git && \ + cd /src/gstreamer.git/ && \ + if [ -f 'meson.build' ]; then \ + meson build --prefix=/usr && \ + ninja -C build install ; \ + else \ + sed -i \ + -e 's|git://anongit.freedesktop.org/gstreamer/common.*$|https://anongit.freedesktop.org/git/gstreamer/common.git/|g' \ + .gitmodules && \ + git submodule init && \ + git submodule update && \ + autopoint --force && \ + autoreconf -vi && \ + ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-failing-tests --disable-static --disable-static-plugins --enable-shared && \ + make -j $(nproc) VERBOSE=1 && \ + make install VERBOSE=1 ; \ + fi ; \ + fi && \ + git clone https://gitlab.freedesktop.org/libnice/libnice.git /src/libnice.git && \ + cd /src/libnice.git && \ + sed -r -i \ + -e 's/-(base|check)-1\.0/-\1-1.5/g' \ + -e 's/gstreamer-1\.0/gstreamer-1.5/g' \ + meson.build \ + gst/meson.build \ + tests/meson.build && \ + meson build --prefix=/usr && \ + ninja -C build install && \ + git clone -b ${GST_VERSION} https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git /src/gst-plugins-base.git && \ + cd /src/gst-plugins-base.git/ && \ + if [ -f 'meson.build' ]; then \ + meson build --prefix=/usr && \ + ninja -C build install ; \ + else \ + sed -i \ + -e 's|git://anongit.freedesktop.org/gstreamer/common.*$|https://anongit.freedesktop.org/git/gstreamer/common.git/|g' \ + .gitmodules && \ + git submodule init && \ + git submodule update && \ + sed -r -i \ + -e 's/^GST_API_VERSION.*$/GST_API_VERSION=1.5/g' \ + configure.ac && \ + sed -r -i \ + -e 's/^DOMAIN.*$/DOMAIN = gst-plugins-base-1.5/g' \ + po/Makevars && \ + autopoint --force && \ + autoreconf -vi && \ + sed -r -i \ + -e 's/@GST_API_VERSION@\.1/@GST_API_VERSION@/g' \ + tools/Makefile.in && \ + ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-failing-tests --disable-static --disable-static-plugins --enable-shared && \ + make -j $(nproc) VERBOSE=1 && \ + make install VERBOSE=1 ; \ + fi && \ + git clone -b ${GST_VERSION} https://gitlab.freedesktop.org/gstreamer/gst-plugins-good.git /src/gst-plugins-good.git && \ + cd /src/gst-plugins-good.git/ && \ + if [ -f 'meson.build' ]; then \ + meson build --prefix=/usr && \ + ninja -C build install ; \ + else \ + sed -i \ + -e 's|git://anongit.freedesktop.org/gstreamer/common.*$|https://anongit.freedesktop.org/git/gstreamer/common.git/|g' \ + .gitmodules && \ + git submodule init && \ + git submodule update && \ + sed -r -i \ + -e 's/^GST_API_VERSION.*$/GST_API_VERSION=1.5/g' \ + configure.ac && \ + sed -r -i \ + -e 's/^DOMAIN.*$/DOMAIN = gst-plugins-good-1.5/g' \ + po/Makevars && \ + autopoint --force && \ + autoreconf -vi && \ + sed -i \ + -e '/^#define .* gint64/d' \ + -e '/^#define .* guint64/d' \ + sys/v4l2/ext/types-compat.h && \ + sed -i \ + -e 's/__s64/gint64/g' \ + -e 's/__u64/guint64/g' \ + sys/v4l2/ext/videodev2.h && \ + ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-failing-tests --disable-static --disable-static-plugins --enable-shared && \ + make -j $(nproc) VERBOSE=1 && \ + make install VERBOSE=1 ; \ + fi && \ + git clone https://github.com/kanarip/gst-plugins-bad.git /src/gst-plugins-bad.git && \ + cd /src/gst-plugins-bad.git/ && \ + if [ -f 'meson.build' ]; then \ + meson build --prefix=/usr && \ + ninja -C build install ; \ + else \ + sed -i \ + -e 's|git://anongit.freedesktop.org/gstreamer/common.*$|https://anongit.freedesktop.org/git/gstreamer/common.git/|g' \ + .gitmodules && \ + git submodule init && \ + git submodule update && \ + sed -r -i \ + -e 's/^GST_API_VERSION.*$/GST_API_VERSION=1.5/g' \ + -e 's/gstreamer-allocators-1.0/gstreamer-allocators-1.5/g' \ + configure.ac && \ + sed -r -i \ + -e 's/gstaudio-1.0/gstaudio-1.5/g' \ + -e 's/gstvideo-1.0/gstvideo-1.5/g' \ + gst/festival/Makefile.am \ + gst/ivtc/Makefile.am \ + gst/yadif/Makefile.am && \ + sed -r -i \ + -e 's/^DOMAIN.*$/DOMAIN = gst-plugins-bad-1.5/g' \ + po/Makevars && \ + autopoint --force && \ + autoreconf -vi && \ + #./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-failing-tests --disable-dtls && \ + ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-failing-tests --disable-static --disable-static-plugins --enable-shared && \ + make -j $(nproc) VERBOSE=1 && \ + make install VERBOSE=1 ; \ + fi && \ + git clone -b ${GST_VERSION} https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git /src/gst-plugins-ugly.git && \ + cd /src/gst-plugins-ugly.git/ && \ + if [ -f 'meson.build' ]; then \ + meson build --prefix=/usr && \ + ninja -C build install ; \ + else \ + sed -i \ + -e 's|git://anongit.freedesktop.org/gstreamer/common.*$|https://anongit.freedesktop.org/git/gstreamer/common.git/|g' \ + .gitmodules && \ + git submodule init && \ + git submodule update && \ + sed -r -i \ + -e 's/^GST_API_VERSION.*$/GST_API_VERSION=1.5/g' \ + configure.ac && \ + sed -r -i \ + -e 's/^DOMAIN.*$/DOMAIN = gst-plugins-ugly-1.5/g' \ + po/Makevars && \ + autopoint --force && \ + autoreconf -vi && \ + ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-failing-tests --disable-x264 --disable-static --disable-static-plugins --enable-shared && \ + make -j $(nproc) VERBOSE=1 && \ + make install VERBOSE=1 ; \ + fi && \ + git clone https://github.com/Kurento/openwebrtc-gst-plugins.git /src/openwebrtc-gst-plugins.git && \ + cd /src/openwebrtc-gst-plugins.git/ && \ + autoreconf -vi && \ + ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib64 --disable-static --disable-static-plugins --enable-shared && \ + make VERBOSE=1 && \ + make install VERBOSE=1 && \ + git clone -b ${KURENTO_CMAKE_VERSION} https://github.com/Kurento/kms-cmake-utils.git /src/kms-cmake-utils.git && \ cd /src/kms-cmake-utils.git/ && \ - git checkout ${KURENTO_VERSION} && \ mkdir build && \ cd build && \ cmake \ ${CMAKEOPTS} \ .. && \ make -j $(nproc) VERBOSE=1 && \ make install -s && \ - git clone https://github.com/Kurento/kurento-module-creator.git /src/kurento-module-creator.git && \ + git clone -b ${KURENTO_MODULE_CREATOR_VERSION} https://github.com/Kurento/kurento-module-creator.git /src/kurento-module-creator.git && \ cd /src/kurento-module-creator.git/ && \ - git checkout ${KURENTO_VERSION} && \ mvn clean install -DskipTests && \ cp target/kurento-module-creator-jar-with-dependencies.jar /usr/bin/. && \ cp scripts/kurento-module-creator /usr/bin/. && \ cp target/classes/*.cmake /usr/share/cmake/Modules/. && \ - git clone https://github.com/Kurento/jsoncpp.git /src/jsoncpp.git && \ + git clone -b ${KURENTO_JSONCPP_VERSION} https://github.com/Kurento/jsoncpp.git /src/jsoncpp.git && \ cd /src/jsoncpp.git/ && \ - git checkout ${KURENTO_JSONCPP_VERSION} && \ mkdir build && \ cd build && \ cmake \ ${CMAKEOPTS} \ -DJSONCPP_WITH_CMAKE_PACKAGE=ON \ -DLIBRARY_INSTALL_DIR=/usr/lib64/ \ -DPACKAGE_INSTALL_DIR=/usr/share/cmake/ \ .. && \ make -j $(nproc) VERBOSE=1 && \ make install -s && \ mv -v /usr/lib/pkgconfig/*.pc /usr/share/pkgconfig/. && \ mv -v /usr/share/cmake/jsoncpp/*.cmake /usr/share/cmake/Modules/. && \ rm -rvf /usr/share/cmake/jsoncpp/ && \ mv -v /usr/include/json/features.h /usr/include/json/json-features.h && \ sed -i -e 's/features\.h/json-features\.h/g' /usr/include/json/*.h && \ cp -av /usr/include/json /usr/include/kmsjsoncpp && \ - git clone https://github.com/Kurento/kms-jsonrpc.git /src/kms-jsonrpc.git && \ + git clone -b ${KURENTO_JSONRPC_VERSION} https://github.com/Kurento/kms-jsonrpc.git /src/kms-jsonrpc.git && \ cd /src/kms-jsonrpc.git/ && \ - git checkout ${KURENTO_VERSION} && \ mkdir build && \ cd build && \ cmake \ ${CMAKEOPTS} \ .. && \ make -j $(nproc) VERBOSE=1 && \ make install -s && \ - git clone https://github.com/Kurento/kms-core.git /src/kms-core.git && \ + git clone -b ${KURENTO_CORE_VERSION} https://github.com/Kurento/kms-core.git /src/kms-core.git && \ cd /src/kms-core.git/ && \ - git checkout ${KURENTO_VERSION} && \ - sed -r -i \ - -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ - $(find -type f -name CMakeLists.txt) && \ mkdir build && \ cd build && \ - cmake \ - ${CMAKEOPTS} \ - -DCMAKE_INSTALL_GST_PLUGINS_DIR=/usr/lib64/gstreamer-1.0/ \ - .. && \ + if [ "${GST_BASE_VERSION}" != "1.8.1-1kurento2" ]; then \ + sed -r -i \ + -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ + $(find -type f -name CMakeLists.txt) && \ + cmake \ + ${CMAKEOPTS} \ + -DCMAKE_INSTALL_GST_PLUGINS_DIR=/usr/lib64/gstreamer-1.0/ \ + .. ; \ + else \ + cmake \ + ${CMAKEOPTS} \ + -DCMAKE_INSTALL_GST_PLUGINS_DIR=/usr/lib64/gstreamer-1.5/ \ + .. ; \ + fi && \ make -j $(nproc) VERBOSE=1 && \ make install -s && \ - git clone https://github.com/Kurento/kms-elements.git /src/kms-elements.git && \ + git clone -b ${KURENTO_ELEMENTS_VERSION} https://github.com/Kurento/kms-elements.git /src/kms-elements.git && \ cd /src/kms-elements.git/ && \ - git checkout ${KURENTO_VERSION} && \ - sed -r -i \ - -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ - $(find -type f -name CMakeLists.txt) && \ + if [ "${GST_BASE_VERSION}" != "1.8.1-1kurento2" ]; then \ + sed -r -i \ + -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ + $(find -type f -name CMakeLists.txt) ; \ + fi && \ mkdir build && \ cd build && \ cmake \ ${CMAKEOPTS} \ .. && \ + sed -i \ + -e 's/-lkmsgstcommons/-lkmsgstcommons -lkmscoreinterface/g' \ + -e 's/-lkmscoreinterface/-lkmscoreinterface -lkmsutils/g' \ + $(find . -type f -name link.txt) && \ make -j $(nproc) VERBOSE=1 && \ + make -j $(nproc) check VERBOSE=1 && \ make install -s && \ - cp -av src/server/implementation/HttpServer/libkmshttpep.so /usr/lib64/ && \ - git clone https://github.com/Kurento/kms-filters.git /src/kms-filters.git && \ + cp -av src/server/implementation/HttpServer/libkmshttpep.so /usr/lib64/. && \ + cp -av /usr/lib64/libkmswebrtcendpointlib.so* /usr/lib64/kurento/modules/. && \ + cp -av /usr/lib64/libkmshttpep.so* /usr/lib64/kurento/modules/. && \ + git clone -b ${KURENTO_FILTERS_VERSION} https://github.com/Kurento/kms-filters.git /src/kms-filters.git && \ cd /src/kms-filters.git/ && \ - git checkout ${KURENTO_VERSION} && \ - sed -r -i \ - -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ - $(find -type f -name CMakeLists.txt) && \ + if [ "${GST_BASE_VERSION}" != "1.8.1-1kurento2" ]; then \ + sed -r -i \ + -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ + $(find -type f -name CMakeLists.txt) ; \ + fi && \ mkdir build && \ cd build && \ cmake \ ${CMAKEOPTS} \ .. && \ make -j $(nproc) VERBOSE=1 && \ make install -s && \ - git clone https://github.com/Kurento/kurento-media-server.git /src/kurento-media-server.git && \ + git clone -b ${KURENTO_MEDIA_SERVER_VERSION} https://github.com/Kurento/kurento-media-server.git /src/kurento-media-server.git && \ cd /src/kurento-media-server.git/ && \ - git checkout ${KURENTO_VERSION} && \ - sed -r -i \ - -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ - $(find -type f -name CMakeLists.txt) && \ + if [ "${GST_BASE_VERSION}" != "1.8.1-1kurento2" ]; then \ + sed -r -i \ + -e 's/gstreamer-(.*)1.5/gstreamer-\11.0/g' \ + $(find -type f -name CMakeLists.txt) ; \ + fi && \ + # work around for kurento not building on pcc64le \ sed -i \ -e '603,618d' \ server/death_handler.cpp && \ mkdir build && \ cd build && \ cmake \ ${CMAKEOPTS} \ .. && \ + # a linking error / oversight may occur \ sed -i \ -e 's/-lkmsgstcommons/-lkmsgstcommons -lkmscoreinterface/g' \ - server/CMakeFiles/kurento-media-server.dir/link.txt && \ + $(find . -type f -name link.txt) && \ make -j $(nproc) VERBOSE=1 && \ make install VERBOSE=1 -s && \ cp -av $(find . -type f -name 'libtransport.so*') /usr/lib64/ && \ cp -av $(find . -type f -name 'libwebsocketTransport.so*') /usr/lib64/ && \ - strip -s /usr/lib64/libkms*.so* /usr/lib64/kurento/modules/*.so* && \ - dnf -y remove \ - -x boost-filesystem \ - -x boost-program-options \ - -x boost-log \ - -x boost-thread \ - -x file \ - -x gstreamer1-plugins-base \ - -x gstreamer1-plugins-bad-free \ - -x glibmm24 \ - -x java-1.8.0-openjdk \ - -x libnice \ - -x libsigc \ - -x libvpx \ - -x opencv \ - boost-devel \ - cmake \ - gcc-c++ \ - git \ - glibmm24-devel \ - gstreamer1-devel \ - gstreamer1-plugins-base-devel \ - gstreamer1-plugins-bad-free-devel \ - libevent-devel \ - libnice-devel \ - libsigc++20-devel \ - libsoup-devel \ - libuuid-devel \ - libvpx-devel \ - make \ - maven \ - opencv-devel \ - openssl-devel \ - redhat-rpm-config \ - vim-enhanced \ - websocketpp-devel && \ - dnf -y clean all && \ - rm -rvf \ - /src/ \ - /root/.m2/ \ - /usr/include/* + if [ "${CLEAN}" -eq 1 ]; then \ + strip -s \ + /usr/lib64/gstreamer-*/*.so \ + /usr/lib64/kurento/modules/*.so* \ + /usr/lib64/libkms*.so* && \ + dnf -y remove \ + -x boost-filesystem \ + -x boost-program-options \ + -x boost-log \ + -x boost-thread \ + -x file \ + -x gstreamer1-plugins-base \ + -x gstreamer1-plugins-bad-free \ + -x glibmm24 \ + -x java-1.8.0-openjdk \ + -x libsigc \ + -x libsoup \ + -x libvpx \ + -x opencv \ + boost-devel \ + cmake \ + gcc-c++ \ + git \ + glibmm24-devel \ + gstreamer1-devel \ + gstreamer1-plugins-base-devel \ + gstreamer1-plugins-bad-free-devel \ + libevent-devel \ + libsigc++20-devel \ + libsoup-devel \ + libuuid-devel \ + libvpx-devel \ + make \ + maven \ + opencv-devel \ + openssl-devel \ + redhat-rpm-config \ + vim-enhanced \ + websocketpp-devel && \ + dnf -y clean all && \ + rm -rvf \ + /src/ \ + /root/.m2/ \ + /usr/include/* \ + /usr/lib64/*.la \ + /usr/lib64/gstreamer-*/*.la && \ + ldconfig ; \ + fi COPY rootfs/ / -CMD ["/bin/kurento-media-server"] +RUN chmod 777 /etc/kurento/modules/kurento/ +RUN chmod 666 /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini + +CMD ["/usr/local/bin/kurento-media-server.sh"] diff --git a/docker/kurento-media-server/rootfs/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini b/docker/kurento-media-server/rootfs/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini new file mode 100644 index 00000000..e2f6112a --- /dev/null +++ b/docker/kurento-media-server/rootfs/etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini @@ -0,0 +1,130 @@ +;; Local network interfaces used for ICE gathering. +;; +;; If you know which network interfaces should be used to perform ICE (for +;; WebRTC connectivity), you can define them here. Doing so has several +;; advantages: +;; +;; * The WebRTC ICE gathering process will be much quicker. Normally, it needs +;; to gather local candidates for all of the network interfaces, but this step +;; can be made faster if you limit it to only the interface that you know will +;; work. +;; +;; * It will ensure that the media server always decides to use the correct +;; network interface. With WebRTC ICE gathering it's possible that, under some +;; circumstances (in systems with virtual network interfaces such as +;; "docker0") the ICE process ends up choosing the wrong local IP. +;; +;; is a comma-separated list of network interface names. +;; +;; Examples: +;; networkInterfaces=eth0 +;; networkInterfaces=eth0,enp0s25 +;; +;networkInterfaces=eth0 + +;; STUN server IP address. +;; +;; The ICE process uses STUN to punch holes through NAT firewalls. +;; +;; You don't need to configure both STUN and TURN, because TURN already includes +;; STUN functionality. +;; +;; MUST be an IP address; domain names are NOT supported. +;; +;; You need to use a well-working STUN server. Use this to check if it works: +;; https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ +;; From that check, you should get at least one Server-Reflexive Candidate +;; (type "srflx"). +;; +stunServerAddress=212.103.80.153 +stunServerPort=3478 + +;; TURN server URL. +;; +;; When STUN is not enough to open connections through some NAT firewalls, +;; using TURN is the remaining alternative. +;; +;; You don't need to configure both STUN and TURN, because TURN already includes +;; STUN functionality. +;; +;; The provided URL should follow one of these formats: +;; +;; * user:password@ipaddress:port +;; * user:password@ipaddress:port?transport=[udp|tcp|tls] +;; +;; MUST be an IP address; domain names are NOT supported. +;; is OPTIONAL. Possible values: udp, tcp, tls. Default: udp. +;; +;; You need to use a well-working TURN server. Use this to check if it works: +;; https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ +;; +;; From that check, you should get at least one Server-Reflexive Candidate +;; (type "srflx") AND one Relay Candidate (type "relay"). +;; +;turnURL=user:password@198.51.100.1:3478?transport=udp + +;; Certificate used for DTLS authentication. +;; +;; If you want KMS to use a specific certificate for DTLS, then provide it here. +;; You can provide both RSA or ECDSA files; the choice between them is done when +;; calling the WebRtcEndpoint constructor. +;; +;; If this setting isn't specified, a different set of self-signed certificates +;; is generated automatically for each WebRtcEndpoint instance. +;; +;; This setting can be helpful, for example, for situations where you have to +;; manage multiple media servers and want to make sure that all of them use the +;; same certificate. Some browsers, such as Firefox, require this in order to +;; allow multiple WebRTC connections from the same tab to different KMS. +;; +;; Absolute path to the concatenated certificate (chain) file(s) + private key, +;; in PEM format. +;; +;pemCertificateRSA=/path/to/cert+key.pem +;pemCertificateECDSA=/path/to/cert+key.pem + +;; External IPv4 and IPv6 addresses of the media server. +;; +;; Forces all local IPv4 and/or IPv6 ICE candidates to have the given address. +;; This is really nothing more than a hack, but it's very effective to force a +;; public IP address when one is known in advance for the media server. In doing +;; so, KMS will not need a STUN or TURN server, but remote peers will still be +;; able to contact it. +;; +;; You can try using these settings if KMS is deployed on a publicly accessible +;; server, without NAT, and with a static public IP address. But if it doesn't +;; work for you, just go back to configuring a STUN or TURN server for ICE. +;; +;; Only set this parameter if you know what you're doing, and you understand +;; 100% WHY you need it. For the majority of cases, you should just prefer to +;; configure a STUN or TURN server. +;; +;; is a single IPv4 address. +;; is a single IPv6 address. +;; +;externalIPv4=198.51.100.1 +;externalIPv6=2001:0db8:85a3:0000:0000:8a2e:0370:7334 + +;; External IP address of the media server. +;; +;; DEPRECATED: Use "externalIPv4" and/or "externalIPv6" instead. +;; +;; Forces all local IPv4 and IPv6 ICE candidates to have the given address. This +;; is really nothing more than a hack, but it's very effective to force a public +;; IP address when one is known in advance for the media server. In doing so, +;; KMS will not need a STUN or TURN server, but remote peers will still be able +;; to contact it. +;; +;; You can try using this setting if KMS is deployed on a publicly accessible +;; server, without NAT, and with a static public IP address. But if it doesn't +;; work for you, just go back to configuring a STUN or TURN server for ICE. +;; +;; Only set this parameter if you know what you're doing, and you understand +;; 100% WHY you need it. For the majority of cases, you should just prefer to +;; configure a STUN or TURN server. +;; +;; is a single IPv4 or IPv6 address. +;; +;externalAddress=198.51.100.1 +;externalAddress=2001:0db8:85a3:0000:0000:8a2e:0370:7334 + diff --git a/docker/kurento-media-server/rootfs/usr/local/bin/kurento-media-server.sh b/docker/kurento-media-server/rootfs/usr/local/bin/kurento-media-server.sh new file mode 100755 index 00000000..54f23a26 --- /dev/null +++ b/docker/kurento-media-server/rootfs/usr/local/bin/kurento-media-server.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ ! -z "${OPENVIDU_COTURN_IP}" ]; then + sed -i \ + -e "s/;externalIPv4.*$/externalIPv4=${OPENVIDU_COTURN_IP}/g" \ + /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini +fi + +if [ ! -z "${KMS_PORT}" ]; then + sed -i \ + -e "s/\"port\": 8888,/\"port\": ${KMS_PORT},/g" \ + /etc/kurento/kurento.conf.json +fi + +/usr/bin/kurento-media-server diff --git a/docker/openvidu-dev/.gitignore b/docker/openvidu-dev/.gitignore new file mode 100644 index 00000000..378eac25 --- /dev/null +++ b/docker/openvidu-dev/.gitignore @@ -0,0 +1 @@ +build diff --git a/docker/coturn/Dockerfile b/docker/openvidu-dev/Dockerfile similarity index 75% copy from docker/coturn/Dockerfile copy to docker/openvidu-dev/Dockerfile index 87f683c3..ecc0bfd5 100644 --- a/docker/coturn/Dockerfile +++ b/docker/openvidu-dev/Dockerfile @@ -1,37 +1,44 @@ FROM fedora:31 MAINTAINER Jeroen van Meeuwen +ENV CERTIFICATE_TYPE=selfsigned +ENV DOMAIN_OR_PUBLIC_IP=localhost.localdomain +ENV OPENVIDU_SECRET=MY_SECRET + RUN dnf -y install \ --setopt 'tsflags=nodocs' \ bash-completion \ bind-utils \ coturn \ curl \ dhcp-client \ + git \ iproute \ iptraf-ng \ iputils \ + java-1.8.0-openjdk \ less \ lsof \ + maven \ mtr \ net-tools \ NetworkManager \ NetworkManager-tui \ network-scripts \ nmap-ncat \ openssh-clients \ openssh-server \ procps-ng \ + redis \ strace \ systemd-udev \ tcpdump \ telnet \ traceroute \ vim-enhanced \ wget && \ dnf clean all -COPY rootfs/ / - -CMD ["/usr/local/bin/coturn.sh"] +COPY init.sh /init.sh +CMD [ "/init.sh" ] diff --git a/docker/openvidu-dev/build/.m2/.gitkeep b/docker/openvidu-dev/build/.m2/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/docker/openvidu-dev/init.sh b/docker/openvidu-dev/init.sh new file mode 100755 index 00000000..30f277ea --- /dev/null +++ b/docker/openvidu-dev/init.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd /src/openvidu/ +mvn -DskipTests=true clean install +/usr/bin/java -jar /src/openvidu/openvidu-server/target/openvidu-server-2.16.0.jar diff --git a/docker/openvidu/Dockerfile b/docker/openvidu/Dockerfile index 8b0c421c..97c7a982 100644 --- a/docker/openvidu/Dockerfile +++ b/docker/openvidu/Dockerfile @@ -1,57 +1,56 @@ FROM fedora:31 MAINTAINER Jeroen van Meeuwen ENV CERTIFICATE_TYPE=selfsigned ENV DOMAIN_OR_PUBLIC_IP=localhost.localdomain ENV OPENVIDU_SECRET=MY_SECRET RUN dnf -y install \ --setopt 'tsflags=nodocs' \ bash-completion \ bind-utils \ coturn \ curl \ dhcp-client \ git \ iproute \ iptraf-ng \ iputils \ java-1.8.0-openjdk \ less \ lsof \ maven \ mtr \ net-tools \ NetworkManager \ NetworkManager-tui \ network-scripts \ nmap-ncat \ openssh-clients \ openssh-server \ procps-ng \ + redis \ strace \ systemd-udev \ tcpdump \ telnet \ traceroute \ vim-enhanced \ wget && \ dnf clean all && \ mkdir -p /src/ && \ - git clone --branch v2.16.0 https://github.com/OpenVidu/openvidu.git /src/openvidu.git && \ + git clone --branch stable/kolab-2.16.0 https://git.kolab.org/source/openvidu.git /src/openvidu.git && \ cd /src/openvidu.git/ && \ mvn clean install -DskipTests && \ mkdir -p /usr/share/openvidu/ && \ mv -v \ /src/openvidu.git/openvidu-server/target/openvidu-server-2.16.0.jar \ /usr/share/openvidu/openvidu-server.jar && \ rm -rvf /src/ /root/.m2/ CMD [ \ "/usr/bin/java", \ - "-Dserver.port=8080", \ - "-Dserver.ssl.enabled=false", \ "-jar", \ "/usr/share/openvidu/openvidu-server.jar" \ ] diff --git a/src/.env.example b/src/.env.example index 7047e83a..7ec4d2c8 100644 --- a/src/.env.example +++ b/src/.env.example @@ -1,145 +1,145 @@ APP_NAME=Kolab APP_ENV=local APP_KEY= APP_DEBUG=true APP_URL=http://127.0.0.1:8000 APP_PUBLIC_URL= APP_DOMAIN=kolabnow.com APP_THEME=default ASSET_URL=http://127.0.0.1:8000 WEBMAIL_URL=/apps SUPPORT_URL=/support SUPPORT_EMAIL= LOG_CHANNEL=stack DB_CONNECTION=mysql DB_DATABASE=kolabdev DB_HOST=127.0.0.1 DB_PASSWORD=kolab DB_PORT=3306 DB_USERNAME=kolabdev BROADCAST_DRIVER=redis CACHE_DRIVER=redis QUEUE_CONNECTION=redis SESSION_DRIVER=file SESSION_LIFETIME=120 MFA_DSN=mysql://roundcube:Welcome2KolabSystems@127.0.0.1/roundcube MFA_TOTP_DIGITS=6 MFA_TOTP_INTERVAL=30 MFA_TOTP_DIGEST=sha1 IMAP_URI=ssl://127.0.0.1:993 IMAP_ADMIN_LOGIN=cyrus-admin IMAP_ADMIN_PASSWORD=Welcome2KolabSystems IMAP_VERIFY_HOST=false IMAP_VERIFY_PEER=false LDAP_BASE_DN="dc=mgmt,dc=com" LDAP_DOMAIN_BASE_DN="ou=Domains,dc=mgmt,dc=com" LDAP_HOSTS=127.0.0.1 LDAP_PORT=389 LDAP_SERVICE_BIND_DN="uid=kolab-service,ou=Special Users,dc=mgmt,dc=com" LDAP_SERVICE_BIND_PW="Welcome2KolabSystems" LDAP_USE_SSL=false LDAP_USE_TLS=false # Administrative LDAP_ADMIN_BIND_DN="cn=Directory Manager" LDAP_ADMIN_BIND_PW="Welcome2KolabSystems" LDAP_ADMIN_ROOT_DN="dc=mgmt,dc=com" # Hosted (public registration) LDAP_HOSTED_BIND_DN="uid=hosted-kolab-service,ou=Special Users,dc=mgmt,dc=com" LDAP_HOSTED_BIND_PW="Welcome2KolabSystems" LDAP_HOSTED_ROOT_DN="dc=hosted,dc=com" OPENVIDU_API_PASSWORD=MY_SECRET OPENVIDU_API_URL=http://localhost:8080/api/ OPENVIDU_API_USERNAME=OPENVIDUAPP OPENVIDU_API_VERIFY_TLS=true OPENVIDU_COTURN_IP=127.0.0.1 OPENVIDU_COTURN_REDIS_DATABASE=2 OPENVIDU_COTURN_REDIS_IP=127.0.0.1 OPENVIDU_COTURN_REDIS_PASSWORD=turn # Used as COTURN_IP, TURN_PUBLIC_IP, for KMS_TURN_URL OPENVIDU_PUBLIC_IP=127.0.0.1 OPENVIDU_PUBLIC_PORT=3478 OPENVIDU_SERVER_PORT=8080 OPENVIDU_WEBHOOK=true OPENVIDU_WEBHOOK_ENDPOINT=http://127.0.0.1:8000/webhooks/meet/openvidu # "CDR" events, see https://docs.openvidu.io/en/2.13.0/reference-docs/openvidu-server-cdr/ #OPENVIDU_WEBHOOK_EVENTS=[sessionCreated,sessionDestroyed,participantJoined,participantLeft,webrtcConnectionCreated,webrtcConnectionDestroyed,recordingStatusChanged,filterEventDispatched,mediaNodeStatusChanged] #OPENVIDU_WEBHOOK_HEADERS=[\"Authorization:\ Basic\ SOMETHING\"] REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 SWOOLE_HOT_RELOAD_ENABLE=true SWOOLE_HTTP_ACCESS_LOG=true SWOOLE_HTTP_HOST=127.0.0.1 SWOOLE_HTTP_PORT=8000 SWOOLE_HTTP_REACTOR_NUM=1 SWOOLE_HTTP_WEBSOCKET=true SWOOLE_HTTP_WORKER_NUM=1 SWOOLE_OB_OUTPUT=true PAYMENT_PROVIDER= MOLLIE_KEY= STRIPE_KEY= STRIPE_PUBLIC_KEY= STRIPE_WEBHOOK_SECRET= MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS="noreply@example.com" MAIL_FROM_NAME="Example.com" MAIL_REPLYTO_ADDRESS=null MAIL_REPLYTO_NAME=null DNS_TTL=3600 DNS_SPF="v=spf1 mx -all" DNS_STATIC="%s. MX 10 ext-mx01.mykolab.com." DNS_COPY_FROM=null AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION=us-east-1 AWS_BUCKET= PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=mt1 -MIX_ASSET_PATH= +MIX_ASSET_PATH='/' MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" JWT_SECRET= JWT_TTL=60 COMPANY_NAME= COMPANY_ADDRESS= COMPANY_DETAILS= COMPANY_EMAIL= COMPANY_LOGO= COMPANY_FOOTER= VAT_COUNTRIES=CH,LI VAT_RATE=7.7 KB_ACCOUNT_DELETE= KB_ACCOUNT_SUSPENDED= diff --git a/src/database/seeds/local/UserSeeder.php b/src/database/seeds/local/UserSeeder.php index fa2bca52..a70bc7fd 100644 --- a/src/database/seeds/local/UserSeeder.php +++ b/src/database/seeds/local/UserSeeder.php @@ -1,146 +1,149 @@ 'kolab.org', 'status' => Domain::STATUS_NEW + Domain::STATUS_ACTIVE + Domain::STATUS_CONFIRMED + Domain::STATUS_VERIFIED, 'type' => Domain::TYPE_EXTERNAL ] ); $john = User::create( [ 'email' => 'john@kolab.org', 'password' => 'simple123', ] ); $john->setSettings( [ 'first_name' => 'John', 'last_name' => 'Doe', 'currency' => 'USD', 'country' => 'US', 'billing_address' => "601 13th Street NW\nSuite 900 South\nWashington, DC 20005", 'external_email' => 'john.doe.external@gmail.com', 'organization' => 'Kolab Developers', 'phone' => '+1 509-248-1111', ] ); $john->setAliases(['john.doe@kolab.org']); $wallet = $john->wallets->first(); $package_domain = \App\Package::where('title', 'domain-hosting')->first(); $package_kolab = \App\Package::where('title', 'kolab')->first(); $package_lite = \App\Package::where('title', 'lite')->first(); $domain->assignPackage($package_domain, $john); $john->assignPackage($package_kolab); $jack = User::create( [ 'email' => 'jack@kolab.org', 'password' => 'simple123', ] ); $jack->setSettings( [ 'first_name' => 'Jack', 'last_name' => 'Daniels', 'currency' => 'USD', 'country' => 'US' ] ); $jack->setAliases(['jack.daniels@kolab.org']); $john->assignPackage($package_kolab, $jack); foreach ($john->entitlements as $entitlement) { $entitlement->created_at = Carbon::now()->subMonthsWithoutOverflow(1); $entitlement->updated_at = Carbon::now()->subMonthsWithoutOverflow(1); $entitlement->save(); } $ned = User::create( [ 'email' => 'ned@kolab.org', 'password' => 'simple123', ] ); $ned->setSettings( [ 'first_name' => 'Edward', 'last_name' => 'Flanders', 'currency' => 'USD', 'country' => 'US' ] ); $john->assignPackage($package_kolab, $ned); $ned->assignSku(\App\Sku::where('title', 'activesync')->first(), 1); // Ned is a controller on Jack's wallet $john->wallets()->first()->addController($ned); // Ned is also our 2FA test user $sku2fa = Sku::firstOrCreate(['title' => '2fa']); $ned->assignSku($sku2fa); try { SecondFactor::seed('ned@kolab.org'); } catch (\Exception $e) { // meh } $joe = User::create( [ 'email' => 'joe@kolab.org', 'password' => 'simple123', ] ); $john->assignPackage($package_lite, $joe); + $john->assignSku(Sku::firstOrCreate(['title' => 'beta'])); + $john->assignSku(Sku::firstOrCreate(['title' => 'meet'])); + $joe->setAliases(['joe.monster@kolab.org']); // factory(User::class, 10)->create(); $jeroen = User::create( [ 'email' => 'jeroen@jeroen.jeroen', 'password' => 'jeroen', ] ); $jeroen->role = 'admin'; $jeroen->save(); } }