When using custom configuration for Postgres (database, user and password), Weblate container will stop because it will not be able to connect to database.
For example if I use the following values in ./environment, then Weblate container will never start properly:
POSTGRES_DB
This optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, then the value of POSTGRES_USER will be used.
The default ./environment values will work because you are using the same value for database, username and password.
Describe the issue
When using custom configuration for Postgres (database, user and password), Weblate container will stop because it will not be able to connect to database.
For example if I use the following values in
./environment
, then Weblate container will never start properly:The reason is that in Postgres 16 the default environment variable for declaring a database is
POSTGRES_DB
and notPOSTGRES_DATABASE
.According to Postgres documentation:
The default
./environment
values will work because you are using the same value for database, username and password.I already tried
Steps to reproduce the behavior
./environment
and use different values forPOSTGRES_DATABASE
,POSTGRES_USER
andPOSTGRES_PASSWORD
.docker compose up
.Expected behavior
Weblate container must start properly.
Screenshots
As you can see Postgress creates database
wluser
instead ofweblate
becausePOSTGRES_DB
is not used.Exception traceback
No response
Additional context
No response