From 5c16b6e09f7f29ad3761d123db7d6f24801dd23d Mon Sep 17 00:00:00 2001 From: Fridtjof Mund Date: Fri, 14 Feb 2020 17:02:14 +0100 Subject: [PATCH 1/2] contrib/docker: Ensure correct encoding and locale settings on DB creation Signed-off-by: Fridtjof Mund --- contrib/docker/docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/docker/docker-compose.yml b/contrib/docker/docker-compose.yml index 2b044baf7813..5df29379c854 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 From b41297bc07ba1949cd4a3bdfa0d9ff2e1d11cbc5 Mon Sep 17 00:00:00 2001 From: fridtjof Date: Fri, 14 Feb 2020 17:14:50 +0100 Subject: [PATCH 2/2] add changelog entry for #6921 --- changelog.d/6921.docker | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/6921.docker diff --git a/changelog.d/6921.docker b/changelog.d/6921.docker new file mode 100644 index 000000000000..152e72333980 --- /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.