Make the Docker image run both synapse and the proxy

This commit is contained in:
Brendan Abolivier 2018-11-22 15:10:19 +00:00 committed by Brendan Abolivier
parent 55bfb3caa8
commit fc99d3dab3
8 changed files with 627 additions and 3 deletions

View file

@ -69,7 +69,8 @@ RUN apt-get update && apt-get install -y \
mtr-tiny \
inetutils-ping \
less \
lsof
lsof \
supervisor
# for topologiser
RUN pip install flask
@ -77,14 +78,17 @@ RUN pip install flask
COPY --from=builder /install /usr/local
COPY ./docker/start.py /start.py
COPY ./docker/conf /conf
COPY ./docker/proxy/proxy /proxy
COPY ./docker/proxy/maps /maps
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
VOLUME ["/data"]
EXPOSE 8008/tcp 8448/tcp 3000/tcp
EXPOSE 8008/tcp 8448/tcp 3000/tcp 5683/udp
ENV LD_PRELOAD=/usr/local/lib/libksm_preload.so
# default is 32768 (8 4KB pages)
ENV KSMP_MERGE_THRESHOLD=16384
ENTRYPOINT ["/start.py"]
ENTRYPOINT ["/usr/bin/supervisord"]

View file

@ -0,0 +1,27 @@
[
"errcode",
"error",
"msgtype",
"body",
"formatted_body",
"format",
"avatar_url",
"displayname",
"membership",
"url",
"name",
"origin",
"origin_server_ts",
"pdus",
"sender",
"type",
"auth_events",
"unsigned",
"prev_events",
"depth",
"redacts",
"event_id",
"room_id",
"state_key",
"content"
]

View file

@ -0,0 +1,5 @@
[
"m.text",
"m.emote",
"m.notice"
]

View file

@ -0,0 +1,36 @@
[
"M_BAD_JSON",
"M_BAD_STATE",
"M_CANNOT_LEAVE_SERVER_NOTICE_ROOM",
"M_CAPTCHA_INVALID",
"M_CAPTCHA_NEEDED",
"M_CONSENT_NOT_GIVEN",
"M_EXAMPLE_ERROR",
"M_EXCLUSIVE",
"M_FORBIDDEN",
"M_GUEST_ACCESS_FORBIDDEN",
"M_INCOMPATIBLE_ROOM_VERSION",
"M_INVALID_PARAM",
"M_INVALID_ROOM_STATE",
"M_INVALID_USERNAME",
"M_LIMIT_EXCEEDED",
"M_MISSING_PARAM",
"M_MISSING_TOKEN",
"M_NOT_FOUND",
"M_NOT_JSON",
"M_RESOURCE_LIMIT_EXCEEDED",
"M_ROOM_IN_USE",
"M_SERVER_NOT_TRUSTED",
"M_THREEPID_AUTH_FAILED",
"M_THREEPID_DENIED",
"M_THREEPID_IN_USE",
"M_THREEPID_NOT_FOUND",
"M_TOO_LARGE",
"M_UNAUTHORIZED",
"M_UNKNOWN",
"M_UNKNOWN_TOKEN",
"M_UNRECOGNIZED",
"M_UNSUPPORTED_ROOM_VERSION",
"M_USER_IN_USE",
"M_WEAK_PASSWORD"
]

View file

@ -0,0 +1,26 @@
[
"m.call.answer",
"m.call.candidates",
"m.call.hangup",
"m.call.invite",
"m.direct",
"m.presence",
"m.receipt",
"m.room.aliases",
"m.room.avatar",
"m.room.canonical_alias",
"m.room.create",
"m.room.guest_access",
"m.room.history_visibility",
"m.room.join_rules",
"m.room.member",
"m.room.message",
"m.room.message.feedback",
"m.room.name",
"m.room.power_levels",
"m.room.redaction",
"m.room.third_party_invite",
"m.room.topic",
"m.tag",
"m.typing"
]

View file

@ -0,0 +1,518 @@
[
{
"path": "/_matrix/client/r0/profile/{userId}/displayname",
"method": "get"
},
{
"path": "/_matrix/client/r0/profile/{userId}/displayname",
"method": "put"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/join",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/kick",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}",
"method": "put"
},
{
"path": "/_matrix/client/r0/admin/whois/{userId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/receipt/{receiptType}/{eventId}",
"method": "post"
},
{
"path": "/_matrix/client/versions",
"method": "get"
},
{
"path": "/_matrix/media/r0/config",
"method": "get"
},
{
"path": "/_matrix/media/r0/download/{serverName}/{mediaId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/invite ",
"method": "post"
},
{
"path": "/_matrix/client/r0/join/{roomIdOrAlias}",
"method": "post"
},
{
"path": "/_matrix/client/r0/presence/list/{userId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/presence/list/{userId}",
"method": "post"
},
{
"path": "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}",
"method": "delete"
},
{
"path": "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}",
"method": "put"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/state/{eventType}",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/state/{eventType}",
"method": "put"
},
{
"path": "/_matrix/client/r0/account/whoami",
"method": "get"
},
{
"path": "/_matrix/client/r0/devices",
"method": "get"
},
{
"path": "/_matrix/client/r0/keys/claim",
"method": "post"
},
{
"path": "/_matrix/client/r0/login",
"method": "get"
},
{
"path": "/_matrix/client/r0/login",
"method": "post"
},
{
"path": "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/actions",
"method": "put"
},
{
"path": "/_matrix/client/r0/register/available",
"method": "get"
},
{
"path": "/_matrix/client/r0/user/{userId}/filter",
"method": "post"
},
{
"path": "/_matrix/client/r0/user_directory/search",
"method": "post"
},
{
"path": "/_matrix/client/r0/account/3pid",
"method": "get"
},
{
"path": "/_matrix/client/r0/account/3pid",
"method": "post"
},
{
"path": "/_matrix/client/r0/publicRooms",
"method": "get"
},
{
"path": "/_matrix/client/r0/publicRooms",
"method": "post"
},
{
"path": "/_matrix/client/r0/register",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/ban",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/typing/{userId}",
"method": "put"
},
{
"path": "/_matrix/client/r0/search",
"method": "post"
},
{
"path": "/_matrix/client/r0/account/password",
"method": "post"
},
{
"path": "/_matrix/client/r0/initialSync",
"method": "get"
},
{
"path": "/_matrix/client/r0/logout/all",
"method": "post"
},
{
"path": "/_matrix/client/r0/account/deactivate",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/forget",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/redact/{eventId}/{txnId}",
"method": "put"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/unban",
"method": "post"
},
{
"path": "/_matrix/client/r0/keys/query",
"method": "post"
},
{
"path": "/_matrix/client/r0/user/{userId}/account_data/{type}",
"method": "put"
},
{
"path": "/_matrix/client/r0/user/{userId}/rooms/{roomId}/tags/{tag}",
"method": "delete"
},
{
"path": "/_matrix/client/r0/user/{userId}/rooms/{roomId}/tags/{tag}",
"method": "put"
},
{
"path": "/_matrix/media/r0/upload",
"method": "post"
},
{
"path": "/_matrix/client/r0/events",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/context/{eventId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/invite",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/messages",
"method": "get"
},
{
"path": "/_matrix/client/r0/account/3pid/delete",
"method": "post"
},
{
"path": "/_matrix/client/r0/createRoom",
"method": "post"
},
{
"path": "/_matrix/client/r0/profile/{userId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/enabled",
"method": "put"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/leave",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/members",
"method": "get"
},
{
"path": "/_matrix/client/r0/sendToDevice/{eventType}/{txnId}",
"method": "put"
},
{
"path": "/_matrix/client/r0/voip/turnServer",
"method": "get"
},
{
"path": "/.well-known/matrix/client",
"method": "get"
},
{
"path": "/_matrix/client/r0/directory/list/appservice/{networkId}/{roomId}",
"method": "put"
},
{
"path": "/_matrix/client/r0/keys/upload",
"method": "post"
},
{
"path": "/_matrix/client/r0/pushrules/",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/initialSync",
"method": "get"
},
{
"path": "/_matrix/client/r0/user/{userId}/openid/request_token",
"method": "post"
},
{
"path": "/_matrix/client/r0/user/{userId}/rooms/{roomId}/tags",
"method": "get"
},
{
"path": "/_matrix/media/r0/download/{serverName}/{mediaId}/{fileName}",
"method": "get"
},
{
"path": "/_matrix/client/r0/delete_devices",
"method": "post"
},
{
"path": "/_matrix/client/r0/events/{eventId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/profile/{userId}/avatar_url",
"method": "get"
},
{
"path": "/_matrix/client/r0/profile/{userId}/avatar_url",
"method": "put"
},
{
"path": "/_matrix/client/r0/pushers/set",
"method": "post"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/event/{eventId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/report/{eventId}",
"method": "post"
},
{
"path": "/_matrix/media/r0/preview_url",
"method": "get"
},
{
"path": "/_matrix/client/r0/directory/room/{roomAlias}",
"method": "delete"
},
{
"path": "/_matrix/client/r0/directory/room/{roomAlias}",
"method": "get"
},
{
"path": "/_matrix/client/r0/directory/room/{roomAlias}",
"method": "put"
},
{
"path": "/_matrix/client/r0/sync",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/read_markers",
"method": "post"
},
{
"path": "/_matrix/client/r0/logout",
"method": "post"
},
{
"path": "/_matrix/client/r0/notifications",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/joined_members",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}",
"method": "put"
},
{
"path": "/_matrix/client/r0/user/{userId}/filter/{filterId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/user/{userId}/rooms/{roomId}/account_data/{type}",
"method": "put"
},
{
"path": "/_matrix/client/r0/joined_rooms",
"method": "get"
},
{
"path": "/_matrix/client/r0/keys/changes",
"method": "get"
},
{
"path": "/_matrix/client/r0/presence/{userId}/status",
"method": "get"
},
{
"path": "/_matrix/client/r0/presence/{userId}/status",
"method": "put"
},
{
"path": "/_matrix/client/r0/pushers",
"method": "get"
},
{
"path": "/_matrix/client/r0/rooms/{roomId}/state",
"method": "get"
},
{
"path": "/_matrix/media/r0/thumbnail/{serverName}/{mediaId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/devices/{deviceId}",
"method": "delete"
},
{
"path": "/_matrix/client/r0/devices/{deviceId}",
"method": "get"
},
{
"path": "/_matrix/client/r0/devices/{deviceId}",
"method": "put"
},
{
"path": "/_matrix/federation/v1/backfill/{roomId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/get_missing_events/{roomId}",
"method": "post"
},
{
"path": "/_matrix/federation/v1/event_auth/{roomId}/{eventId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/query_auth/{roomId}/{eventId}",
"method": "post"
},
{
"path": "/_matrix/federation/v1/state/{roomId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/state_ids/{roomId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/event/{eventId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/invite/{roomId}/{eventId}",
"method": "put"
},
{
"path": "/_matrix/federation/v1/make_join/{roomId}/{userId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/send_join/{roomId}/{eventId}",
"method": "put"
},
{
"path": "/_matrix/federation/v1/query/{serverName}/{keyId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/query",
"method": "post"
},
{
"path": "/_matrix/federation/v1/server/{keyId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/make_leave/{roomId}/{userId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/send_leave/{roomId}/{eventId}",
"method": "put"
},
{
"path": "/_matrix/federation/v1/openid/userinfo",
"method": "get"
},
{
"path": "/_matrix/federation/v1/publicRooms",
"method": "get"
},
{
"path": "/_matrix/federation/v1/query/directory",
"method": "get"
},
{
"path": "/_matrix/federation/v1/query/profile",
"method": "get"
},
{
"path": "/_matrix/federation/v1/query/{queryType}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/query_auth/{roomId}/{eventId}",
"method": "post"
},
{
"path": "/_matrix/federation/v1/state/{roomId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/state_ids/{roomId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/event/{eventId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/event_auth/{roomId}/{eventId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/exchange_third_party_invite/{roomId}",
"method": "put"
},
{
"path": "/_matrix/federation/v1/3pid/onbind",
"method": "put"
},
{
"path": "/_matrix/federation/v1/send/{txnId}",
"method": "put"
},
{
"path": "/_matrix/federation/v1/user/devices/{userId}",
"method": "get"
},
{
"path": "/_matrix/federation/v1/user/keys/claim",
"method": "post"
},
{
"path": "/_matrix/federation/v1/user/keys/query",
"method": "post"
}
]

BIN
docker/proxy/proxy Executable file

Binary file not shown.

8
docker/supervisord.conf Normal file
View file

@ -0,0 +1,8 @@
[supervisord]
nodaemon=true
[program:synapse]
command=/start.py
[program:proxy]
command=/proxy