diff --git a/files/matterbridge/.env b/files/matterbridge/.env new file mode 100644 index 0000000..85fa99a --- /dev/null +++ b/files/matterbridge/.env @@ -0,0 +1,15 @@ +$ANSIBLE_VAULT;1.1;AES256 +64656633626236653762333033333335373934356336306438663336303662376166383431613062 +3032373965376334303365353963616662663864336139300a333966363532653166636431666537 +66613433346362343063656165303766373437393664373263386639613933643437376539653066 +3432333037333366640a616536386364306139613836323731343664393133383663363134303966 +36623362306634316365383238613239626638623930373038373631346534623032326234643766 +34343762343462326661653831666332613932663161626232316537373633666661396137393238 +34313332646666633737363431643764373130636131323830353066643362336237613637643763 +35346132366630303839383639653533316634653637633333636466363662653337636565393735 +33376464343637643831393931386538356262326563613865343839643962363437306138643064 +35326336643036346231383936633434323031303636376262373735396337313937376434633239 +65356565346566376265363736613735303932326465386137333630633832353533653439336236 +39303531326666356432666665343838353762316331353034396364626138663963313034303439 +38303237316137643638623538313165623435346337393438323332663066363265626137653261 +3239366465366164623737313932613331613732336230313739 diff --git a/files/matterbridge/README.md b/files/matterbridge/README.md new file mode 100644 index 0000000..6a7d4ed --- /dev/null +++ b/files/matterbridge/README.md @@ -0,0 +1,39 @@ +# Description + +Runs [matterbridge](https://github.com/42wim/matterbridge/) as a docker-compose service +to bridge channels across chat services used by the community. + +## Bridges + +- IRC `#openmrs` channel +- Telegram `OpenMRS Chat` channel ([t.me/OpenMRS](https://t.me/OpenMRS)) +- Slack `#general` channel + +## Configuration + +All credentials are configured via the `.env` file. + +# Setup + +## IRC + +The `omrsbridge` user is registered to openmrs-infrastructure+irc email address +and has voice in the `#openmrs` channel. + +## Telegram + +The `omrsbridge_bot` was created using BotFather from the `OpenMRS_Admin` user +registered to the OpenMRS telephone number. + +## Slack + +An `omrsbridge` app was created using classic bot settings per the +[Slack bot setup](https://github.com/42wim/matterbridge/wiki/Slack-bot-setup) +instructions in the matterbridge documentation. When it was created in July 2020, +matterbridge used Slack "classic" bot creation and did not support granular permissions, +so you needed to use a special link when creating the bot, add the specific scopes +mentioned in the documentation, and avoid upgrading to granular permissions despite +Slack promoting their use (don't click on links/buttons offering to upgrade to granular +permissions or it won't work). matterbridge uses the Bot User OAuth Access Token (starting +with `xoxb-`) and will bridge to any channels the `omrsbridge` app is invited to within +Slack. diff --git a/files/matterbridge/docker-compose.yml b/files/matterbridge/docker-compose.yml new file mode 100644 index 0000000..8d60df1 --- /dev/null +++ b/files/matterbridge/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3.7" + +services: + matterbridge: + image: 42wim/matterbridge:1.17.5 + restart: always + volumes: + - ./matterbridge.toml:/etc/matterbridge/matterbridge.toml + environment: + - MATTERBRIDGE_IRC_OMRS_NICK=$IRC_NICK + - MATTERBRIDGE_IRC_OMRS_NICKSERVNICK=$IRC_NICK + - MATTERBRIDGE_IRC_OMRS_NICKSERVPASSWORD=$IRC_PASSWORD + - MATTERBRIDGE_TELEGRAM_OMRS_TOKEN=$TELEGRAM_TOKEN + - MATTERBRIDGE_SLACK_OMRS_TOKEN=$SLACK_TOKEN diff --git a/files/matterbridge/env.template b/files/matterbridge/env.template new file mode 100644 index 0000000..f9e7f39 --- /dev/null +++ b/files/matterbridge/env.template @@ -0,0 +1,4 @@ +IRC_NICK=ircnick +IRC_PASSWORD=ircpassword +TELEGRAM_TOKEN=telegram-bot-token +SLACK_TOKEN=xoxb-slack-bot-user-oauth-access-token \ No newline at end of file diff --git a/files/matterbridge/matterbridge.toml b/files/matterbridge/matterbridge.toml new file mode 100644 index 0000000..5a85eb5 --- /dev/null +++ b/files/matterbridge/matterbridge.toml @@ -0,0 +1,34 @@ +[general] +RemoteNickFormat="{NICK} <{PROTOCOL}> " + +[irc.omrs] +Nick="" # uses env MATTERBRIDGE_IRC_OMRS_NICK +NickServNick="" # uses env MATTERBRIDGE_IRC_OMRS_NICKSERVNICK +NickServPassword="" # uses env MATTERBRIDGE_IRC_OMRS_NICKSERVPASSWORD +Server="irc.freenode.net:6697" +UseTLS=true +UseSASL=true +SkipTLSVerify=false + +[telegram.omrs] +Token="" # uses env MATTERBRIDGE_TELEGRAM_OMRS_TOKEN + +[slack] +[slack.omrs] +Token="" # uses env MATTERBRIDGE_SLACK_OMRS_TOKEN + +[[gateway]] +name="omrs_gateway" +enable=true + + [[gateway.inout]] + account="irc.omrs" + channel="#openmrs" + + [[gateway.inout]] + account="telegram.omrs" + channel="-1001316747171" # t.me/OpenMRS + + [[gateway.inout]] + account="slack.omrs" + channel="general" \ No newline at end of file diff --git a/files/teleirc/.env b/files/teleirc/.env deleted file mode 100644 index 74ff0d4..0000000 --- a/files/teleirc/.env +++ /dev/null @@ -1,16 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -35336230656534313434636165633962613038393636303939646135346133636437646438353038 -3939633164356130363435313431666665626135616332380a643461363536353664656339383038 -35623134653863353266333564643963373833356134343035353934393761363632313336646365 -3433393065613638300a356135643937386333653937383830646238366466383236633034633766 -30393765613665663339633731333065636663326535323264663066663830623062646665666638 -64636166373537656436373034313766616565626361663264636665646636333036383466396631 -36336237626566336537653362636334643435333736363430383564663537616264323365616431 -36313932376133393565666530363532653663343163383733623064396263623432663537376231 -65306239343263333438633430663762306630373733643561366439646237383630653466343562 -36656530373165353866646463396335643263396334633465653661656432333032636261343231 -36373664623162653230663830613038333564623233653266656238333337333134636533653332 -35396564373632643536336236326430623334616631633162303762343631316330653630313631 -32353435623033613163646131336136653331313963656364366135306338366136633835646663 -66646363316533623136326433393661313763323964326162656666313238656239343461363635 -386432306238373663306232653830396237 diff --git a/files/teleirc/README.md b/files/teleirc/README.md deleted file mode 100644 index cf06da3..0000000 --- a/files/teleirc/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Description -Runs [teleirc](https://github.com/RITlug/teleirc/) as a docker-compose service. All credentials are configured via the `.env` file. Currently, the service only supports a single IRC <-> Telegram pair. diff --git a/files/teleirc/docker-compose.yml b/files/teleirc/docker-compose.yml deleted file mode 100644 index fdcd1e8..0000000 --- a/files/teleirc/docker-compose.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3' - -services: - teleirc: - image: openmrsinfra/teleirc:v1.3.3 - command: teleirc - user: teleirc - env_file: - - .env - healthcheck: - test: "exit 0" - restart: always diff --git a/files/teleirc/env.template b/files/teleirc/env.template deleted file mode 100644 index 4989301..0000000 --- a/files/teleirc/env.template +++ /dev/null @@ -1,6 +0,0 @@ -TELEIRC_TOKEN=<> -TELEGRAM_CHAT_ID=<> -IRC_CHANNEL=#openmrs -IRC_BOT_NAME=TelegramBot -IRC_NICKSERV_SERVICE=NickServ -IRC_NICKSERV_PASS=<>