diff --git a/CHANGELOG b/CHANGELOG index 6a7d088..7767ce9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -65,3 +65,9 @@ [0.2.8] * Update to synapse v1.3.1 +[0.2.9] +* Update to synapse v1.4.0 (lots of changes) + +[0.3.0] +* Update to synapse v1.4.1 + diff --git a/CloudronManifest.json b/CloudronManifest.json index 8786b0b..4f0eae0 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -5,7 +5,7 @@ "description": "file://DESCRIPTION.md", "changelog": "file://CHANGELOG", "tagline": "standalone matrix server", - "version": "0.2.8", + "version": "0.3.0", "healthCheckPath": "/", "httpPort": 8000, "memoryLimit": 536870912, @@ -21,6 +21,11 @@ "title": "Federation Port", "description": "Federation Port", "defaultValue": 8448 + }, + "WEBHOOKS_PORT": { + "title": "Webhooks Port", + "description": "Webhooks Port", + "defaultValue": 9000 } }, "addons": { diff --git a/Dockerfile b/Dockerfile index de6082a..47883da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,10 +6,12 @@ RUN mkdir -p /app/code/nginx WORKDIR /app/code -ENV MATRIXVERSION=v1.3.1 +ENV MATRIXVERSION=v1.4.1 EXPOSE 8000 EXPOSE 3478/udp +# addons wip +# EXPOSE 9000 # nginx RUN rm /etc/nginx/sites-enabled/* @@ -38,6 +40,26 @@ RUN pip3 install --upgrade setuptools RUN pip3 install psycopg2-binary python-ldap matrix-synapse-ldap3 lxml netaddr twisted jinja2 bleach bcrypt RUN pip3 install https://github.com/matrix-org/synapse/archive/${MATRIXVERSION}.tar.gz +# install addons +#RUN cd /app/code && git clone http://github.com/turt2live/matrix-appservice-webhooks +#RUN cd /app/code/matrix-appservice-webhooks && npm install +#RUN mv /app/code/matrix-appservice-webhooks/db /app/code/matrix-appservice-webhooks/db_orig && \ + #dir for sqlite db +# ln -sf /app/data/appservice/db /app/code/matrix-appservice-webhooks/db && \ + # config +# ln -sf /app/data/appservice/config/config.yaml /app/code/matrix-appservice-webhooks/config/config.yaml && \ + # hooks +# ln -sf /app/data/appservice/appservice-registration-webhooks.yaml /app/code/matrix-appservice-webhooks/appservice-registration-webhooks.yaml + + +# todo: +# to create the config, run the following from /app/code/matrix-appservice-webhooks +# node index.js -r -u "http://localhost:9000" -c config/config.yaml +# add this to homeserver.yml and restart: +# app_service_config_files: ["appservice-registration-webhooks.yaml"] +# to start the appservice use +# node index.js -p 9000 -c config/config.yaml -f appservice-registration-webhooks.yaml + RUN chown -R www-data.www-data /app/code ADD start_matrix.sh /app/ diff --git a/start_matrix.sh b/start_matrix.sh index 8416226..6484a63 100755 --- a/start_matrix.sh +++ b/start_matrix.sh @@ -10,7 +10,12 @@ if [[ ! -f /app/data/synapse/homeserver.yaml ]]; then /app/data/nginx/fastcgi \ /run/nginx_log \ /run/synapse \ - /run/turn_log + /run/turn_log \ + /app/data/appservice/config /app/data/appservice/db + + # copy matrix-appservice-webhooks config +# cp /app/code/matrix-appservice-webhooks/config/sample.yaml /app/data/appservice/config/config.yaml +# ln -sf /app/data/appservice/appservice-registration-webhooks.yaml /app/data/synapse/appservice-registration-webhooks.yaml # create certs openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out /app/data/synapse/${APP_DOMAIN}.tls.crt -keyout /app/data/synapse/${APP_DOMAIN}.tls.key -subj "/C=DE/ST=Germany/L=Germany/O=Example/OU=Example/CN=${APP_DOMAIN}"