summary refs log tree commit diff
diff options
context:
space:
mode:
authorFridtjof Mund <2780577+fridtjof@users.noreply.github.com>2020-02-14 17:27:29 +0100
committerGitHub <noreply@github.com>2020-02-14 16:27:29 +0000
commit32873efa87055518b08d9b3b001b3bf9b60437f9 (patch)
tree05347e2301e6ae04cbd32f4103b15aafe347be6b
parentAdd a warning about indentation to generated config (#6920) (diff)
downloadsynapse-32873efa87055518b08d9b3b001b3bf9b60437f9.tar.xz
contrib/docker: Ensure correct encoding and locale settings on DB creation (#6921)
Signed-off-by: Fridtjof Mund <fridtjof@das-labor.org>
Diffstat (limited to '')
-rw-r--r--changelog.d/6921.docker1
-rw-r--r--contrib/docker/docker-compose.yml3
2 files changed, 4 insertions, 0 deletions
diff --git a/changelog.d/6921.docker b/changelog.d/6921.docker
new file mode 100644
index 0000000000..152e723339
--- /dev/null
+++ b/changelog.d/6921.docker
@@ -0,0 +1 @@
+Databases created using the compose file in contrib/docker will now always have correct encoding and locale settings. Contributed by Fridtjof Mund.
diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml
index 2b044baf78..5df29379c8 100644
--- a/contrib/docker/docker-compose.yml
+++ b/contrib/docker/docker-compose.yml
@@ -56,6 +56,9 @@ services:
     environment:
       - POSTGRES_USER=synapse
       - POSTGRES_PASSWORD=changeme
+      # ensure the database gets created correctly
+      # https://github.com/matrix-org/synapse/blob/master/docs/postgres.md#set-up-database
+      - POSTGRES_INITDB_ARGS="--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
     volumes:
       # You may store the database tables in a local folder..
       - ./schemas:/var/lib/postgresql/data