diff --git a/README.md b/README.md index 1ba776b..b166bc9 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ THIS PROJECT IS IN EARLY DEVELOPMENT - WORK IN PROGRESS (including this README) ## Prerequisites Install and run keycloak and synapse. -You can find some docker-compose files in docker folder. +`docker/README` explains how to get a working local development environment. ## How to run 1. `git clone git@git.fosil.eu:eneko/okupamicoche.git` diff --git a/docker/README.md b/docker/README.md index 68d7d47..2bdeefd 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,5 +1,5 @@ # Okupa mi coche - Docker containers for the backend -Guide for seting up development environment for the backend. +Guide for seting up a local development environment for the backend. ## Setup 1. Install Docker in local machine @@ -34,7 +34,8 @@ docker run -it --rm \ ``` docker run --name okupamicoche-synapse -p 8008:8008 --mount type=volume,src=synapse-data,dst=/data \ -e SYNAPSE_CONFIG_PATH=/homeserver.yaml \ --v $(pwd)/homeserver.yaml:/homeserver.yaml --network=okupamicoche okupamicoche-synapse +-v $(pwd)/homeserver.yaml:/homeserver.yaml -v $(pwd)/okupamicoche-appservice.yaml:/okupamicoche-appservice.yaml \ +--network=okupamicoche okupamicoche-synapse ``` ## Run diff --git a/docker/synapse/homeserver.yaml b/docker/synapse/homeserver.yaml index 15ab714..84ee675 100644 --- a/docker/synapse/homeserver.yaml +++ b/docker/synapse/homeserver.yaml @@ -9,13 +9,6 @@ listeners: resources: - names: [ client, federation ] compress: false -acme: - enabled: false - port: 80 - bind_addresses: [ '::', '0.0.0.0' ] - reprovision_threshold: 30 - domain: matrix.example.com - account_key_file: /data/acme_account.key database: name: sqlite3 args: @@ -27,7 +20,6 @@ report_stats: false macaroon_secret_key: "6VvBQj_TedGcDDB_z,-qXV1W3:.CXrRG6AWF&4p:~iGNguy&_h" form_secret: "FM,2TSq++sZ@Tl0atcQP" signing_key_path: "/data/okupamicoche-synapse.signing.key" -old_signing_keys: trusted_key_servers: - server_name: "matrix.org" oidc_providers: @@ -43,4 +35,6 @@ oidc_providers: display_name_template: "{{ user.name }}" sso: client_whitelist: - - http://localhost:4200/ \ No newline at end of file + - http://localhost:4200/ +app_service_config_files: + - /okupamicoche-appservice.yaml \ No newline at end of file diff --git a/docker/synapse/okupamicoche-appservice.yaml b/docker/synapse/okupamicoche-appservice.yaml new file mode 100644 index 0000000..7f9b7a9 --- /dev/null +++ b/docker/synapse/okupamicoche-appservice.yaml @@ -0,0 +1,11 @@ +id: "Okupa mi coche" +url: "http://172.17.0.1:8081" +as_token: "30c05ae90a248a4188e620216fa72e349803310ec83e2a77b34fe90be6081f46" +hs_token: "312df522183efd404ec1cd22d2ffa4bbc76a8c1ccf541dd692eef281356bb74e" +sender_localpart: "okupamicoche" +namespaces: + users: [ ] + aliases: + - regex: "#viaje_.*" + exclusive: true + rooms: [ ] \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1bd3450..a8a601f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -25,7 +25,7 @@ logging: matrix: bot: # The domain-part of matrix-ids. E. g. example.org when your userIds look like @unicorn:example.org - serverName: synapse + serverName: okupamicoche-synapse # The localpart (username) of the user associated with the application service # or just the username of your bot. username: okupamicoche @@ -54,7 +54,7 @@ matrix: client: homeServer: # The hostname of your Homeserver. - hostname: synapse + hostname: okupamicoche-synapse # (optional) The port of your Homeserver. Default is 443. port: 8008 # (optional) Use http or https. Default is true (so uses https).