Skip to content

Commit

Permalink
Merge pull request #2 from eimis-ans/feat/add-eimis-modules
Browse files Browse the repository at this point in the history
Include EIMIS modules to Synapse image
  • Loading branch information
ad2ien authored Jun 5, 2024
2 parents 9b6043f + 0c3c733 commit fff211e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
FROM matrixdotorg/synapse:v1.104.0

ARG S3_MEDIA_MODULE_VERSION=v1.4.0
ARG WHITELIST_MODULE_VERSION=v1.0.0
ARG PSC_MAPPING_PROVIDER_VERSION=v1.0.0

COPY ./html-templates/*.html /usr/local/lib/python3.11/site-packages/synapse/res/templates/

ADD https://raw.githubusercontent.com/matrix-org/synapse-s3-storage-provider/${S3_MEDIA_MODULE_VERSION}/s3_storage_provider.py /usr/local/lib/python3.11/site-packages/s3_storage_provider.py
RUN pip install --no-cache-dir boto3==1.34.64

ADD https://raw.githubusercontent.com/eimis-ans/white-list-synapse-module/${WHITELIST_MODULE_VERSION}/white_list_module/__init__.py /usr/local/lib/python3.11/site-packages/white_list_module/__init__.py
RUN chmod 644 /usr/local/lib/python3.11/site-packages/white_list_module/__init__.py

ADD https://raw.githubusercontent.com/eimis-ans/white-list-synapse-module/${WHITELIST_MODULE_VERSION}/white_list_module/__init__.py /usr/local/lib/python3.11/site-packages/white_list_module/__init__.py
RUN chmod 644 /usr/local/lib/python3.11/site-packages/white_list_module/__init__.py

ADD https://raw.githubusercontent.com/eimis-ans/eimis-prosante-connect-module/${PSC_MAPPING_PROVIDER_VERSION}/psc_mapping_provider/__init__.py /usr/local/lib/python3.11/site-packages/synapse/psc_mapping_provider.py
RUN chmod 644 /usr/local/lib/python3.11/site-packages/synapse/psc_mapping_provider.py
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ services:

element:
container_name: element-local
image: vectorim/element-web:v1.11.31
image: vectorim/element-web:v1.11.64
ports:
- "1983:80"
volumes:
Expand Down
6 changes: 6 additions & 0 deletions docker-test-config/mx-conf/homeserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ macaroon_secret_key: "PaA8zb1+pl+8R:us^A7.u~arj-7kEgiinJ4nyPH^^t#PR9Z1YI"
form_secret: "IHQ3ArqBn&Rv=rS*MP,5a#dii@;;85b4a5AQd-v4XmDLY2bd4X"
signing_key_path: "/data/matrix.local.signing.key"
use_insecure_ssl_client_just_for_testing_do_not_use: true
modules:
- module: white_list_module.EimisWhiteList
config:
room_id: ""
idp_id: "keycloak"
oidc_providers:
- idp_id: keycloak
idp_name: "EIMIS Connect"
Expand All @@ -53,6 +58,7 @@ oidc_providers:
client_secret: "I_eat_kiwis_with_the_skin_on"
scopes: ["openid", "profile"]
user_mapping_provider:
module: synapse.psc_mapping_provider.ProsanteConnectMappingProvider
config:
localpart_template: "{{ user.preferred_username }}"
display_name_template: "{{ user.name }}"
Expand Down

0 comments on commit fff211e

Please sign in to comment.