Browse Source

matrix: need protocol

Guilhem Saurel 6 years ago
parent
commit
ab74103cec
3 changed files with 4 additions and 1 deletions
  1. 2 1
      matrix/Dockerfile
  2. 1 0
      matrix/README.md
  3. 1 0
      matrix/docker-compose.yml

+ 2 - 1
matrix/Dockerfile

@@ -8,4 +8,5 @@ RUN curl -sSL https://github.com/vector-im/riot-web/releases/download/$RIOT_VERS
   | tar -xz --strip-components=1
 
 ARG SYNAPSE_FULL_URL
-RUN sed "/default_hs_url/s=https://matrix.org=https://$SYNAPSE_FULL_URL=" config.sample.json > config.json
+ARG PROTOCOL
+RUN sed "/default_hs_url/s=https://matrix.org=${PROTOCOL}://${SYNAPSE_FULL_URL}=" config.sample.json > config.json

+ 1 - 0
matrix/README.md

@@ -18,6 +18,7 @@ echo SYNAPSE_SMTP_HOST=mail.gandi.net >> .env
 echo SYNAPSE_SMTP_USER=dev@oxyta.net >> .env
 echo SYNAPSE_SMTP_PASSWORD=changeme >> .env
 echo SYNAPSE_SERVER_NAME=matrix.localhost >> .env
+echo PROTOCOL=http >> .env  # or https for production
 ```
 
 If you setup your DNS with `_matrix._tcp           3600 IN  SRV    10 0 8448 $CHATONS_SERVICE.$CHATONS_DOMAIN.`, you

+ 1 - 0
matrix/docker-compose.yml

@@ -42,6 +42,7 @@ services:
       args:
         SYNAPSE_FULL_URL: ${CHATONS_SERVICE:-matrix}.${CHATONS_DOMAIN:-localhost}
         RIOT_VERSION: v1.0.1
+        PROTOCOL: ${PROTOCOL:-http}
     restart: unless-stopped
     labels:
       traefik.enable: "true"