Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
c3772a71
Commit
c3772a71
authored
5 years ago
by
przemas75
Committed by
Richard van der Hoff
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update docker-compose.yml for a static config file, and update traefik examples (#6142)
parent
782dd720
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/docker/README.md
+11
-24
11 additions, 24 deletions
contrib/docker/README.md
contrib/docker/docker-compose.yml
+16
-5
16 additions, 5 deletions
contrib/docker/docker-compose.yml
with
27 additions
and
29 deletions
contrib/docker/README.md
+
11
−
24
View file @
c3772a71
# Synapse Docker
FIXME: this is out-of-date as of
https://github.com/matrix-org/synapse/issues/5518. Contributions to bring it up
to date would be welcome.
### Automated configuration
It is recommended that you use Docker Compose to run your containers, including
this image and a Postgres server. A sample
``docker-compose.yml``
is provided,
including example labels for reverse proxying and other artifacts.
Read the section about environment variables and set at least mandatory variables,
then run the server:
```
docker-compose up -d
```
If secrets are not specified in the environment variables, they will be generated
as part of the startup. Please ensure these secrets are kept between launches of the
Docker container, as their loss may require users to log in again.
# Synapse Docker
###
Manual c
onfiguration
###
C
onfiguration
A sample
``docker-compose.yml``
is provided, including example labels for
reverse proxying and other artifacts. The docker-compose file is an example,
please comment/uncomment sections that are not suitable for your usecase.
Specify a
``SYNAPSE_CONFIG_PATH``
, preferably to a persistent path,
to use manual configuration. To generate a fresh
``homeserver.yaml``
, simply run:
to use manual configuration.
To generate a fresh
`homeserver.yaml`
, you can use the
`generate`
command.
(See the
[
documentation
](
../../docker/README.md#generating-a-configuration-file
)
for more information.) You will need to specify appropriate values for at least the
`SYNAPSE_SERVER_NAME`
and
`SYNAPSE_REPORT_STATS`
environment variables. For example:
```
docker-compose run --rm -e SYNAPSE_SERVER_NAME=my.matrix.host synapse generate
docker-compose run --rm -e SYNAPSE_SERVER_NAME=my.matrix.host
-e SYNAPSE_REPORT_STATS=yes
synapse generate
```
(This will also generate necessary signing keys.)
Then, customize your configuration and run the server:
```
...
...
This diff is collapsed.
Click to expand it.
contrib/docker/docker-compose.yml
+
16
−
5
View file @
c3772a71
...
...
@@ -15,13 +15,10 @@ services:
restart
:
unless-stopped
# See the readme for a full documentation of the environment settings
environment
:
-
SYNAPSE_SERVER_NAME=my.matrix.host
-
SYNAPSE_REPORT_STATS=no
-
SYNAPSE_ENABLE_REGISTRATION=yes
-
SYNAPSE_LOG_LEVEL=INFO
-
POSTGRES_PASSWORD=changeme
-
SYNAPSE_CONFIG_PATH=/etc/homeserver.yaml
volumes
:
# You may either store all the files in a local folder
-
./matrix-config:/etc
-
./files:/data
# .. or you may split this between different storage points
# - ./files:/data
...
...
@@ -35,9 +32,23 @@ services:
-
8448:8448/tcp
# ... or use a reverse proxy, here is an example for traefik:
labels
:
# The following lines are valid for Traefik version 1.x:
-
traefik.enable=true
-
traefik.frontend.rule=Host:my.matrix.Host
-
traefik.port=8008
# Alternatively, for Traefik version 2.0:
-
traefik.enable=true
-
traefik.http.routers.http-synapse.entryPoints=http
-
traefik.http.routers.http-synapse.rule=Host(`my.matrix.host`)
-
traefik.http.middlewares.https_redirect.redirectscheme.scheme=https
-
traefik.http.middlewares.https_redirect.redirectscheme.permanent=true
-
traefik.http.routers.http-synapse.middlewares=https_redirect
-
traefik.http.routers.https-synapse.entryPoints=https
-
traefik.http.routers.https-synapse.rule=Host(`my.matrix.host`)
-
traefik.http.routers.https-synapse.service=synapse
-
traefik.http.routers.https-synapse.tls=true
-
traefik.http.services.synapse.loadbalancer.server.port=8008
-
traefik.http.routers.https-synapse.tls.certResolver=le-ssl
db
:
image
:
docker.io/postgres:10-alpine
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment