v13 postgres broken on new install #23

Closed
opened 2022-03-07 18:42:11 +00:00 by decentral1se · 2 comments
Owner
> The database cluster will be initialized with locale "en_US.utf8".
> initdb: error: "UTF-8 --lc-collate=C --lc-ctype=C" is not a valid server encoding name

compose.yml Line 62 in 1188f5d770
- POSTGRES_INITDB_ARGS="--encoding=UTF-8 --lc-collate=C --lc-ctype=C"

args must have changed in between minor versions?

Taken originally from https://github.com/matrix-org/synapse/blob/develop/contrib/docker/docker-compose.yml

``` > The database cluster will be initialized with locale "en_US.utf8". > initdb: error: "UTF-8 --lc-collate=C --lc-ctype=C" is not a valid server encoding name ``` https://git.coopcloud.tech/coop-cloud/matrix-synapse/src/commit/1188f5d77004c7b32f99838b59e8b3128cf4a909/compose.yml#L62 args must have changed in between minor versions? Taken originally from https://github.com/matrix-org/synapse/blob/develop/contrib/docker/docker-compose.yml
Author
Owner
Oh dear dog https://github.com/docker-library/postgres/issues/840
Author
Owner
diff --git a/compose.yml b/compose.yml
index b904454..d560d02 100644
--- a/compose.yml
+++ b/compose.yml
@@ -59,7 +59,9 @@ services:
       - db_password
     environment:
       - POSTGRES_DB=synapse
-      - POSTGRES_INITDB_ARGS="--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
+      - POSTGRES_INITDB_ARGS="-E \"UTF8\""
+      - LC_COLLATE=C
+      - LC_CTYPE=C
       - POSTGRES_PASSWORD_FILE=/run/secrets/db_password
       - POSTGRES_USER=synapse
     networks:
```diff diff --git a/compose.yml b/compose.yml index b904454..d560d02 100644 --- a/compose.yml +++ b/compose.yml @@ -59,7 +59,9 @@ services: - db_password environment: - POSTGRES_DB=synapse - - POSTGRES_INITDB_ARGS="--encoding=UTF-8 --lc-collate=C --lc-ctype=C" + - POSTGRES_INITDB_ARGS="-E \"UTF8\"" + - LC_COLLATE=C + - LC_CTYPE=C - POSTGRES_PASSWORD_FILE=/run/secrets/db_password - POSTGRES_USER=synapse networks: ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/matrix-synapse#23
No description provided.