Merge branch 'matrix_appservices_conf' into 'master'

Matrix appservices conf

See merge request aurore/ansible!38
This commit is contained in:
Alexandre IOOSS 2019-04-01 18:58:41 +02:00
commit df6c966b7f
5 changed files with 46 additions and 34 deletions

View file

@ -40,19 +40,20 @@
notify: Reload systemd daemons
# TODO generate registration
# node app.js -r -f irc-registration.yaml -u "http://localhost:9999" -c config.yaml -l ircbot
#- name: Copy appservice registration file
# copy:
# src: "{{ service_path }}/discord-registration.yaml"
# dest: "/etc/matrix-synapse/{{ service_name }}-registration.yaml"
# owner: matrix-synapse
# group: nogroup
# mode: 0600
# remote_src: yes
- name: Copy appservice registration file
copy:
src: "{{ service_path }}/irc-registration.yaml"
dest: "/etc/matrix-synapse/{{ service_name }}-registration.yaml"
owner: matrix-synapse
group: nogroup
mode: 0600
remote_src: yes
# Run
#- name: "Ensure that {{ service_name }} is started"
# service:
# name: "{{ service_name }}"
# state: started
# enabled: true
- name: "Ensure that {{ service_name }} is started"
service:
name: "{{ service_name }}"
state: started
enabled: true

View file

@ -3,13 +3,13 @@
homeserver:
# The URL to the home server for client-server API calls, also used to form the
# media URLs as displayed in bridged IRC channels:
url: "https://auro.re"
url: "http://auro.re"
#
# The URL of the homeserver hosting media files. This is only used to transform
# mxc URIs to http URIs when bridging m.room.[file|image] events. Optional. By
# default, this is the homeserver URL, specified above.
#
# media_url: "http://media.repo:8008"
media_url: "https://auro.re"
# Drop Matrix messages which are older than this number of seconds, according to
# the event's origin_server_ts.
@ -62,7 +62,7 @@ ircService:
# Whether to use SSL or not. Default: false.
ssl: true
# Whether or not IRC server is using a self-signed cert or not providing CA Chain
sslselfsign: false
sslselfsign: true
# Should the connection attempt to identify via SASL (if a server or user password is given)
# If false, this will use PASS instead. If SASL fails, we do not fallback to PASS.
sasl: false
@ -127,7 +127,7 @@ ircService:
# it can service bridge-specific queries from the IRC-side e.g. so
# real IRC clients have a way to change their Matrix display name.
# See https://github.com/matrix-org/matrix-appservice-irc/issues/55
enabled: true
enabled: false
# The nickname to give the AS bot.
nick: "AuroreBot"
# The password to give to NickServ or IRC Server for this nick. Optional.
@ -165,7 +165,7 @@ ircService:
createAlias: true
# Should the AS publish the new Matrix room to the public room list so
# anyone can see it? Default: true.
published: false
published: true
# What should the join_rule be for the new Matrix room? If 'public',
# anyone can join the room. If 'invite', only users with an invite can
# join the room. Note that if an IRC channel has +k or +i set on it,
@ -217,7 +217,7 @@ ircService:
ircToMatrix:
# Get a snapshot of all real IRC users on a channel (via NAMES) and
# join their virtual matrix clients to the room.
initial: false
initial: true
# Make virtual matrix clients join and leave rooms as their real IRC
# counterparts join/part channels. Default: false.
incremental: true
@ -225,24 +225,12 @@ ircService:
matrixToIrc:
# Get a snapshot of all real Matrix users in the room and join all of
# them to the mapped IRC channel on startup. Default: false.
initial: false
initial: true
# Make virtual IRC clients join and leave channels as their real Matrix
# counterparts join/leave rooms. Make sure your 'maxClients' value is
# high enough! Default: false.
incremental: true
# Apply specific rules to Matrix rooms. Only matrix-to-IRC takes effect.
rooms:
# Apply specific rules to IRC channels. Only IRC-to-matrix takes effect.
channels:
mappings:
# 1:many mappings from IRC channels to room IDs on this IRC server.
# The matrix room must already exist. Your matrix client should expose
# the room ID in a "settings" page for the room.
# "#thepub": ["!kieouiJuedJoxtVdaG:localhost"]
# Configuration for virtual matrix users. The following variables are
# exposed:
# $NICK => The IRC nick

View file

@ -9,7 +9,7 @@ Conflicts=shutdown.target
Type=simple
User={{ service_user }}
WorkingDirectory={{ service_path }}
ExecStart=/usr/bin/nodejs ./app.js -c config.yaml -f my_registration_file.yaml -p 9999
ExecStart=/usr/bin/nodejs ./app.js -c config.yaml -f irc-registration.yaml -p 9999
Restart=always
RestartSec=3

View file

@ -26,7 +26,7 @@ provisioning:
# Configuration related to the web portion of the bridge. Handles the inbound webhooks
web:
hookUrlBase: 'http://synapse.adm.auro.re:9000/'
hookUrlBase: 'https://auro.re:9442/'
logging:
file: logs/webhook.log

View file

@ -82,3 +82,26 @@ server {
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
listen 9442 ssl;
listen [::]:9442 ssl;
# Set witch server name we define
server_name auro.re;
# Separate log files
access_log /var/log/nginx/main.access.log;
error_log /var/log/nginx/main.error.log;
# Use LetsEncrypt SSL
ssl_certificate /etc/letsencrypt/live/auro.re/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/auro.re/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/auro.re/chain.pem;
# For Matrix Appservice Webhooks
location / {
proxy_pass http://synapse.adm.auro.re:9000;
proxy_set_header X-Forwarded-For $remote_addr;
}
}