Commit Graph

257 Commits

Author SHA1 Message Date
Richard van der Hoff
1ddc7b39c9
Docker image: open the non-TLS port by default. (#5568)
There's not much point in binding to localhost when it's in a docker container.
2019-06-27 13:50:10 +01:00
Richard van der Hoff
2f7ebc2a55
Deprecate the env var way of running the docker image (#5566)
This is mostly a documentation change, but also adds a default value for
SYNAPSE_CONFIG_PATH, so that running from the generated config is the default,
and will Just Work provided your config is in the right place.
2019-06-27 13:49:48 +01:00
Richard van der Hoff
b4db70e167
Merge pull request #5565 from matrix-org/rav/docker/fix_log_config
Docker: generate our own log config
2019-06-27 11:19:37 +01:00
Richard van der Hoff
b1b8a24b63
Merge pull request #5563 from matrix-org/rav/docker/data_dir
Docker image: add support for SYNAPSE_DATA_DIR parameter
2019-06-27 11:17:44 +01:00
Richard van der Hoff
28e30c6581 Docker: generate our own log config
When running under docker, we want to use docker's own logging stuff rather
than losing the logs somewhere on the container's filesystem, so let's use log
configs that spit logs out to stdout instead.
2019-06-26 15:48:38 +01:00
Richard van der Hoff
6347dc1bed Add support for SYNAPSE_CONFIG_DIR 2019-06-26 15:48:38 +01:00
Richard van der Hoff
7e433beb65 Docker image: add support for SYNAPSE_DATA_DIR parameter
Fixes #4830.
2019-06-26 15:38:08 +01:00
Richard van der Hoff
c58a6e6108 document supported env vars for docker 'generate' option 2019-06-26 15:38:08 +01:00
Richard van der Hoff
a5fba9c27c Docker: only run --generate-keys when generating config on-the-fly.
We don't want to generate any missing configs when running from a precanned
config.

(There's a strong argument that we don't want to do this at all, since
generating a new signing key on each invocation sounds disasterous, but I don't
fancy unpicking that for now.)
2019-06-26 15:31:19 +01:00
Richard van der Hoff
a1732bbff9 improve logging for generate_config_from_template 2019-06-26 15:31:19 +01:00
Richard van der Hoff
5375c3a9b8 isort 2019-06-25 15:30:19 +01:00
Richard van der Hoff
3f24e4dce7 Add a main() function 2019-06-25 15:30:19 +01:00
Richard van der Hoff
b1fddb7f69 Factor out a run_generate_config function 2019-06-25 15:30:19 +01:00
Richard van der Hoff
a52e1a3b6c Factor out "generate_config_from_template"
... and inline generate_secrets
2019-06-25 15:30:19 +01:00
Richard van der Hoff
fe2d876e2a Increase default log level for docker image to INFO. (#5547)
Fixes #3370.
2019-06-25 14:38:38 +10:00
Richard van der Hoff
f817fc9ad5 Update docker image to use Python 3.7. (#5546)
Python 3.7 is apparently faster than 3.6, and should be mature enough.
2019-06-25 14:20:53 +10:00
Amber Brown
32e7c9e7f2
Run Black. (#5482) 2019-06-20 19:32:02 +10:00
Richard van der Hoff
8e7ef3a023 Include xmlsec in the docker image
Fixes #5467.
2019-06-18 22:35:19 +01:00
Amber Brown
eba7caf09f
Remove Postgres 9.4 support (#5448) 2019-06-18 00:59:00 +10:00
Neil Johnson
4f68188d0b
Change to absolute path for contrib/docker
because this file is reproduced on dockerhub and relative paths don't work
2019-06-13 16:42:36 +01:00
Steffen
2dfbeea66f Update README.md (#5222)
Add missing backslash
2019-05-22 12:53:16 +01:00
Richard van der Hoff
836d3adcce Merge branch 'master' into develop 2019-05-03 19:25:01 +01:00
Richard van der Hoff
ecc0967315 Debian: we now need libpq-dev.
psycopg 2.8 is now out, which means that the C library gets built from source,
so we now need libpq-dev when building.

Turns out the need for this package is already documented in
docs/postgres.rst.
2019-05-03 18:34:34 +01:00
*=0=1=4=*
4a9a118a94 Fix handling of SYNAPSE_NO_TLS in docker image (#5005) 2019-04-25 14:47:22 +01:00
Silke Hofstra
a137f4eac0 Add systemd-python to optional dependencies (#4339)
Using systemd-python allows for logging to the systemd journal,
as is documented in: `synapse/contrib/systemd/log_config.yaml`.

Signed-off-by: Silke Hofstra <silke@slxh.eu>
2019-04-16 20:41:17 +10:00
*=0=1=4=*
40810b81d2 Correct default POSTGRES_USER in Docker README (#4987)
Correct default POSTGRES_USER in Docker README
2019-04-04 10:38:16 +01:00
Jurrie Overgoor
e0f219789d Add -p argument for docker run command example
Signed-off-by: Jurrie Overgoor <1213142+Jurrie@users.noreply.github.com>
2019-03-29 10:25:41 +01:00
Jurrie Overgoor
aee4ea8ba8 Fix typo in TLS filenames
Signed-off-by: Jurrie Overgoor <1213142+Jurrie@users.noreply.github.com>
2019-03-29 10:25:41 +01:00
Richard van der Hoff
5580616235 Document the generate option for the docker image. 2019-03-07 07:35:42 +00:00
Richard van der Hoff
649fe1c2be Fix debian build dockerfile
Make sure it refreshes the apt cache before trying to install stuff
2019-02-14 17:29:40 +00:00
Richard van der Hoff
91f8cd3307 Remove redundant entries from docker config
* no_tls is now redundant (#4613)
* we don't need a dummy cert any more (#4618)
2019-02-11 22:16:44 +00:00
Richard van der Hoff
40b35fb875
Enable ACME support in the docker image (#4566)
Also:

* Fix wrapping in docker readme
* Clean up some docs on the docker image
* a workaround for #4554
2019-02-05 13:42:21 +00:00
Richard van der Hoff
3ef71a6ea0
Docker: only copy what we need to the build image (#4562)
There are two reasons this is a good thing:

 * first, it means that you don't end up with stuff kicking around your working
   copy ending up in the build image by mistake (which can upset the pip
   install process)

 * second: it means that the docker image cache is more effective, and we can
   reuse docker images when iterating on the docker stuff.
2019-02-05 11:44:40 +00:00
Amber Brown
23b0813599
Require ECDH key exchange & remove dh_params (#4429)
* remove dh_params and set better cipher string
2019-01-22 21:58:50 +11:00
Richard van der Hoff
b5b868d41e Rewrite build_debian_packages
Rewrite this in python so that it can be run in parallel.
2019-01-12 12:40:58 +00:00
Richard van der Hoff
95fca1c7e9 fix docker build to install optional deps 2019-01-09 16:37:51 +00:00
Richard van der Hoff
7134832c01
Install the optional dependencies into the debian package (#4325)
since #4298, the optional dependencies are no longer installed with a simple
`pip install .`, which meant that they were not being included in the debian
package.

The easy fix to that is dh_virtualenv --extras, but that needs dh_virtualenv
1.1...
2019-01-02 07:17:39 +00:00
Richard van der Hoff
bdc44b99a2 buster is a thing 2018-12-20 16:11:21 +00:00
Richard van der Hoff
1a6d5bfa08 Debian packaging via dh_virtualenv (#4285) 2018-12-20 11:33:29 +00:00
Richard van der Hoff
75937e9033 Remove obsolete settings from docker homeserver.yaml
These aren't used, because we have a `log_config` setting.
2018-12-04 12:31:00 +00:00
Neil Johnson
78ba0e7ab8 Remove riot.im from the list of trusted Identity Servers in the default configuration (#4207) 2018-11-20 12:29:25 +01:00
Cédric Laudrel
379376e5e6 Make Docker image listening on ipv6 as well as ipv4
Signed-off-by: Cédric Laudrel <dek@iono.me>
2018-10-25 20:03:47 +02:00
Richard van der Hoff
1519572961 Ship the email templates as package_data
move the example email templates into the synapse package so that they can be
used as package data, which should mean that all of the packaging mechanisms
(pip, docker, debian, arch, etc) should now come with the example templates.

In order to grandfather in people who relied on the templates being in the old
place, check for that situation and fall back to using the defaults if the
templates directory does not exist.
2018-10-17 16:46:02 +01:00
Richard van der Hoff
53c5fa4e6c
Further reduce the size of the docker image (#3972)
Rewrite the dockerfile as a multistage build: this means we can get rid of a whole load of cruft which we don't need.
2018-10-01 12:29:17 +01:00
Jan Christian Grünhage
df55a943ca
Update Dockerfile 2018-09-25 14:33:38 +02:00
Jan Christian Grünhage
8dfb33d325 make python 3 work in the docker container 2018-09-20 14:55:11 +02:00
Amber Brown
741571cf22
Add a way to run tests in PostgreSQL in Docker (#3699) 2018-09-20 18:12:45 +10:00
Simon Dwyer
da864a92c9 Added description for "SYNAPSE_MAX_UPLOAD_SIZE" variable. 2018-09-16 13:12:57 +10:00
Simon Dwyer
f472abd792 Added description for "SYNAPSE_MAX_UPLOAD_SIZE" variable. 2018-09-16 13:12:57 +10:00
Simon Dwyer
9c749a6b61 Added 'MAX_UPLOAD_SIZE' variable and set default to "10M" 2018-09-16 13:12:57 +10:00
Jan Christian Grünhage
af10fa6536 add runtime dependencies 2018-09-10 17:39:49 +02:00
Mathijs van Gorcum
e586916cda
Move COPY before RUN and merge RUNs 2018-09-10 14:02:42 +00:00
Mathijs van Gorcum
b7e7712f07
Remove build requirements after building 2018-09-10 12:21:42 +00:00
Jan Christian Grünhage
d967653705 update docker base-image to alpine 3.8 2018-08-09 13:31:10 +02:00
Michael Kaye
42960aa047
Update README.md
Link to contrib/docker
2018-08-03 09:16:01 +01:00
Michael Kaye
1758f4e1c7 Address SPAG issues 2018-08-02 18:21:34 +01:00
Michael Kaye
0d25724419 Refactor docker locations and README.
This addresses #3224
2018-08-02 18:21:32 +01:00