Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support locale and template #406

Open
ftx-coder opened this issue May 1, 2021 · 4 comments
Open

Add support locale and template #406

ftx-coder opened this issue May 1, 2021 · 4 comments

Comments

@ftx-coder
Copy link

ftx-coder commented May 1, 2021

Hello everyone,

I would like to create a database that support template and locale out of the box without customizing the Dockerfile. Is there any environment variable that I can use to pass the locale and template?

createdb oak -l C -T template0

https://www.postgresql.org/docs/12/sql-createdatabase.html

Thanks

@mscherer
Copy link
Contributor

I am also looking at that, for installing synapse on openshift. Right now, it fail with:

sh-5.1# /srv/start.sh 
/usr/lib/python3.9/site-packages/twisted/conch/ssh/common.py:14: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes, int_to_bytes
Redirected stdout/stderr to logs
***** STARTING SERVER *****
Server /usr/lib/python3.9/site-packages/synapse/app/homeserver.py version 1.26.0
Server hostname: example.org
Instance name: master
Setting up server
Setting up.
[database config 'master']: Checking database server
Database has incorrect collation of 'en_US.utf8'. Should be 'C'
See docs/postgres.md for more information.
Database has incorrect ctype of 'en_US.utf8'. Should be 'C'
See docs/postgres.md for more information.
[database config 'master']: Preparing for databases ['main', 'state']
['main', 'state']: Checking existing schema version
['main', 'state']: Initialising new database
*******************************************************
 Database is incorrectly configured:
 
     - 'COLLATE' is set to 'en_US.utf8'. Should be 'C'
     - 'CTYPE' is set to 'en_US.utf8'. Should be 'C'
 
 See docs/postgres.md for more information.
*******************************************************

Referring to that doc.

mscherer added a commit to mscherer/postgresql-container that referenced this issue Jul 22, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Jul 26, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Aug 31, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 15, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 15, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 15, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 15, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 15, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Oct 19, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Oct 19, 2021
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 14, 2022
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 22, 2022
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 22, 2022
mscherer added a commit to mscherer/postgresql-container that referenced this issue Sep 22, 2022
@pkubatrh
Copy link
Member

@mscherer seems like you have a fork for this, would you mind creating a PR for this? We could take a look.

@mscherer
Copy link
Contributor

@pkubatrh you mean #416 , it is already opened since a few months.

I guess I need to rebase again however.

mscherer added a commit to mscherer/postgresql-container that referenced this issue Feb 22, 2023
@pkubatrh
Copy link
Member

Ah right, I only saw the connection from the fork so I expected a PR does not exists, my bad!

@fila43 can you take a look at #416?

mscherer added a commit to mscherer/postgresql-container that referenced this issue Mar 15, 2023
mscherer added a commit to mscherer/postgresql-container that referenced this issue Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants