From 76e0d2abd6582462527a1daa9b00239597156b2b Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Mon, 22 Jul 2019 09:57:43 +0200 Subject: [PATCH] Add RiotWeb --- README.md | 2 ++ riot/Dockerfile | 24 +++++++++++++++++++++++ riot/config.json | 43 +++++++++++++++++++++++++++++++++++++++++ riot/docker-compose.yml | 15 ++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 riot/Dockerfile create mode 100644 riot/config.json create mode 100644 riot/docker-compose.yml diff --git a/README.md b/README.md index 1cd78c4..d14cc05 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,5 @@ Ensemble des recettes Docker d'Aurore. L'idée est de pouvoir redonder les services « légers » entre les résidences. En cours de test par erdnaxe. + +Pour lancer un service, aller dans le dossier puis `docker-compose up --build`. diff --git a/riot/Dockerfile b/riot/Dockerfile new file mode 100644 index 0000000..fc2217a --- /dev/null +++ b/riot/Dockerfile @@ -0,0 +1,24 @@ +FROM nginx:alpine + +ARG version +ARG gpg_key + +# Download Riot Web, verify with GPG, then install +RUN apk add --no-cache --virtual .build-deps curl gnupg &&\ + curl -sSL https://github.com/vector-im/riot-web/releases/download/${version}/riot-${version}.tar.gz -o riot-web.tar.gz &&\ + curl -sSL https://github.com/vector-im/riot-web/releases/download/${version}/riot-${version}.tar.gz.asc -o riot-web.tar.gz.asc &&\ + for server in \ + hkp://keyserver.ubuntu.com:80 \ + hkp://p80.pool.sks-keyservers.net:80 \ + ha.pool.sks-keyservers.net \ + ; do \ + echo "Fetching GPG key $gpg_key from $server"; \ + gpg --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$gpg_key" && break; \ + done &&\ + gpg --batch --verify riot-web.tar.gz.asc riot-web.tar.gz &&\ + tar -xzf riot-web.tar.gz &&\ + mv riot-${version} /etc/riot-web &&\ + cp /etc/riot-web/config.sample.json /etc/riot-web/config.json &&\ + rm -rf /usr/share/nginx/html && ln -s /etc/riot-web /usr/share/nginx/html &&\ + rm riot-web.tar.gz* &&\ + apk del .build-deps diff --git a/riot/config.json b/riot/config.json new file mode 100644 index 0000000..6bc4690 --- /dev/null +++ b/riot/config.json @@ -0,0 +1,43 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://auro.re", + "server_name": "auro.re" + }, + "m.identity_server": { + "base_url": "https://auro.re" + } + }, + "disable_custom_urls": false, + "disable_guests": false, + "disable_login_language_selector": false, + "disable_3pid_login": false, + "brand": "Riot Aurore", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html", + "bug_report_endpoint_url": "https://riot.im/bugreports/submit", + "defaultCountryCode": "GB", + "showLabsSettings": false, + "features": { + "feature_groups": "labs", + "feature_pinning": "labs" + }, + "default_federate": true, + "default_theme": "light", + "roomDirectory": { + "servers": [ + "matrix.org" + ] + }, + "welcomeUserId": "@riot-bot:matrix.org", + "piwik": { + "url": "https://piwik.riot.im/", + "whitelistedHSUrls": ["https://matrix.org"], + "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], + "siteId": 1 + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false + } +} diff --git a/riot/docker-compose.yml b/riot/docker-compose.yml new file mode 100644 index 0000000..6cadd72 --- /dev/null +++ b/riot/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3.7" + +services: + riot: + build: + context: . + args: + version: v1.3.0 + gpg_key: 5EA7E0F70461A3BCBEBE4D5EF6151806032026F9 + volumes: + # Make Riot default to auro.re matrix server + - ./config.json:/etc/riot-web/config.json:ro + ports: + - 8080:80 +