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

Support config fragments for docker image #6662

Closed
ptman opened this issue Jan 8, 2020 · 3 comments · Fixed by #8390
Closed

Support config fragments for docker image #6662

ptman opened this issue Jan 8, 2020 · 3 comments · Fixed by #8390
Labels
A-Docker Docker images, or making it easier to run Synapse in a container.

Comments

@ptman
Copy link
Contributor

ptman commented Jan 8, 2020

Description:

I'm using the very nice docker image of synapse and would like to follow the default configuration and only override specific parts of it. It seems that synapse supports config fragments in a directory (which the debian package seems to be using ), but the docker image runs start.py which doesn't have the relevant flags and doesn't allow passing them in.

@richvdh
Copy link
Member

richvdh commented Jan 8, 2020

yeah; it would be good just to pass additional commandline args through to the synapse process.

@richvdh richvdh added the A-Docker Docker images, or making it easier to run Synapse in a container. label Jan 8, 2020
@samuel-p
Copy link
Contributor

For now you can overwrite the entrypoint like this to use multiple configs:

docker run --entrypoint "/usr/local/bin/python -m synapse.app.homeserver --config-path=/data/homeserver.yaml --config-path=/data/another-file.yaml" ...

or using docker-compose:

  synapse:
    image: matrixdotorg/synapse
    entrypoint:
      - /usr/local/bin/python
      - -m
      - synapse.app.homeserver
      - --config-path=/data/homeserver.yaml
      - --config-path=/data/another-file.yaml

@JuniorJPDJ
Copy link

JuniorJPDJ commented Nov 18, 2020

@samuel-p how would compose example look like with #8390 ?

EDIT:
Nvm, I've got it.
Example:

  synapse_worker_appservice:                                                                                                                                                                                                                
    image: matrixdotorg/synapse
    restart: unless-stopped                                                                                                                                                                                                                 
    healthcheck:                                                                                                                                                                                                                            
      test: ["CMD", "curl", "-fSs", "http://localhost:8083/health"]                                                                                                                                                                         
      interval: 1m                                                                                                                                                                                                                          
      timeout: 10s                                                                                                                                                                                                                          
      retries: 3                                                                                                                                                                                                                            
    volumes_from:                                                                                                                                                                                                                           
      - synapse                                                                                                                                                                                                                             
    depends_on:                                                                                                                                                                                                                             
      - redis                                                                                                                                                                                                                               
      - synapse                                                                                                                                                                                                                             
    environment:                                                                                                                                                                                                                            
      SYNAPSE_WORKER: synapse.app.appservice                                                                                                                                                                                                
    command:                                                                                                                                                                                                                                
      - 'run'                                                                                                                                                                                                                               
      - '--config-path=/data/homeserver.yaml'                                                                                                                                                                                               
      - '--config-path=/data/workers/appservice.yaml'

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants