Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Default docker compose is broken out of the box #5019

Closed
turt2live opened this issue Apr 6, 2019 · 2 comments
Closed

Default docker compose is broken out of the box #5019

turt2live opened this issue Apr 6, 2019 · 2 comments
Labels
A-Docker Docker images, or making it easier to run Synapse in a container. z-p2 (Deprecated Label)

Comments

@turt2live
Copy link
Member

Possibly related: #4147
Source: https://www.reddit.com/r/selfhosted/comments/b9lll6/helping_setting_up_riotim_docker/ek660zc/

It should probably show how to run it behind a reverse proxy, or do so itself. Would be nice to have a federation-ready template.

@johnchristopher
Copy link

johnchristopher commented Apr 6, 2019

I also would like a federation ready template with SSL termination on the reverse proxy.

This is the default template I am using right now but I can't federate (yet). Working without problems so far (+LE certs) .I have different networks because I want to be able to bring one down at any time without halting other services :

Matrix server container

version: "3"

services:
  matrix:
    image: "matrixdotorg/synapse:v0.99.2"
    container_name: matrix
    volumes:                                                                                                                                                                                                      
      - ./data:/data                                                                                                                                                                                              
    environment:                                                                                                                                                                                                  
      - SYNAPSE_NO_TLS=1  # last time I checked the documentation it said this had to be set to 0 to allow federating                                                                                                                                                                                         
      - SYNAPSE_SERVER_NAME=matrix.domain.tld                                                                                                                                                        
      - SYNAPSE_ENABLE_REGISTRATION=1                                                                                                                                                                             
      - SYNAPSE_ALLOW_GUEST=1                                                                                                                                                                                     
      - SYNAPSE_REPORT_STATS=1                                                                                                                                                                                    
    labels:                                                                                                                                                                                                       
      - traefik.frontend.rule=Host:matrix.domain.tld                                                                                                     
      - traefik.frontend.entryPoints=https                                                                                                                                                                        
      - traefik.port=8008                                                                                                                                                                                         
      - traefik.backend=matrix                                                                                                                                                                                    
networks:                                                                                                                                                                                                         
  default:                                                                                                                                                                                                        
    external:                                                                                                                                                                                                     
      name: matrix

Traefik service container

version: '3'

services:
  traefik:
    image: traefik:v1.7.7-alpine
    container_name: traefik
    command: --api --docker
    ports:
      - "80:80"
      - "443:443"
    expose:
      - 8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/jhnchr/traefik/traefik.toml:/traefik.toml
      - /home/jhnchr/traefik/acme.json:/acme.json
    labels:
      - traefik.frontend.rule=Host:traefik.domain.tld
      - traefik.frontend.entryPoints=https
      - traefik.port=8080
      - traefik.frontend.auth.basic=admin:$$apr1$$
      - traefik.backend='traefik'

networks:
  default:
    external: 
      name: traefik

Traefik service configuration (traefik.toml):

logLevel = "DEBUG"
defaultEntryPoints = ["http", "https"]

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
    entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    passHostHeader=true
    [entryPoints.https.tls]
[acme]
email = "[email protected]"
storage = "acme.json"
entryPoint = "https"
onHostRule = true
acmeLogging =true

[acme.httpChallenge]
entryPoint = "http"

# Truth is it's now DNS-auth.

@neilisfragile neilisfragile added A-Docker Docker images, or making it easier to run Synapse in a container. enhancement z-p2 (Deprecated Label) labels Apr 16, 2019
@richvdh
Copy link
Member

richvdh commented Jun 27, 2019

there doesn't seem to be any useful information at https://www.reddit.com/r/selfhosted/comments/b9lll6/helping_setting_up_riotim_docker/ek660zc/.

I don't think that the docker compose stuff is fit for purpose; however that's a somewhat larger issue.

@richvdh richvdh closed this as completed Jun 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Docker Docker images, or making it easier to run Synapse in a container. z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

4 participants