From a134a761b4126dd3530f7048ad433eae053fb4e8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 17 May 2019 10:52:27 +0200 Subject: [PATCH] Update to v0.99.4 --- CHANGELOG | 3 +++ CloudronManifest.json | 2 +- Dockerfile | 4 ++-- start_matrix.sh | 33 ++++++++++++++++----------------- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 17d9a95..5ed071d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +[0.2.0] +* Update to synapse v0.99.4 + [0.1.9] * Update to synapse v0.99.3 diff --git a/CloudronManifest.json b/CloudronManifest.json index d9cb739..53fe9e7 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -5,7 +5,7 @@ "description": "file://DESCRIPTION.md", "changelog": "file://CHANGELOG", "tagline": "standalone matrix server", - "version": "0.1.9", + "version": "0.2.0", "healthCheckPath": "/", "httpPort": 8000, "memoryLimit": 536870912, diff --git a/Dockerfile b/Dockerfile index 638c3b6..78b42ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,8 +30,8 @@ RUN apt-get install -y build-essential python2.7-dev libffi-dev libldap2-dev lib libssl-dev libjpeg-dev libxslt1-dev RUN pip install --upgrade pip RUN pip install --upgrade setuptools -RUN pip install psycopg2-binary py-bcrypt python-ldap matrix-synapse-ldap3 lxml netaddr twisted -RUN pip install https://github.com/matrix-org/synapse/archive/v0.99.3.tar.gz +RUN pip install psycopg2-binary py-bcrypt python-ldap matrix-synapse-ldap3 lxml netaddr twisted jinja2 +RUN pip install https://github.com/matrix-org/synapse/archive/v0.99.4.tar.gz #https://github.com/matrix-org/synapse/tarball/master # copy index.html diff --git a/start_matrix.sh b/start_matrix.sh index cb77fed..fffa8f7 100755 --- a/start_matrix.sh +++ b/start_matrix.sh @@ -13,7 +13,7 @@ if [[ ! -d /app/data/synapse ]]; then /run/turn_log # create certs - openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out ${APP_DOMAIN}.tls.crt -keyout ${APP_DOMAIN}.tls.key -subj "/C=DE/ST=Germany/L=Germany/O=Example/OU=Example/CN=${APP_DOMAIN}" + 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}" # fix permissions chown -R www-data.www-data /run/synapse \ @@ -42,29 +42,28 @@ if [[ ! -d /app/data/synapse ]]; then sed -i "s/web_client:.*/web_client: False/" homeserver.yaml sed -i "s,- webclient .*,# - webclient # The bundled webclient," homeserver.yaml sed -i "s/client, webclient/client/" homeserver.yaml + sed -i "s/bind_addresses: \['::1'.*/bind_addresses: \['0.0.0.0'\]/" homeserver.yaml sed -i "s/sqlite3/psycopg2/" homeserver.yaml sed -i "s/ database: .*/ user: ${POSTGRESQL_USERNAME}\n password: ${POSTGRESQL_PASSWORD}\n database: ${POSTGRESQL_DATABASE}\n host: ${POSTGRESQL_HOST}\n cp_min: 5\n cp_max: 10/" homeserver.yaml - sed -i "s/enable_registration: .*/enable_registration: True/" homeserver.yaml - sed -i "s/# password_providers:/password_providers:/" homeserver.yaml - sed -i 's/# - module: "ldap_auth_provider.LdapAuthProvider"/ - module: "ldap_auth_provider.LdapAuthProvider"/' homeserver.yaml - sed -i 's/# config:/ config:/' homeserver.yaml - sed -i 's/# enabled: true/ enabled: true/' homeserver.yaml - sed -i "s,# uri: .*, uri: \"${LDAP_URL}\"," homeserver.yaml - sed -i 's/# start_tls: true/ start_tls: false/' homeserver.yaml - sed -i 's/# base: "ou=users,dc=example,dc=com"/ base: "ou=users,dc=cloudron"/' homeserver.yaml - sed -i 's/# attributes:/ attributes:/' homeserver.yaml - sed -i 's/# uid: "cn"/ uid: "username"/' homeserver.yaml - sed -i 's/# mail: "email"/ mail: "mail"/' homeserver.yaml - sed -i 's/# name: "givenName"/ name: "username"/' homeserver.yaml - sed -i 's/max_upload_size:.*/max_upload_size: "20M"/' homeserver.yaml + sed -i "s/#enable_registration:.*/enable_registration: True/" homeserver.yaml + sed -i "s/#password_providers:/password_providers:/" homeserver.yaml + sed -i 's/# - module: "ldap_auth_provider.LdapAuthProvider"/ - module: "ldap_auth_provider.LdapAuthProvider"/' homeserver.yaml + sed -i 's/# config:/ config:/' homeserver.yaml + sed -i 's/# enabled: true/ enabled: true/' homeserver.yaml + sed -i "s,# uri: .*, uri: \"${LDAP_URL}\"," homeserver.yaml + sed -i 's/# start_tls: true/ start_tls: false/' homeserver.yaml + sed -i 's/# base: "ou=users,dc=example,dc=com"/ base: "ou=users,dc=cloudron"/' homeserver.yaml + sed -i 's/# attributes:/ attributes:/' homeserver.yaml + sed -i 's/# uid: "cn"/ uid: "username"/' homeserver.yaml + sed -i 's/# mail: "email"/ mail: "mail"/' homeserver.yaml + sed -i 's/# name: "givenName"/ name: "username"/' homeserver.yaml + sed -i 's/#max_upload_size:.*/max_upload_size: "100M"/' homeserver.yaml sed -i 's/#auto_join_rooms:/auto_join_rooms:/' homeserver.yaml - sed -i 's/# - "#example:example.com"/ - "#example:example.com"/' homeserver.yaml + sed -i 's/# - "#example:example.com"/ - "#example:example.com"/' homeserver.yaml sed -i "s/example:example.com/discuss:${APP_DOMAIN}/" homeserver.yaml sed -i "s/turn_allow_guests:.*/turn_allow_guests: False/" homeserver.yaml sed -i "s/enable_group_creation:.*/enable_group_creation: True/" homeserver.yaml sed -i "s/enable_group_creation:.*/enable_group_creation: True/" homeserver.yaml - sed -i "s/#user_directory:/user_directory:/" homeserver.yaml - sed -i "s/# search_all_users:.*/ search_all_users: True/" homeserver.yaml # get synapse log name and set path LOG_CONFIG=$(ls *.log.config)