Browse Source

matrix: add riot

Guilhem Saurel 6 years ago
parent
commit
f42d6dadb2
2 changed files with 23 additions and 0 deletions
  1. 11 0
      matrix/Dockerfile
  2. 12 0
      matrix/docker-compose.yml

+ 11 - 0
matrix/Dockerfile

@@ -0,0 +1,11 @@
+FROM nginx:alpine
+
+WORKDIR /usr/share/nginx/html
+RUN apk add --no-cache curl
+
+ARG RIOT_VERSION
+ARG SYNAPSE_SERVER_NAME
+
+RUN curl -sSL https://github.com/vector-im/riot-web/releases/download/$RIOT_VERSION/riot-$RIOT_VERSION.tar.gz | tar -xz
+RUN mv riot-$RIOT_VERSION/* .
+RUN sed "/default_hs_url/s/https:\/\/matrix.org/\/\/$SYNAPSE_SERVER_NAME/" config.sample.json > config.json

+ 12 - 0
matrix/docker-compose.yml

@@ -33,3 +33,15 @@ services:
       - POSTGRES_DB=synapse
     volumes:
       - ${CHATONS_ROOT_DIR:-/srv/chatons}/matrix/postgres:/var/lib/postgresql/data
+
+  riot:
+    build:
+      context: .
+      args:
+        SYNAPSE_SERVER_NAME: matrix.${CHATONS_DOMAIN:-local}
+        RIOT_VERSION: v0.15.6
+    labels:
+      traefik.enable: "true"
+      traefik.frontend.rule: "Host: riot.${CHATONS_DOMAIN:-local}, www.riot.${CHATONS_DOMAIN:-local}"
+    networks:
+      - proxytanet