Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cc55a07fa | ||
|
|
b4c6b21942 | ||
|
|
b95e6a3b5c | ||
|
|
c711c8f249 | ||
|
|
9b6bfd35b2 | ||
|
|
bd6ece8ddb | ||
|
|
158e4c223a | ||
|
|
246b99b8ce | ||
|
|
c82a4acadc | ||
|
|
090dbb0244 | ||
|
|
4f78f5c92f |
@@ -3,4 +3,5 @@
|
|||||||
.dockerignore
|
.dockerignore
|
||||||
node_modules
|
node_modules
|
||||||
screenshots/*
|
screenshots/*
|
||||||
|
test/*
|
||||||
|
|
||||||
|
|||||||
22
CHANGELOG
22
CHANGELOG
@@ -104,3 +104,25 @@
|
|||||||
[0.6.0]
|
[0.6.0]
|
||||||
* Fix title
|
* Fix title
|
||||||
|
|
||||||
|
[0.7.0]
|
||||||
|
* Set turn_uris to an array and not a string
|
||||||
|
|
||||||
|
[0.7.1]
|
||||||
|
* Users will now automatically join the #discuss channel (only in new installations)
|
||||||
|
|
||||||
|
[1.0.0]
|
||||||
|
* Use latest base image
|
||||||
|
* Update to synapse v1.12.4
|
||||||
|
|
||||||
|
[1.1.0]
|
||||||
|
* Update Synapse to 1.13.0
|
||||||
|
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.13.0)
|
||||||
|
* Set Referrer-Policy header to no-referrer on media downloads. (#7009)
|
||||||
|
* Admin API POST /_synapse/admin/v1/join/<roomIdOrAlias> to join users to a room like auto_join_rooms for creation of users. (#7051)
|
||||||
|
* Add options to prevent users from changing their profile or associated 3PIDs. (#7096)
|
||||||
|
* Allow server admins to define and enforce a password policy (MSC2000). (#7118)
|
||||||
|
* Improve the support for SSO authentication on the login fallback page. (#7152, #7235)
|
||||||
|
* Always whitelist the login fallback in the SSO configuration if public_baseurl is set. (#7153)
|
||||||
|
* Admin users are no longer required to be in a room to create an alias for it. (#7191)
|
||||||
|
* Require admin privileges to enable room encryption by default. This does not affect existing rooms. (#7230)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"tagline": "Secure & decentralized communication",
|
"tagline": "Secure & decentralized communication",
|
||||||
"version": "0.6.0-2",
|
"version": "1.1.0",
|
||||||
"healthCheckPath": "/",
|
"healthCheckPath": "/",
|
||||||
"httpPort": 8008,
|
"httpPort": 8008,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
This app packages Synapse <upstream>1.12.3</upstream>.
|
This app packages Synapse <upstream>1.13.0</upstream>.
|
||||||
|
|
||||||
**This package only provides the Matrix backend. A variety of clients are available
|
**This package only provides the Matrix backend. A variety of clients are available
|
||||||
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and
|
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@@ -1,16 +1,10 @@
|
|||||||
FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
|
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4
|
||||||
|
|
||||||
RUN mkdir -p /app/pkg
|
RUN mkdir -p /app/pkg
|
||||||
|
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
ARG VERSION=v1.12.3
|
ARG VERSION=v1.13.0
|
||||||
|
|
||||||
RUN apt update && \
|
|
||||||
apt install -y build-essential python3-dev libffi-dev \
|
|
||||||
python3-pip python-setuptools sqlite3 libxml2-dev \
|
|
||||||
libssl-dev python-virtualenv libjpeg-dev libxslt1-dev libldap2-dev libsasl2-dev && \
|
|
||||||
rm -rf /var/cache/apt /var/lib/apt/lists
|
|
||||||
|
|
||||||
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
|
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
|
||||||
RUN virtualenv -p python3 /app/code/env
|
RUN virtualenv -p python3 /app/code/env
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# https://github.com/matrix-org/synapse/blob/master/docs/sample_config.yaml
|
# https://github.com/matrix-org/synapse/blob/master/docs/sample_config.yaml
|
||||||
|
|
||||||
server_name: "matrix.example.com"
|
# if you change this, change the auto_join_rooms below as well
|
||||||
|
server_name: "example.com"
|
||||||
|
|
||||||
pid_file: /run/synapse/homeserver.pid
|
pid_file: /run/synapse/homeserver.pid
|
||||||
|
|
||||||
@@ -97,8 +98,9 @@ max_upload_size: 200M
|
|||||||
max_image_pixels: "32M"
|
max_image_pixels: "32M"
|
||||||
dynamic_thumbnails: false
|
dynamic_thumbnails: false
|
||||||
|
|
||||||
#auto_join_rooms:
|
autocreate_auto_join_rooms: true
|
||||||
# - "#discuss:example.com"
|
auto_join_rooms:
|
||||||
|
- "#discuss:example.com"
|
||||||
|
|
||||||
trusted_key_servers:
|
trusted_key_servers:
|
||||||
- server_name: "matrix.org"
|
- server_name: "matrix.org"
|
||||||
|
|||||||
8
start.sh
8
start.sh
@@ -28,6 +28,10 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
|
|||||||
|
|
||||||
yq w -i /app/data/configs/homeserver.yaml server_name "${server_name}"
|
yq w -i /app/data/configs/homeserver.yaml server_name "${server_name}"
|
||||||
yq w -i /app/data/configs/homeserver.yaml registration_shared_secret "$(pwgen -1s 64)"
|
yq w -i /app/data/configs/homeserver.yaml registration_shared_secret "$(pwgen -1s 64)"
|
||||||
|
|
||||||
|
yq w -i /app/data/configs/homeserver.yaml auto_join_rooms "[]"
|
||||||
|
yq w -i /app/data/configs/homeserver.yaml auto_join_rooms\[0\] "#discuss:${server_name}"
|
||||||
|
y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "==> Configuring synapse"
|
echo "==> Configuring synapse"
|
||||||
@@ -55,7 +59,9 @@ yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.bind_pas
|
|||||||
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.filter' "(objectClass=user)"
|
yq w -i /app/data/configs/homeserver.yaml 'password_providers[0].config.filter' "(objectClass=user)"
|
||||||
|
|
||||||
# turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup)
|
# turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup)
|
||||||
yq w -i /app/data/configs/homeserver.yaml turn_uris "[\"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=udp\", \"turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=tcp\"]"
|
yq w -i /app/data/configs/homeserver.yaml turn_uris "[]"
|
||||||
|
yq w -i /app/data/configs/homeserver.yaml turn_uris\[0\] "turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=udp"
|
||||||
|
yq w -i /app/data/configs/homeserver.yaml turn_uris\[1\] "turn:${CLOUDRON_TURN_SERVER}:${CLOUDRON_TURN_TLS_PORT}?transport=tcp"
|
||||||
yq w -i /app/data/configs/homeserver.yaml turn_shared_secret "${CLOUDRON_TURN_SECRET}"
|
yq w -i /app/data/configs/homeserver.yaml turn_shared_secret "${CLOUDRON_TURN_SECRET}"
|
||||||
|
|
||||||
# fix permissions
|
# fix permissions
|
||||||
|
|||||||
13
test/test.js
13
test/test.js
@@ -75,9 +75,19 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkAutoJoinRoom(done) {
|
||||||
|
superagent.get('https://' + app.fqdn + '/_matrix/client/r0/joined_rooms?access_token=' + token).end(function (error, result) {
|
||||||
|
if (error) return done(error);
|
||||||
|
if (result.statusCode !== 200) return done(new Error('Room listing failed with status ' + result.statusCode));
|
||||||
|
|
||||||
|
if (result.body.joined_rooms.length !== 1) return done(new Error('User must have auto-joined discuss channel:' + result.statusCode));
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function createRoom(done) {
|
function createRoom(done) {
|
||||||
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/createRoom?access_token=' + token).send({
|
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/createRoom?access_token=' + token).send({
|
||||||
room_alias_name: 'discuss'
|
room_alias_name: 'general'
|
||||||
}).end(function (error, result) {
|
}).end(function (error, result) {
|
||||||
if (error) return done(error);
|
if (error) return done(error);
|
||||||
if (result.statusCode !== 200) return done(new Error('Room creation failed with status ' + result.statusCode));
|
if (result.statusCode !== 200) return done(new Error('Room creation failed with status ' + result.statusCode));
|
||||||
@@ -118,6 +128,7 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
it('check landing page', checkLandingPage);
|
it('check landing page', checkLandingPage);
|
||||||
it('can login', checkLogin);
|
it('can login', checkLogin);
|
||||||
|
it('check autojoin', checkAutoJoinRoom);
|
||||||
it('create room', createRoom);
|
it('create room', createRoom);
|
||||||
it('check room', checkRoom);
|
it('check room', checkRoom);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user